Subversion Repositories ALCASAR

Compare Revisions

Regard whitespace Rev 2975 → Rev 2976

/web/acc/phpsysinfo/includes/mb/class.ohm.inc.php
27,14 → 27,8
public function __construct()
{
parent::__construct();
$_wmi = null;
try {
// initialize the wmi object
$objLocator = new COM('WbemScripting.SWbemLocator');
$_wmi = $objLocator->ConnectServer('', 'root\OpenHardwareMonitor');
} catch (Exception $e) {
$this->error->addError("WMI connect error", "PhpSysInfo can not connect to the WMI interface for OpenHardwareMonitor data.");
}
if ((PSI_OS == 'WINNT') || defined('PSI_EMU_HOSTNAME')) {
$_wmi = CommonFunctions::initWMI('root\OpenHardwareMonitor', true);
if ($_wmi) {
$tmpbuf = CommonFunctions::getWMI($_wmi, 'Sensor', array('Parent', 'Name', 'SensorType', 'Value'));
if ($tmpbuf) foreach ($tmpbuf as $buffer) {
44,6 → 38,7
}
}
}
}
 
/**
* get temperature information