Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/error
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5436/modules/error
Added Files:
class.module_error.php
Log Message:
added modules error and layout
--- NEW FILE: class.module_error.php ---
<?php
require_once 'XML/Tree.php';
class module_config extends module {
var $configfile;
function init () {
$this->__registerEvent ('CONFIG_READ', 'doReadConfig');
$this->__registerAction ('doReadConfig', 'readConfig');
$this->__registerEvent ('CONFIG_GET', 'doGetConfig');
$this->__registerAction ('doGetConfig', 'getConfig');
$this->__registerEvent ('CONFIG_SAVE', 'doSaveConfig');
$this->__registerAction ('doSaveConfig', 'saveConfig');
$this->__registerEvent ('CONFIG_SET_FILE', 'doSetConfigFile');
$this->__registerAction ('doSetConfigFile', 'setConfigFile');
}
function readConfig (&$actiondata) {
if (isset ($actiondata['configfile'])) {
$this->configfile = $actiondata ['configfile'];
}
if (!isset($this->configfile)) {
$actiondata = array ('errortext'=>'Konfigurationsdatei konnte nicht geladen werden!');
$this->__callEvent ('ERROR_NOTICE', $actiondata);
return false;
}
if (!file_exists ($this->configfile)) {
unset ($this->configfile);
$actiondata = array ('errortext'=>'Konfigurationsdatei konnte nicht geladen werden!');
$this->__callEvent ('ERROR_NOTICE', $actiondata);
return false;
}
$XML =& new XML_Tree ($this->configfile);
$this->configdata =& $XML->getTreeFromFile ();
return true;
}
function getConfig (&$actiondata) {
$actiondata['config'] =& $this->configdata;
return true;
}
function saveConfig (&$actiondata) {
}
function setConfigFile (&$actiondata) {
$this->configfile = $actiondata['configfile'];
}
}
?>
|