X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_msg_dialog.inc;h=4f765a5b58fad8eb42cdec984b98a177b6167d74;hb=6b427a4efb6d7e4e40ad96ae32a35f61af301d05;hp=004c029d54b4343190352eac6a2a89f7e2930b00;hpb=3d245a958e3120bb3aaea1d8839df1ac7a3d596d;p=gosa.git diff --git a/gosa-core/include/class_msg_dialog.inc b/gosa-core/include/class_msg_dialog.inc index 004c029d5..4f765a5b5 100644 --- a/gosa-core/include/class_msg_dialog.inc +++ b/gosa-core/include/class_msg_dialog.inc @@ -1,10 +1,31 @@ data['MAIN']['DISPLAYERRORS']) && - preg_match("/^true$/i",$config->data['MAIN']['DISPLAYERRORS'])){ + $config->get_cfg_value("displayerrors") == "true" ){ $this->a_Trace = debug_backtrace(); } if(!session::is_set('msg_dialogs')){ @@ -63,11 +85,22 @@ class msg_dialog 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); @@ -164,5 +197,6 @@ class msg_dialog } return($return); } + } ?>