I've created a patch.
Somente em ./debian: files Somente em ./debian: phpsysinfo Somente em ./debian: phpsysinfo.debhelper.log Somente em ./debian: phpsysinfo.substvars Somente em ./debian: stamp-patched diff -urp ./includes/common_functions.php /tmp/phpsysinfo-3.0~rc6//includes/common_functions.php --- ./includes/common_functions.php 2011-02-13 22:44:24.000000000 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/common_functions.php 2008-06-05 15:58:52.000000000 -0300 @@ -61,7 +61,7 @@ function execute_program($strProgramname } // see if we've gotten a |, if we have we need to do patch checking on the cmd if ($strArgs) { - $arrArgs = preg_split('/ /', $strArgs); + $arrArgs = split(' ', $strArgs); for ($i = 0;$i < count($arrArgs);$i++) { if ($arrArgs[$i] == '|') { $strCmd = $arrArgs[$i+1]; diff -urp ./includes/mb/class.mbm5.inc.php /tmp/phpsysinfo-3.0~rc6//includes/mb/class.mbm5.inc.php --- ./includes/mb/class.mbm5.inc.php 2011-02-13 22:30:30.000000000 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/mb/class.mbm5.inc.php 2008-06-05 15:58:52.000000000 -0300 @@ -31,9 +31,9 @@ class mbinfo { } else { $delim = ";"; } - $buffer = preg_split("\n", $buffer); - $this->buf_label = preg_split($delim, substr($buffer[0], 0, -2)); - $this->buf_value = preg_split($delim, substr($buffer[1], 0, -2)); + $buffer = split("\n", $buffer); + $this->buf_label = split($delim, substr($buffer[0], 0, -2)); + $this->buf_value = split($delim, substr($buffer[1], 0, -2)); } public function temperature() { $results = array(); diff -urp ./includes/os/class.BSD.common.inc.php /tmp/phpsysinfo-3.0~rc6//includes/os/class.BSD.common.inc.php --- ./includes/os/class.BSD.common.inc.php 2011-02-13 22:49:43.000000000 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/os/class.BSD.common.inc.php 2008-06-05 15:58:52.000000000 -0300 @@ -242,7 +242,7 @@ class bsd_common { if (!execute_program('vmstat', '', $pstat, $this->debug)) { $pstat = ''; } - $lines = preg_split("/\n/", $pstat); + $lines = split("\n", $pstat); for ($i = 0, $max = sizeof($lines);$i < $max;$i++) { $ar_buf = preg_split("/\s+/", $lines[$i], 19); if ($i == 2) { @@ -268,7 +268,7 @@ class bsd_common { $pstat = ''; } } - $lines = preg_split("/\n/", $pstat); + $lines = split("\n", $pstat); $results['swap']['total'] = 0; $results['swap']['used'] = 0; $results['swap']['free'] = 0; diff -urp ./includes/os/class.Darwin.inc.php /tmp/phpsysinfo-3.0~rc6//includes/os/class.Darwin.inc.php --- ./includes/os/class.Darwin.inc.php 2011-02-13 22:52:18.000000000 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/os/class.Darwin.inc.php 2008-06-05 15:58:52.000000000 -0300 @@ -93,7 +93,7 @@ class sysinfo extends bsd_common { public function pci() { $results = array(); $s = $this->grab_ioreg('IOPCIDevice'); - $lines = preg_split("/\n/", $s); + $lines = split("\n", $s); for ($i = 0, $max = sizeof($lines);$i < $max;$i++) { $ar_buf = preg_split("/\s+/", $lines[$i], 19); $results[$i] = $ar_buf[0]; @@ -106,7 +106,7 @@ class sysinfo extends bsd_common { $results = array(); // ioreg | grep "Media <class IOMedia>" $s = $this->grab_ioreg('IOATABlockStorageDevice'); - $lines = preg_split("/\n/", $s); + $lines = split("\n", $s); $j = 0; for ($i = 0, $max = sizeof($lines);$i < $max;$i++) { $ar_buf = preg_split("/\/\//", $lines[$i], 19); @@ -125,7 +125,7 @@ class sysinfo extends bsd_common { if (!execute_program('vm_stat', '', $pstat, $this->debug)) { $pstat = ''; } - $lines = preg_split("/\n/", $pstat); + $lines = split("\n", $pstat); for ($i = 0, $max = sizeof($lines);$i < $max;$i++) { $ar_buf = preg_split("/\s+/", $lines[$i], 19); if ($i == 1) { @@ -142,7 +142,7 @@ class sysinfo extends bsd_common { // need to fix the swap info... // meanwhile silence and / or disable the swap information if (execute_program('swapinfo', '-k', $pstat, $this->debug)) { - $lines = preg_split("/\n/", $pstat); + $lines = split("\n", $pstat); for ($i = 0, $max = sizeof($lines);$i < $max;$i++) { $ar_buf = preg_split("/\s+/", $lines[$i], 6); if ($i == 0) { @@ -162,7 +162,7 @@ class sysinfo extends bsd_common { } public function network() { if (execute_program('netstat', '-nbdi | cut -c1-24,42- | grep Link', $netstat, $this->debug)) { - $lines = preg_split("/\n/", $netstat); + $lines = split("\n", $netstat); $results = array(); for ($i = 0, $max = sizeof($lines);$i < $max;$i++) { $ar_buf = preg_split("/\s+/", $lines[$i], 10); diff -urp ./includes/os/class.FreeBSD.inc.php /tmp/phpsysinfo-3.0~rc6//includes/os/class.FreeBSD.inc.php --- ./includes/os/class.FreeBSD.inc.php 2011-02-13 22:51:45.000000000 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/os/class.FreeBSD.inc.php 2008-06-05 15:58:52.000000000 -0300 @@ -48,7 +48,7 @@ class sysinfo extends bsd_common { if (!execute_program('netstat', '-nibd | grep Link', $netstat, $this->debug)) { $netstat = ''; } - $lines = preg_split("/\n/", $netstat); + $lines = split("\n", $netstat); $results = array(); for ($i = 0, $max = sizeof($lines);$i < $max;$i++) { $ar_buf = preg_split("/\s+/", $lines[$i]); diff -urp ./includes/os/class.HP-UX.inc.php /tmp/phpsysinfo-3.0~rc6//includes/os/class.HP-UX.inc.php --- ./includes/os/class.HP-UX.inc.php 2011-02-13 22:50:57.000000000 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/os/class.HP-UX.inc.php 2008-06-05 15:58:52.000000000 -0300 @@ -72,7 +72,7 @@ class sysinfo { } public function users() { if (execute_program('who', '-q', $ret)) { - $who = preg_split('/=/', $ret); + $who = split('=', $ret); $result = $who[1]; return $retsult; } else { @@ -172,7 +172,7 @@ class sysinfo { continue; } if ($device) { - list($key, $value) = preg_split('/: /', $buf, 2); + list($key, $value) = split(': ', $buf, 2); if (!preg_match('/bridge/i', $key) && !preg_match('/USB/i', $key)) { $results[] = preg_replace('/\([^\)]+\)\.$/', '', trim($value)); } @@ -234,7 +234,7 @@ class sysinfo { foreach($bufe as $buf) { if (preg_match('/Vendor/', $buf)) { preg_match('/Vendor: (.*) Model: (.*) Rev: (.*)/i', $buf, $dev); - list($key, $value) = preg_split('/: /', $buf, 2); + list($key, $value) = split(': ', $buf, 2); $dev_str = $value; $get_type = 1; continue; @@ -265,8 +265,8 @@ class sysinfo { $devstring = 1; } if ($devstring) { - list($key, $value) = preg_split('/: /', $buf, 2); - list($key, $value2) = preg_split('/=/', $value, 2); + list($key, $value) = split(': ', $buf, 2); + list($key, $value2) = split('=', $value, 2); $results[$devnum].= " " . trim($value2); $devstring = 0; } @@ -276,7 +276,7 @@ class sysinfo { } public function network() { if (execute_program('netstat', '-ni | tail -n +2', $netstat)) { - $lines = preg_split("/\n/", $netstat); + $lines = split("\n", $netstat); $results = array(); for ($i = 0, $max = sizeof($lines);$i < $max;$i++) { $ar_buf = preg_split("/\s+/", $lines[$i]); @@ -319,7 +319,7 @@ class sysinfo { $results['swap']['percent'] = ceil(($ar_buf[1]*100) /(($ar_buf[0] <= 0) ? 1 : $ar_buf[0])); // Get info on individual swap files if (rfts('/proc/swaps', $swaps)) { - $swapdevs = preg_split("/\n/", $swaps); + $swapdevs = split("\n", $swaps); for ($i = 1, $max = (sizeof($swapdevs) -1);$i < $max;$i++) { $ar_buf = preg_split('/\s+/', $swapdevs[$i], 6); $results['devswap'][$i-1] = array(); @@ -338,19 +338,19 @@ class sysinfo { } public function filesystems() { if (execute_program('df', '-kP', $df)) { - $mounts = preg_split("/\n/", $df); + $mounts = split("\n", $df); } else { $mounts = array(); } $fstype = array(); if (execute_program('mount', '-v', $s)) { - $lines = explode("/\n/", $s); + $lines = explode("\n", $s); } else { $lines = array(); } $i = 0; while (list(, $line) = each($lines)) { - $a = preg_split('/ /', $line); + $a = split(' ', $line); $fsdev[$a[0]] = $a[4]; } for ($i = 1, $j = 0, $max = sizeof($mounts);$i < $max;$i++) { diff -urp ./includes/os/class.Linux.inc.php /tmp/phpsysinfo-3.0~rc6//includes/os/class.Linux.inc.php --- ./includes/os/class.Linux.inc.php 2011-02-13 22:46:58.000000000 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/os/class.Linux.inc.php 2008-06-05 15:58:52.000000000 -0300 @@ -41,9 +41,9 @@ class sysinfo { } // We have the '2> /dev/null' because Ubuntu gives an error on this command which causes the distro to be unknown if (execute_program('lsb_release', '-a 2> /dev/null', $distro_info, $this->debug)) { - $distro_tmp = preg_split("/\n/", $distro_info); + $distro_tmp = split("\n", $distro_info); foreach($distro_tmp as $info) { - $info_tmp = preg_split('/:/', $info, 2); + $info_tmp = split(':', $info, 2); $distro[$info_tmp[0]] = trim($info_tmp[1]); } if (!isset($list[$distro['Distributor ID']])) { @@ -130,14 +130,14 @@ class sysinfo { } public function uptime() { rfts('/proc/uptime', $buf, 1); - $ar_buf = preg_split('/ /', $buf); + $ar_buf = split(' ', $buf); $result = trim($ar_buf[0]); return $result; } public function users() { $strResult = 0; if (execute_program('who', '-q', $strBuf, $this->debug)) { - $arrWho = preg_split('/=/', $strBuf); + $arrWho = split('=', $strBuf); $strResult = $arrWho[1]; } return $strResult; @@ -306,7 +306,7 @@ class sysinfo { continue; } if ($booDevice) { - list($strKey, $strValue) = preg_split('/: /', $strLine, 2); + list($strKey, $strValue) = split(': ', $strLine, 2); if (!preg_match('/bridge/i', $strKey) && !preg_match('/USB/i ', $strKey)) { $arrResults[] = preg_replace('/\([^\)]+\)\.$/', '', trim($strValue)); } @@ -368,7 +368,7 @@ class sysinfo { foreach($bufe as $buf) { if (preg_match('/Vendor/', $buf)) { preg_match('/Vendor: (.*) Model: (.*) Rev: (.*)/i', $buf, $dev); - list($key, $value) = preg_split('/: /', $buf, 2); + list($key, $value) = split(': ', $buf, 2); $dev_str = $value; $get_type = true; continue; @@ -396,8 +396,8 @@ class sysinfo { $devnum+= 1; $results[$devnum] = ""; } elseif (preg_match('/^S:/', $buf)) { - list($key, $value) = preg_split('/: /', $buf, 2); - list($key, $value2) = preg_split('/=/', $value, 2); + list($key, $value) = split(': ', $buf, 2); + list($key, $value2) = split('=', $value, 2); if (trim($key) != "SerialNumber") { $results[$devnum].= " " . trim($value2); $devstring = 0; diff -urp ./includes/os/class.NetBSD.inc.php /tmp/phpsysinfo-3.0~rc6//includes/os/class.NetBSD.inc.php --- ./includes/os/class.NetBSD.inc.php 2011-02-13 22:50:02.000000000 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/os/class.NetBSD.inc.php 2008-06-05 15:58:52.000000000 -0300 @@ -45,8 +45,8 @@ class sysinfo extends bsd_common { public function network() { execute_program('netstat', '-nbdi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"', $netstat_b); execute_program('netstat', '-ndi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"', $netstat_n); - $lines_b = preg_split("/\n/", $netstat_b); - $lines_n = preg_split("/\n/", $netstat_n); + $lines_b = split("\n", $netstat_b); + $lines_n = split("\n", $netstat_n); $results = array(); for ($i = 0, $max = sizeof($lines_b);$i < $max;$i++) { $ar_buf_b = preg_split("/\s+/", $lines_b[$i]); diff -urp ./includes/os/class.OpenBSD.inc.php /tmp/phpsysinfo-3.0~rc6//includes/os/class.OpenBSD.inc.php --- ./includes/os/class.OpenBSD.inc.php 2011-02-13 22:51:15.000000000 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/os/class.OpenBSD.inc.php 2008-06-05 15:58:52.000000000 -0300 @@ -46,8 +46,8 @@ class sysinfo extends bsd_common { public function network() { execute_program('netstat', '-nbdi | cut -c1-25,44- | grep Link | grep -v \'* \'', $netstat_b, $this->debug); execute_program('netstat', '-ndi | cut -c1-25,44- | grep Link | grep -v \'* \'', $netstat_n, $this->debug); - $lines_b = preg_split("/\n/", $netstat_b); - $lines_n = preg_split("/\n/", $netstat_n); + $lines_b = split("\n", $netstat_b); + $lines_n = split("\n", $netstat_n); $results = array(); for ($i = 0, $max = sizeof($lines_b);$i < $max;$i++) { $ar_buf_b = preg_split("/\s+/", $lines_b[$i]); diff -urp ./includes/os/class.parseProgs.inc.php /tmp/phpsysinfo-3.0~rc6//includes/os/class.parseProgs.inc.php --- ./includes/os/class.parseProgs.inc.php 2011-02-13 22:48:18.000000000 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/os/class.parseProgs.inc.php 2008-06-05 15:58:52.000000000 -0300 @@ -28,7 +28,7 @@ class Parser { public function parse_lspci() { $arrResults = array(); if (execute_program("lspci", "", $strBuff, $this->debug)) { - $arrLines = preg_split("/\n/", $strBuff); + $arrLines = split("\n", $strBuff); foreach($arrLines as $strLine) { list($strAddr, $strName) = explode(' ', trim($strLine), 2); $strName = preg_replace('/\(.*\)/', '', $strName); diff -urp ./includes/os/class.SunOS.inc.php /tmp/phpsysinfo-3.0~rc6//includes/os/class.SunOS.inc.php --- ./includes/os/class.SunOS.inc.php 2011-02-13 22:52:48.000000000 -0200 +++ /tmp/phpsysinfo-3.0~rc6//includes/os/class.SunOS.inc.php 2008-06-05 15:58:52.000000000 -0300 @@ -27,7 +27,7 @@ class sysinfo { // Extract kernel values via kstat() interface function kstat($key) { if (execute_program('kstat', "-p d $key", $m, $this->debug)) { - list($key, $value) = preg_split("/\t/", trim($m), 2); + list($key, $value) = split("\t", trim($m), 2); return $value; } else { return ''; @@ -79,7 +79,7 @@ class sysinfo { } public function users() { if (execute_program('who', '-q', $buf, $this->debug)) { - $who = preg_split('/=/', $buf); + $who = split('=', $buf); $result = $who[1]; return $result; } else { @@ -130,7 +130,7 @@ class sysinfo { if (!execute_program('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, $this->debug)) { $netstat = ''; } - $lines = preg_split("/\n/", $netstat); + $lines = split("\n", $netstat); $results = array(); for ($i = 0, $max = sizeof($lines);$i < $max;$i++) { $ar_buf = preg_split("/\s+/", $lines[$i]); @@ -180,14 +180,14 @@ class sysinfo { if (!execute_program('df', '-k', $df, $this->debug)) { $df = ''; } - $mounts = preg_split("/\n/", $df); + $mounts = split("\n", $df); if (!execute_program('df', '-n', $dftypes, $this->debug)) { $dftypes = ''; } - $mounttypes = preg_split("/\n/", $dftypes); + $mounttypes = split("\n", $dftypes); for ($i = 1, $j = 0, $max = sizeof($mounts);$i < $max;$i++) { $ar_buf = preg_split('/\s+/', $mounts[$i], 6); - $ty_buf = preg_split('/:/', $mounttypes[$i-1], 2); + $ty_buf = split(':', $mounttypes[$i-1], 2); if (hide_mount($ar_buf[5])) { continue; } Somente em .: patch.diff Somente em .: patches Somente em .: .pc