X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_msg_dialog.inc;h=24a70c04d3119d0b83ebc6e0440703424181850e;hb=5eb351d44a10e1315cba393a894348906934e06b;hp=efd6cab053985c3ea318b375c70b4503de98a00f;hpb=54703a9b788754b473bf689deb9c1694ae27acae;p=gosa.git diff --git a/gosa-core/include/class_msg_dialog.inc b/gosa-core/include/class_msg_dialog.inc index efd6cab05..24a70c04d 100644 --- a/gosa-core/include/class_msg_dialog.inc +++ b/gosa-core/include/class_msg_dialog.inc @@ -1,10 +1,31 @@ i_ID = preg_replace("/[^0-9]*/","",microtime()); $this->s_Title = $s_title; @@ -42,11 +66,10 @@ class msg_dialog /* Append trace information, only if error messages are enabled */ if( isset($config) && is_object($config) && - isset($config->data['MAIN']['DISPLAYERRORS']) && - preg_match("/^true$/i",$config->data['MAIN']['DISPLAYERRORS'])){ + $config->get_cfg_value("core","displayErrors") == "true" ){ $this->a_Trace = debug_backtrace(); } - if(!isset($_SESSION['msg_dialogs'])){ + if(!session::is_set('msg_dialogs')){ session::set('msg_dialogs',array()); } if($this->i_Type == FATAL_ERROR_DIALOG){ @@ -54,16 +77,30 @@ class msg_dialog error_reporting(E_ALL); echo $this->execute(); }else{ - $_SESSION['msg_dialogs'][] = $this; + $msg_dialogs = session::get('msg_dialogs'); + $msg_dialogs[] = $this; + session::set('msg_dialogs',$msg_dialogs); } } + session::set('errorsAlreadyPosted',$errorsAlreadyPosted); } + public static function display($s_title,$s_message,$i_type = INFO_DIALOG) { new msg_dialog($s_title,$s_message,$i_type); } + + public static function displayChecks($messages) + { + /* Assemble the message array to a plain string */ + foreach ($messages as $error){ + msg_dialog::display(_("Error"), $error, ERROR_DIALOG); + } + } + + public function get_ID() { return($this->i_ID); @@ -82,7 +119,7 @@ class msg_dialog