Ticket #4401 (closed Bugs: fixed)

Opened 3 years ago

Last modified 2 years ago

List of files with deprecated php 'split' function, from branches/2.8/modules

Reported by: mickecarlsson Assigned to:
Priority: minor Milestone: 2.9
Component: FreePBX Framework Version: SVN-HEAD
Keywords: Cc:
Confirmation: Unreviewed Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description

This is a list with line number showing all files with the deprecated php function 'split':

backup/bin/ampbackup.pl:89:    my ($var, $value) = split(/\s*=\s*/, $_, 2);
core/agi-bin/dialparties.agi:188:       $extarray = split( '-', $arg );
core/agi-bin/dialparties.agi:765:               $device_array = split( '&', $device );
core/functions.inc.php:4706:    $lines = split('<br />',$gimmieabreak);
core/functions.inc.php:4710:                    $tmp = split('=',$line,2);
core/functions.inc.php:5758:                    $did_dest = split(',',$did['destination']);
dashboard/phpsysinfo/class.HP-UX.inc.php:64:    $who = split('=', execute_program('who', '-q'));
dashboard/phpsysinfo/class.HP-UX.inc.php:170:          list($key, $value) = split(': ', $buf, 2);
dashboard/phpsysinfo/class.HP-UX.inc.php:244:          list($key, $value) = split(': ', $buf, 2);
dashboard/phpsysinfo/class.HP-UX.inc.php:280:          list($key, $value) = split(': ', $buf, 2);
dashboard/phpsysinfo/class.HP-UX.inc.php:281:          list($key, $value2) = split('=', $value, 2);
dashboard/phpsysinfo/class.HP-UX.inc.php:300:    $lines = split("\n", $netstat);
dashboard/phpsysinfo/class.HP-UX.inc.php:358:            $swapdevs = split("\n", $swaps);
dashboard/phpsysinfo/class.HP-UX.inc.php:379:    $mounts = split("\n", $df);
dashboard/phpsysinfo/class.HP-UX.inc.php:387:      $a = split(' ', $line);
dashboard/phpsysinfo/class.Darwin.inc.php:88:    $lines = split("\n", $s);
dashboard/phpsysinfo/class.Darwin.inc.php:102:    $lines = split("\n", $s);
dashboard/phpsysinfo/class.Darwin.inc.php:121:    $lines = split("\n", $pstat);
dashboard/phpsysinfo/class.Darwin.inc.php:141:    $lines = split("\n", $pstat);
dashboard/phpsysinfo/class.Darwin.inc.php:163:    $lines = split("\n", $netstat);
dashboard/phpsysinfo/class.Darwin.inc.php:189:    $mounts = split("\n", $df);
dashboard/phpsysinfo/class.SunOS.inc.php:30:    list($key, $value) = split("\t", trim($m), 2);
dashboard/phpsysinfo/class.SunOS.inc.php:70:    $who = split('=', execute_program('who', '-q'));
dashboard/phpsysinfo/class.SunOS.inc.php:131:    $lines = split("\n", $netstat);
dashboard/phpsysinfo/class.SunOS.inc.php:202:    $mounts = split("\n", $df);
dashboard/phpsysinfo/class.SunOS.inc.php:205:    $mounttypes = split("\n", $dftypes);
dashboard/phpsysinfo/class.SunOS.inc.php:209:      $ty_buf = split(':', $mounttypes[$i-1], 2);
dashboard/phpsysinfo/class.NetBSD.inc.php:55:    $lines_b = split("\n", $netstat_b);
dashboard/phpsysinfo/class.NetBSD.inc.php:56:    $lines_n = split("\n", $netstat_n);
dashboard/phpsysinfo/class.parseProgs.inc.php:13:           $lines = split("\n", $_results);
dashboard/phpsysinfo/class.OpenBSD.inc.php:57:    $lines_b = split("\n", $netstat_b);
dashboard/phpsysinfo/class.OpenBSD.inc.php:58:    $lines_n = split("\n", $netstat_n);
phpagiconf/functions.inc.php:48:        $asmanager = split('/', $p_asmanager);
phpagiconf/functions.inc.php:55:                $asmanager = split('/', $p_asmanager);
publish.pl:305: ($md5sum, $null) = split(/ /, $md5);
restart/functions.inc.php:46:                   list(,$value) = split(":",$entry);

Attachments

dialparties.agi.patch (0.8 kB) - added by ianf on 09/03/10 09:53:24.
core-functions.inc.php.patch (1.0 kB) - added by ianf on 09/08/10 10:27:10.
dashboard-phpsysinfo.patch (8.5 kB) - added by ianf on 09/08/10 10:38:26.
phpagiconf-functions.inc.php.patch (1.4 kB) - added by ianf on 09/08/10 10:42:50.
restart-functions.inc.php.patch (337 bytes) - added by ianf on 09/08/10 10:45:01.

Change History

09/03/10 09:51:06 changed by ianf

If I produce a patch for this, will you commit and roll an update? I currently have to maintain a private patch so that freepbx works.

Ian

09/03/10 09:53:24 changed by ianf

  • attachment dialparties.agi.patch added.

09/03/10 15:34:04 changed by p_lindheimer

(In [10239]) remove deprecated split in dialparties.agi re #4401

09/08/10 10:27:10 changed by ianf

  • attachment core-functions.inc.php.patch added.

09/08/10 10:38:26 changed by ianf

  • attachment dashboard-phpsysinfo.patch added.

09/08/10 10:42:50 changed by ianf

  • attachment phpagiconf-functions.inc.php.patch added.

09/08/10 10:45:01 changed by ianf

  • attachment restart-functions.inc.php.patch added.

09/08/10 10:54:36 changed by ianf

There are 2 perl programs in the above list. That leaves the following:

backup/page.backup.php:156:                             if($("[name='name']").val().split(' ').length > 1){
conferences/page.conferences.php:391:                   var arr = theEleName.split("#");
core/page.routing.php:581:        patterns = insert.split(',')
framework/htdocs/admin/cdr/call-log.php:659:                                                                    $field_list_sun = split(',',$FG_TABLE_COL[$i][8]);
framework/htdocs/admin/cdr/jpgraph_lib/jpgraph_pie3d.php:525:           //  a) Slice starts before 90 and hence gets a split=90, but 
framework/htdocs/admin/cdr/jpgraph_lib/jpgraph_gantt.php:1563:      $tmp = split("\t",$this->iText);
framework/htdocs/admin/cdr/jpgraph_lib/jpgraph_gantt.php:1686:          $tmp = split("\t",$this->iText);
framework/htdocs/admin/cdr/jpgraph_lib/jpgraph.php:5648:        $tmp = split("\n",$txt);
framework/htdocs/admin/cdr/jpgraph_lib/jpgraph.php:5693:        $tmp = split("\n",$txt);
framework/htdocs/admin/cdr/jpgraph_lib/jpgraph.php:5845:                $tmp = split("\n",$txt);
framework/htdocs/admin/cdr/jpgraph_lib/jpgraph.php:6050:            $tmp = split("\n",$txt);
fw_ari/htdocs_ari/includes/ajax.php:103:        var limit=refresh_time.split(\":\");
fw_fop/htdocs_panel/dhtml/index.php:13:$partes = split("&",$pepe);
fw_fop/htdocs_panel/dhtml/index.php:15: $otri = split("=",$elemento);
fw_fop/htdocs_panel/dhtml/variables.php:13:$partes = split("&",$pepe);
fw_fop/htdocs_panel/dhtml/variables.php:15:     $otri = split("=",$elemento);

I'm not sure what to do about the first 3 and fw_ari/htdocs_ari/includes/ajax.php, if the code is PHP at all. If you want, I'll produce patches for the rest.

Ian

09/15/10 14:30:51 changed by p_lindheimer

  • owner deleted.
  • component changed from - choose - to FreePBX Framework.

sorry for the late reply, we will go through these (as we have already started) to get the fixes in. Thanks for the patch files.

09/15/10 20:00:30 changed by p_lindheimer

(In [10283]) Merged revisions 10179-10253,10255-10282 via svnmerge from http://svn.freepbx.org/modules/branches/2.8

................

r10187 | p_lindheimer | 2010-07-22 08:48:47 -0700 (Thu, 22 Jul 2010) | 1 line

fixes #4463 create backup directory on install of module

................

r10189 | mickecarlsson | 2010-07-22 21:58:29 -0700 (Thu, 22 Jul 2010) | 1 line

Re #4468, updated Russian language for dictate. Thank you ded.

................

r10190 | mickecarlsson | 2010-07-22 22:01:03 -0700 (Thu, 22 Jul 2010) | 1 line

Close #4468, updated Russian language for voicemail. Thank you ded.

................

r10197 | mickecarlsson | 2010-07-29 02:30:08 -0700 (Thu, 29 Jul 2010) | 1 line

Close #4477 add French language to daynight. Thank you tomarch

................

r10199 | mickecarlsson | 2010-07-29 09:17:49 -0700 (Thu, 29 Jul 2010) | 1 line

Close #4478 add French language to fax. Thank you tomarch

................

r10204 | mbrevda | 2010-08-02 14:32:51 -0700 (Mon, 02 Aug 2010) | 1 line

closes #4474. Fix for IE users. Guys, GET WITH THE TIMES!!

................

r10205 | mbrevda | 2010-08-02 14:33:23 -0700 (Mon, 02 Aug 2010) | 1 line

Module Publish Script: dashboard 2.8.0.3

................

r10223 | mickecarlsson | 2010-08-23 09:08:37 -0700 (Mon, 23 Aug 2010) | 1 line

Re #4506 updated russian language for queues. Thank you ded

................

r10239 | p_lindheimer | 2010-09-03 12:34:04 -0700 (Fri, 03 Sep 2010) | 1 line

remove deprecated split in dialparties.agi re #4401

................

r10245 | mickecarlsson | 2010-09-06 22:17:14 -0700 (Mon, 06 Sep 2010) | 1 line

Close #4529, add Chinese language to fax module. Thank you voip88_chris

................

r10257 | p_lindheimer | 2010-09-13 12:41:09 -0700 (Mon, 13 Sep 2010) | 1 line

Module Publish Script: disa 2.8.0.1

................

r10263 | p_lindheimer | 2010-09-14 14:24:53 -0700 (Tue, 14 Sep 2010) | 1 line

fixes #4525 allow w (pause) in trunk prepends - still interested in the scenarios that this is needed

................

r10265 | p_lindheimer | 2010-09-14 14:59:21 -0700 (Tue, 14 Sep 2010) | 9 lines

Merged revisions 10264 via svnmerge from http://svn.freepbx.org/modules/branches/2.7

........

r10264 | p_lindheimer | 2010-09-14 14:57:06 -0700 (Tue, 14 Sep 2010) | 1 line

fixes #4507 allow ';' characters in secrets

........

................

r10266 | p_lindheimer | 2010-09-14 15:03:54 -0700 (Tue, 14 Sep 2010) | 1 line

fixes #4502 allow 9 matches

................

r10267 | p_lindheimer | 2010-09-14 15:18:58 -0700 (Tue, 14 Sep 2010) | 1 line

fixes #4499 remove leading '&' from a device as previsous (and maybe current) versions sometimes put it there

................

r10269 | p_lindheimer | 2010-09-14 16:59:40 -0700 (Tue, 14 Sep 2010) | 1 line

closes #4484 so that sercid subroutines function properly when follow-me/ringgroups are called from a queue

................

r10270 | p_lindheimer | 2010-09-15 16:26:40 -0700 (Wed, 15 Sep 2010) | 1 line

Module Publish Script: findmefollow 2.8.0.4

................

r10271 | p_lindheimer | 2010-09-15 16:26:49 -0700 (Wed, 15 Sep 2010) | 1 line

Module Publish Script: backup 2.8.0.7

................

r10272 | p_lindheimer | 2010-09-15 16:26:57 -0700 (Wed, 15 Sep 2010) | 1 line

Module Publish Script: ringgroups 2.8.0.2

................

r10273 | p_lindheimer | 2010-09-15 16:27:06 -0700 (Wed, 15 Sep 2010) | 1 line

Module Publish Script: directory 2.8.0.0

................

r10275 | p_lindheimer | 2010-09-15 16:27:17 -0700 (Wed, 15 Sep 2010) | 1 line

Module Publish Script: core 2.8.0.3

................

r10276 | p_lindheimer | 2010-09-15 16:27:32 -0700 (Wed, 15 Sep 2010) | 1 line

Module Publish Script: fw_ari 2.8.0.5

................

r10277 | p_lindheimer | 2010-09-15 16:27:59 -0700 (Wed, 15 Sep 2010) | 1 line

Module Publish Script: framework 2.8.0.3

................

r10278 | p_lindheimer | 2010-09-15 16:43:50 -0700 (Wed, 15 Sep 2010) | 9 lines

Merged revisions 10196 via svnmerge from http://svn.freepbx.org/modules/branches/2.7

........

r10196 | GameGamer?43 | 2010-07-27 09:33:52 -0700 (Tue, 27 Jul 2010) | 1 line

closes #4473 - updates the mindterm.jar to the latest version as put out by AppGate?

........

................

r10279 | p_lindheimer | 2010-09-15 16:44:40 -0700 (Wed, 15 Sep 2010) | 1 line

Module Publish Script: javassh 2.8.0.1

................

12/25/10 09:00:31 changed by mickecarlsson

(In [10735]) Re #4401, change from split to preg_split in ARI

12/25/10 09:09:07 changed by mickecarlsson

modules/core has these left (branches/2.9):

4692: $lines = split('<br />',$gimmieabreak);
4966: $tmp = split('=',$line,2);
6038  $did_dest = split(',',$did['destination']);

modules/phpagiconf has these left (branches/2.9):

48: $asmanager = split('/', $p_asmanager);
55: $asmanager = split('/', $p_asmanager);

modules/restart has these left (branches/2.9):

56: list(,$value) = split(":",$entry);

And there are a lot in dashboard.....

02/25/11 19:33:16 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

(In [11599]) fixes #4401 deprecated use of split() to preg_split()