[Phpsysinfo-subversion] SF.net SVN: phpsysinfo:[417] trunk/includes/ups/class.Apcupsd.inc.php
Brought to you by:
namiltd
From: <jac...@us...> - 2011-01-14 12:57:23
|
Revision: 417 http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=417&view=rev Author: jacky672 Date: 2011-01-14 12:57:16 +0000 (Fri, 14 Jan 2011) Log Message: ----------- Adding APCMODEL info o UPS info (thanks to namiltd) Modified Paths: -------------- trunk/includes/ups/class.Apcupsd.inc.php Modified: trunk/includes/ups/class.Apcupsd.inc.php =================================================================== --- trunk/includes/ups/class.Apcupsd.inc.php 2011-01-13 19:25:59 UTC (rev 416) +++ trunk/includes/ups/class.Apcupsd.inc.php 2011-01-14 12:57:16 UTC (rev 417) @@ -64,7 +64,12 @@ $dev->setName(trim($data[1])); } if (preg_match('/^MODEL\s*:\s*(.*)$/m', $ups, $data)) { - $dev->setModel(trim($data[1])); + $model=trim($data[1]); + if (preg_match('/^APCMODEL\s*:\s*(.*)$/m', $ups, $data)) { + $dev->setModel($model.' ('.trim($data[1]).')'); + } else { + $dev->setModel($model); + } } if (preg_match('/^UPSMODE\s*:\s*(.*)$/m', $ups, $data)) { $dev->setMode(trim($data[1])); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |