Changeset 11599

Show
Ignore:
Timestamp:
02/25/11 19:33:15 (2 years ago)
Author:
p_lindheimer
Message:

fixes #4401 deprecated use of split() to preg_split()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.9/amp_conf/htdocs/admin/cdr/call-log.php

    r11047 r11599  
    659659                   
    660660                   
    661                   $field_list_sun = split(',',$FG_TABLE_COL[$i][8]); 
     661                  $field_list_sun = preg_split('/,/',$FG_TABLE_COL[$i][8]); 
    662662                  $record_display = $FG_TABLE_COL[$i][10]; 
    663663                  //echo $record_display; 
  • freepbx/branches/2.9/amp_conf/htdocs_panel/dhtml/index.php

    r8166 r11599  
    1111 
    1212$pepe = file_get_contents($archivo); 
    13 $partes = split("&",$pepe); 
     13$partes = preg_split("/&/",$pepe); 
    1414foreach ($partes as $elemento) { 
    15   $otri = split("=",$elemento); 
     15  $otri = preg_split("/=/",$elemento); 
    1616  if(substr($otri[0],0,5)=="texto") { 
    1717    $numero = substr($otri[0],5); 
  • freepbx/branches/2.9/amp_conf/htdocs_panel/dhtml/variables.php

    r8165 r11599  
    1111 
    1212$pepe = file_get_contents($archivo); 
    13 $partes = split("&",$pepe); 
     13$partes = preg_split("/&/",$pepe); 
    1414foreach ($partes as $elemento) { 
    15   $otri = split("=",$elemento); 
     15  $otri = preg_split("/=/",$elemento); 
    1616  if(substr($otri[0],0,5)=="texto") { 
    1717    $numero = substr($otri[0],5); 
  • modules/branches/2.9/core/functions.inc.php

    r11495 r11599  
    51435143  $confitem['account'] = $channelid; 
    51445144  $gimmieabreak = nl2br($config); 
    5145   $lines = split('<br />',$gimmieabreak); 
     5145  $lines = preg_split('/<br />/',$gimmieabreak); 
    51465146  foreach ($lines as $line) { 
    51475147    $line = trim($line); 
    5148     if (count(split('=',$line)) > 1) { 
    5149       $tmp = split('=',$line,2); 
     5148    if (count(preg_split('/=/',$line)) > 1) { 
     5149      $tmp = preg_split('/=/',$line,2); 
    51505150      $key=trim($tmp[0]); 
    51515151      $value=trim($tmp[1]); 
     
    62266226    $did_count = 0; 
    62276227    foreach ($dids as $did) { 
    6228       $did_dest = split(',',$did['destination']); 
     6228      $did_dest = preg_split('/,/',$did['destination']); 
    62296229      if (isset($did_dest[1]) && $did_dest[1] == $extdisplay) { 
    62306230 
  • modules/branches/2.9/dashboard/phpsysinfo/class.Darwin.inc.php

    r7633 r11599  
    8686    $s = $this->grab_ioreg('IOPCIDevice'); 
    8787 
    88     $lines = split("\n", $s); 
     88    $lines = preg_split("/\n/", $s); 
    8989    for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { 
    9090      $ar_buf = preg_split("/\s+/", $lines[$i], 19); 
     
    100100    $s = $this->grab_ioreg('IOATABlockStorageDevice');  
    101101 
    102     $lines = split("\n", $s); 
     102    $lines = preg_split("/\n/", $s); 
    103103    $j = 0; 
    104104    for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { 
     
    119119 
    120120    $pstat = execute_program('vm_stat'); // use darwin's vm_stat 
    121     $lines = split("\n", $pstat); 
     121    $lines = preg_split("/\n/", $pstat); 
    122122    for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { 
    123123      $ar_buf = preg_split("/\s+/", $lines[$i], 19); 
     
    139139    // need to fix the swap info... 
    140140    $pstat = execute_program('swapinfo', '-k'); 
    141     $lines = split("\n", $pstat); 
     141    $lines = preg_split("/\n/", $pstat); 
    142142 
    143143    for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { 
     
    161161  function network () { 
    162162    $netstat = execute_program('netstat', '-nbdi | cut -c1-24,42- | grep Link'); 
    163     $lines = split("\n", $netstat); 
     163    $lines = preg_split("/\n/", $netstat); 
    164164    $results = array(); 
    165165    for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { 
     
    187187  function filesystems () { 
    188188    $df = execute_program('df', '-k'); 
    189     $mounts = split("\n", $df); 
     189    $mounts = preg_split("/\n/", $df); 
    190190    $fstype = array(); 
    191191 
  • modules/branches/2.9/dashboard/phpsysinfo/class.NetBSD.inc.php

    r7633 r11599  
    5353    $netstat_b = execute_program('netstat', '-nbdi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"'); 
    5454    $netstat_n = execute_program('netstat', '-ndi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"'); 
    55     $lines_b = split("\n", $netstat_b); 
    56     $lines_n = split("\n", $netstat_n); 
     55    $lines_b = preg_split("/\n/", $netstat_b); 
     56    $lines_n = preg_split("/\n/", $netstat_n); 
    5757    $results = array(); 
    5858    for ($i = 0, $max = sizeof($lines_b); $i < $max; $i++) { 
  • modules/branches/2.9/dashboard/phpsysinfo/class.OpenBSD.inc.php

    r7633 r11599  
    5555    $netstat_b = execute_program('netstat', '-nbdi | cut -c1-25,44- | grep Link | grep -v \'* \''); 
    5656    $netstat_n = execute_program('netstat', '-ndi | cut -c1-25,44- | grep Link | grep -v \'* \''); 
    57     $lines_b = split("\n", $netstat_b); 
    58     $lines_n = split("\n", $netstat_n); 
     57    $lines_b = preg_split("/\n/", $netstat_b); 
     58    $lines_n = preg_split("/\n/", $netstat_n); 
    5959    $results = array(); 
    6060    for ($i = 0, $max = sizeof($lines_b); $i < $max; $i++) { 
  • modules/branches/2.9/dashboard/phpsysinfo/class.parseProgs.inc.php

    r4360 r11599  
    1111 
    1212        if ($_results = execute_program('lspci', '', $this->debug)) { 
    13       $lines = split("\n", $_results); 
     13      $lines = preg_split("/\n/", $_results); 
    1414      for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { 
    1515    list($addr, $name) = explode(' ', trim($lines[$i]), 2); 
  • modules/branches/2.9/phpagiconf/functions.inc.php

    r6709 r11599  
    4646 
    4747function phpagiconf_update($p_id, $p_debug, $p_error_handler, $p_err_email, $p_hostname, $p_tempdir, $p_festival_text2wave, $p_asman_server, $p_asman_port, $p_asmanager, $p_cepstral_swift, $p_cepstral_voice, $p_setuid, $p_basedir) { 
    48   $asmanager = split('/', $p_asmanager); 
     48  $asmanager = preg_split('#/#', $p_asmanager); 
    4949  $results = sql("UPDATE phpagiconf SET `debug`=$p_debug, error_handler=$p_error_handler, err_email='$p_err_email', hostname='$p_hostname', tempdir='$p_tempdir', festival_text2wave='$p_festival_text2wave', asman_server='$p_asman_server', asman_port=$p_asman_port, asman_user='".$asmanager[0]."', asman_secret='".$asmanager[1]."', cepstral_swift='$p_cepstral_swift', cepstral_voice='$p_cepstral_voice', setuid=$p_setuid, basedir='$p_basedir' where phpagiid=$p_id"); 
    5050} 
     
    5353  global $amp_conf; 
    5454  if (!empty($p_asmanager)) { 
    55     $asmanager = split('/', $p_asmanager);  
     55    $asmanager = preg_split('#/#', $p_asmanager);  
    5656  } else { 
    5757    $asmanager = array ($amp_conf['AMPDBUSER'], $amp_conf['AMPDBPASS']); 
  • modules/branches/2.9/restart/functions.inc.php

    r10534 r11599  
    5454  foreach($astout as $entry)  { 
    5555    if(eregi("useragent",$entry))  { 
    56       list(,$value) = split(":",$entry); 
     56      list(,$value) = preg_split("/:/",$entry); 
    5757      $ua = trim($value); 
    5858    } 
  • modules/branches/2.9/voicemail/functions.inc.php

    r10874 r11599  
    11251125            if (preg_match('/Value: [^\s]*/', $results_elem, $matches) > 0) 
    11261126            { 
    1127               $parts = split(' ', trim($matches[0])); 
     1127              $parts = preg_split('/ /', trim($matches[0])); 
    11281128              $callmenum = $parts[1]; 
    11291129              break;