- global $messages, $path_to_root, $go_debug;
-
- $msg_class = array(
- E_USER_ERROR => 'err_msg',
- E_USER_WARNING =>'warn_msg',
- E_USER_NOTICE => 'note_msg');
-
- $type = E_USER_NOTICE;
- $content = '';
-// $class = 'no_msg';
- if (count($messages)) {
- foreach($messages as $cnt=>$msg) {
- if ($go_debug && $msg[0]>E_USER_NOTICE)
- $msg[0] = E_ERROR;
-
- if ($msg[0]>$type) continue;
-
- if ($msg[0]<$type) {
- if ($msg[0] == E_USER_WARNING) {
- $type = E_USER_WARNING; // user warnings
- $content = ''; // clean notices when we have errors
- } else {
- $type = E_USER_ERROR; // php or user errors
- if($type == E_USER_WARNING)
- $content = ''; // clean other messages
+ global $messages, $path_to_root, $SysPrefs;
+
+ $msg_class = array(
+ E_USER_ERROR => 'err_msg',
+ E_USER_WARNING =>'warn_msg',
+ E_USER_NOTICE => 'note_msg');
+
+ $type = E_USER_NOTICE;
+ $content = '';
+
+ if (count($messages)) {
+ foreach($messages as $cnt=>$msg) {
+ if ($SysPrefs->go_debug && $msg[0]>E_USER_NOTICE)
+ $msg[0] = E_ERROR;
+
+ if ($msg[0]>$type) continue;
+
+ if ($msg[0]<$type) {
+ if ($msg[0] == E_USER_WARNING) {
+ $type = E_USER_WARNING; // user warnings
+ $content = ''; // clean notices when we have errors
+ } else {
+ $type = E_USER_ERROR; // php or user errors
+ if($type == E_USER_WARNING)
+ $content = ''; // clean other messages
+ }