Subversion Repositories ALCASAR

Rev

Rev 3100 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3100 Rev 3287
Line 97... Line 97...
97
                if (!file_exists(PSI_APP_ROOT.'/includes/os/class.'.PSI_OS.'.inc.php')) {
97
                if (!file_exists(PSI_APP_ROOT.'/includes/os/class.'.PSI_OS.'.inc.php')) {
98
                    $this->error->addError("file_exists(class.".PSI_OS.".inc.php)", PSI_OS." is not currently supported");
98
                    $this->error->addError("file_exists(class.".PSI_OS.".inc.php)", PSI_OS." is not currently supported");
99
                }
99
                }
100
            }
100
            }
101
 
101
 
102
            if (!defined('PSI_MBINFO') && (!$this->_blockName || in_array($this->_blockName, array('voltage','current','temperature','fans','power','other')))) {
102
            if (!defined('PSI_MBINFO') && (!$this->_blockName || in_array($this->_blockName, array('mbinfo','voltage','current','temperature','fans','power','other')))) {
103
                // check if there is a valid sensor configuration in phpsysinfo.ini
103
                // check if there is a valid sensor configuration in phpsysinfo.ini
104
                $foundsp = array();
104
                $foundsp = array();
105
                if (defined('PSI_SENSOR_PROGRAM') && is_string(PSI_SENSOR_PROGRAM)) {
105
                if (defined('PSI_SENSOR_PROGRAM') && is_string(PSI_SENSOR_PROGRAM)) {
106
                    if (preg_match(ARRAY_EXP, PSI_SENSOR_PROGRAM)) {
106
                    if (preg_match(ARRAY_EXP, PSI_SENSOR_PROGRAM)) {
107
                        $sensorprograms = eval(strtolower(PSI_SENSOR_PROGRAM));
107
                        $sensorprograms = eval(strtolower(PSI_SENSOR_PROGRAM));
Line 281... Line 281...
281
        if (is_string($plugin) && ($plugin !== "")) {
281
        if (is_string($plugin) && ($plugin !== "")) {
282
            if (preg_match('/[^A-Za-z]/', $plugin)) {
282
            if (preg_match('/[^A-Za-z]/', $plugin)) {
283
                $this->_blockName = ' '; // mask wrong plugin name
283
                $this->_blockName = ' '; // mask wrong plugin name
284
            } elseif (($plugin = strtolower($plugin)) === "complete") {
284
            } elseif (($plugin = strtolower($plugin)) === "complete") {
285
                $this->_completeXML = true;
285
                $this->_completeXML = true;
286
            } elseif (in_array($plugin, array('vitals','hardware','memory','filesystem','network','voltage','current','temperature','fans','power','other','ups'))) {
286
            } elseif (in_array($plugin, array('vitals','hardware','memory','filesystem','network','mbinfo','voltage','current','temperature','fans','power','other','ups'))) {
287
                $this->_blockName = $plugin;
287
                $this->_blockName = $plugin;
288
            } elseif (in_array($plugin, CommonFunctions::getPlugins())) {
288
            } elseif (in_array($plugin, CommonFunctions::getPlugins())) {
289
                $this->_pluginName = $plugin;
289
                $this->_pluginName = $plugin;
290
            } else {
290
            } else {
291
                $this->_blockName = ' '; // disable all blocks
291
                $this->_blockName = ' '; // disable all blocks