[Phpsysinfo-subversion] SF.net SVN: phpsysinfo:[194] includes/os/class.Darwin.inc.php
Brought to you by:
namiltd
From: <big...@us...> - 2009-04-19 08:55:09
|
Revision: 194 http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=194&view=rev Author: bigmichi1 Date: 2009-04-19 08:54:54 +0000 (Sun, 19 Apr 2009) Log Message: ----------- distro name fix Modified Paths: -------------- includes/os/class.Darwin.inc.php Modified: includes/os/class.Darwin.inc.php =================================================================== --- includes/os/class.Darwin.inc.php 2009-04-18 11:54:03 UTC (rev 193) +++ includes/os/class.Darwin.inc.php 2009-04-19 08:54:54 UTC (rev 194) @@ -252,5 +252,21 @@ $result = 'Darwin.png'; return $result; } + + public function distro() { + if(!CommonFunctions::executeProgram('system_profiler', 'SPSoftwareDataType', $buffer, PSI_DEBUG)) { + parent::distro(); + } else { + $arrBuff = split("\n", $buffer); + foreach($arrBuff as $line) { + $arrLine = split(':', $line); + if(trim($arrLine[0]) === "System Version") { + $result = trim($arrLine[1]); + break; + } + } + return $result; + } + } } ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |