From 4128fd86c18d6a65026649a5d8ade54bedd5f64a Mon Sep 17 00:00:00 2001 From: ijliao Date: Fri, 15 Mar 2002 05:16:19 +0000 Subject: add phpSysInfo 2.0 A php script that displays info about the host being accessed PR: 35581 Submitted by: Bob Bomar --- .../patch-includes-os-class.BSD.common.inc.php | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 www/phpSysInfo/files/patch-includes-os-class.BSD.common.inc.php (limited to 'www/phpSysInfo/files') diff --git a/www/phpSysInfo/files/patch-includes-os-class.BSD.common.inc.php b/www/phpSysInfo/files/patch-includes-os-class.BSD.common.inc.php new file mode 100644 index 0000000..3758d73 --- /dev/null +++ b/www/phpSysInfo/files/patch-includes-os-class.BSD.common.inc.php @@ -0,0 +1,27 @@ +Index: includes/os/class.BSD.common.inc.php +==================================================================XRCS file: /cvsroot/phpsysinfo/phpsysinfo-dev/includes/os/class.BSD.common.inc.php,v +retrieving revision 1.4 +diff -u -3 -r1.4 class.BSD.common.inc.php +--- includes/os/class.BSD.common.inc.php 4 Feb 2002 01:27:30 -0000 1.4 ++++ includes/os/class.BSD.common.inc.php 17 Feb 2002 06:50:27 -0000 +@@ -179,14 +179,17 @@ + $results[$s]['model'] = $ar_buf[3]; + $results[$s]['media'] = 'Hard Disk'; + $results[$s]['capacity'] = $ar_buf[2] * 2048 * 1.049; +- } +- if (preg_match('/^(acd[0-9]): (.*) <(.*)> (.*)/', $buf, $ar_buf)) { ++ } else ++ if (preg_match('/^(acd[0-9]): (.*) <(.*)> (.*)/', $buf, $ar_buf)) { + $s = $ar_buf[1]; + $results[$s]['model'] = $ar_buf[3]; + $results[$s]['media'] = 'CD-ROM'; + } + } +- return array_values(array_unique($results)); ++ //return array_values(array_unique($results)); ++ //1. more useful to have device names ++ //2. php 4.1.1 array_unique() deletes non-unique values. ++ return $results; + } + + function memory () -- cgit v1.1