* Mon May 12 2025 Brian Read <brianr@koozali.org> 11.0.0-1.sme
- Adding SM2 panel [SME: 13004] - Upgrade to phpsysinfo 3.4.4 - Add code to delete inline styles and add css to make it look better. - version saved / built uses the static version, which means no drops downs and choices.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
* @package PSI_Plugin
|
||||
* @author Michael Cramer <BigMichi1@users.sourceforge.net>
|
||||
* @copyright 2009 phpSysInfo
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
|
||||
* @version SVN: $Id: class.PSI_Plugin.inc.php 661 2012-08-27 11:26:39Z namiltd $
|
||||
* @link http://phpsysinfo.sourceforge.net
|
||||
*/
|
||||
@@ -23,7 +23,7 @@
|
||||
* @package PSI_Plugin
|
||||
* @author Michael Cramer <BigMichi1@users.sourceforge.net>
|
||||
* @copyright 2009 phpSysInfo
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
|
||||
* @version Release: 3.0
|
||||
* @link http://phpsysinfo.sourceforge.net
|
||||
*/
|
||||
@@ -61,17 +61,16 @@ abstract class PSI_Plugin implements PSI_Interface_Plugin
|
||||
* build the global Error object, read the configuration and check if all files are available
|
||||
* for a minimalistic function of the plugin
|
||||
*
|
||||
* @param String $plugin_name name of the plugin
|
||||
* @param String $enc target encoding
|
||||
*
|
||||
* @param string $plugin_name name of the plugin
|
||||
* @param string $enc target encoding
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($plugin_name, $enc)
|
||||
{
|
||||
$this->global_error = Error::Singleton();
|
||||
$this->global_error = PSI_Error::Singleton();
|
||||
if (trim($plugin_name) != "") {
|
||||
$this->_plugin_name = $plugin_name;
|
||||
$this->_plugin_base = APP_ROOT."/plugins/".strtolower($this->_plugin_name)."/";
|
||||
$this->_plugin_base = PSI_APP_ROOT."/plugins/".strtolower($this->_plugin_name)."/";
|
||||
$this->_checkfiles();
|
||||
$this->_getconfig();
|
||||
} else {
|
||||
@@ -87,9 +86,11 @@ abstract class PSI_Plugin implements PSI_Interface_Plugin
|
||||
*/
|
||||
private function _getconfig()
|
||||
{
|
||||
if ((!defined('PSI_PLUGIN_'.strtoupper($this->_plugin_name).'_ACCESS')) &&
|
||||
(!defined('PSI_PLUGIN_'.strtoupper($this->_plugin_name).'_FILE'))) {
|
||||
$this->global_error->addError("config.ini", "Config for plugin ".$this->_plugin_name." not exist!");
|
||||
if ((strtoupper($this->_plugin_name) !== 'DISKLOAD') &&
|
||||
(!defined('PSI_PLUGIN_'.strtoupper($this->_plugin_name).'_ACCESS')) &&
|
||||
(!defined('PSI_PLUGIN_'.strtoupper($this->_plugin_name).'_FILE')) &&
|
||||
(!defined('PSI_PLUGIN_'.strtoupper($this->_plugin_name).'_SHOW_SERIAL'))) {
|
||||
$this->global_error->addError("phpsysinfo.ini", "Config for plugin ".$this->_plugin_name." not exist!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,9 +121,9 @@ abstract class PSI_Plugin implements PSI_Interface_Plugin
|
||||
/**
|
||||
* create the xml template where plugin information are added to
|
||||
*
|
||||
* @param String $enc target encoding
|
||||
* @param string $enc target encoding
|
||||
*
|
||||
* @return Void
|
||||
* @return void
|
||||
*/
|
||||
private function _createXml($enc)
|
||||
{
|
||||
@@ -130,5 +131,13 @@ abstract class PSI_Plugin implements PSI_Interface_Plugin
|
||||
$root = $dom->createElement("Plugin_".$this->_plugin_name);
|
||||
$dom->appendChild($root);
|
||||
$this->xml = new SimpleXMLExtended(simplexml_import_dom($dom), $enc);
|
||||
$plugname = strtoupper($this->_plugin_name);
|
||||
if ((PSI_OS == 'Linux') && defined('PSI_PLUGIN_'.$plugname.'_SSH_HOSTNAME') &&
|
||||
(!defined('PSI_SSH_HOSTNAME') || (PSI_SSH_HOSTNAME != constant('PSI_PLUGIN_'.strtoupper($this->_plugin_name).'_SSH_HOSTNAME')))) {
|
||||
$this->xml->addAttribute('Hostname', constant('PSI_PLUGIN_'.strtoupper($this->_plugin_name).'_SSH_HOSTNAME'));
|
||||
} elseif (((PSI_OS == 'WINNT') || (PSI_OS == 'Linux')) && defined('PSI_PLUGIN_'.$plugname.'_WMI_HOSTNAME') &&
|
||||
(!defined('PSI_WMI_HOSTNAME') || (PSI_WMI_HOSTNAME != constant('PSI_PLUGIN_'.strtoupper($this->_plugin_name).'_WMI_HOSTNAME')))) {
|
||||
$this->xml->addAttribute('Hostname', constant('PSI_PLUGIN_'.strtoupper($this->_plugin_name).'_WMI_HOSTNAME'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user