[Phpsysinfo-subversion] SF.net SVN: phpsysinfo:[451] trunk/includes/os/class.Darwin.inc.php
Brought to you by:
namiltd
From: <jac...@us...> - 2011-04-03 09:46:47
|
Revision: 451 http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=451&view=rev Author: jacky672 Date: 2011-04-03 09:46:40 +0000 (Sun, 03 Apr 2011) Log Message: ----------- replaced tabs by spaces, removed some old lines Modified Paths: -------------- trunk/includes/os/class.Darwin.inc.php Modified: trunk/includes/os/class.Darwin.inc.php =================================================================== --- trunk/includes/os/class.Darwin.inc.php 2011-04-02 12:51:00 UTC (rev 450) +++ trunk/includes/os/class.Darwin.inc.php 2011-04-03 09:46:40 UTC (rev 451) @@ -93,13 +93,9 @@ private function _uptime() { if (CommonFunctions::executeProgram('sysctl', '-n kern.boottime', $a, PSI_DEBUG)) { -// if ($this->_is_mac_10_6) { - $tmp = explode(" ", $a); - $data = trim($tmp[3],","); - $this->sys->setUptime(time() - $data); -// } else { -// $this->sys->setUptime(time() - $a); -// } + $tmp = explode(" ", $a); + $data = trim($tmp[3],","); + $this->sys->setUptime(time() - $data); } } @@ -113,7 +109,7 @@ $dev = new CpuDevice(); if (CommonFunctions::executeProgram('hostinfo', '| grep "Processor type"', $buf, PSI_DEBUG)) { $dev->setModel(preg_replace('/Processor type: /', '', $buf)); - $buf=$this->grabkey('hw.model'); + $buf=$this->grabkey('hw.model'); if (CommonFunctions::rfts(APP_ROOT.'/data/ModelTranslation.txt', $buffer)) { $buffer = preg_split("/\n/", $buffer, -1, PREG_SPLIT_NO_EMPTY); foreach ($buffer as $line) { @@ -243,15 +239,9 @@ if (trim($arrLine[0]) === "System Version") { $distro = trim($arrLine[1]); - /*if (preg_match('/^Mac OS X 10\.6/', $distro)) - { - $this->_is_mac_10_6 = true; + if (preg_match('/^Mac OS/', $distro)) { $this->sys->setDistributionIcon('Apple.png'); } - else */if (preg_match('/^Mac OS/', $distro)) - { - $this->sys->setDistributionIcon('Apple.png'); - } $this->sys->setDistribution($distro); return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |