Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/error
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28241/modules/error
Modified Files:
class.module_error.php
Log Message:
module filemanager and editor included
Index: class.module_error.php
===================================================================
RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/error/class.module_error.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- class.module_error.php 4 Jun 2004 11:11:57 -0000 1.3
+++ class.module_error.php 18 Jun 2004 15:17:00 -0000 1.4
@@ -28,6 +28,9 @@
/*
* $Log$
+* Revision 1.4 2004/06/18 15:17:00 mjahn
+* module filemanager and editor included
+*
* Revision 1.3 2004/06/04 11:11:57 mjahn
* several changes
*
@@ -47,7 +50,7 @@
$this->_registerAction ('doErrorAbort', 'errorAbort');
$this->_registerEvent ('ERROR_NOTICE', 'doErrorNotice');
$this->_registerAction ('doErrorNotice', 'errorNotice');
- $this->_registerAction ('doGetContents', 'displayError');
+ $this->_registerAction ('doParseError', 'displayError');
}
function errorAbort (&$actiondata) {
@@ -59,6 +62,21 @@
}
function displayError (&$actiondata) {
+ $root = $actiondata ['_root'];
+ if (!isset ($this->_error) || !is_array ($this->_error)) {
+ return true;
+ }
+ $num = count ($this->_error);
+ $content = '';
+ for ($i = 0; $i < $num; $i++) {
+ if (!isset ($this->_error[$i]['errortext'])) {
+ continue;
+ }
+ $content .= $this->_error[$i]['errortext'].'<br />';
+ }
+
+ $errordata = array ('_root'=>$root, '_id'=>'errormessage', '_type'=>'paragraph', 'id'=>'', 'class'=>'error', 'content'=>$content);
+ $this->_callEvent ('LAYOUT_ADD_ELEMENT', $errordata);
}
}
|