From: hickert Date: Fri, 12 Oct 2007 13:47:09 +0000 (+0000) Subject: Added new msg_dialog type 'FATAL_ERROR_DIALOG'. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=41696a67a0652fcd12ab027c71025097835bdb8d;p=gosa.git Added new msg_dialog type 'FATAL_ERROR_DIALOG'. This type should be used if an error must be displayed directly. - Error while parsing gosa.conf git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7540 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_msg_dialog.inc b/include/class_msg_dialog.inc index 1d5a81d66..8d6d63334 100644 --- a/include/class_msg_dialog.inc +++ b/include/class_msg_dialog.inc @@ -1,9 +1,10 @@ i_Type == FATAL_ERROR_DIALOG){ + restore_error_handler(); + error_reporting(E_ALL); + echo $this->execute(); + }else{ + $_SESSION['msg_dialogs'][] = $this; + } } public static function display($s_title,$s_message,$i_type = INFO_DIALOG) @@ -43,16 +50,36 @@ class msg_dialog public function execute() { - $smarty = get_smarty(); - $smarty->assign("s_Trace",print_a($this->a_Trace,TRUE)); - $smarty->assign("i_Type",$this->i_Type); - $smarty->assign("s_Message",$this->s_Message); - $smarty->assign("s_Title",$this->s_Title); - $smarty->assign("i_ID",$this->i_ID); - $smarty->assign("frame",false); - $smarty->assign("JS",$_SESSION['js']); - $smarty->assign("IE",preg_match("/MSIE/", $_SERVER['HTTP_USER_AGENT'])); - return($smarty->fetch(get_template_path('msg_dialog.tpl'))); + if($this->i_Type == FATAL_ERROR_DIALOG) { + $display = + " + + GOsa startup failed + + + +
+ {t}Error{/t} + + Fatal Error - GOsa execution abortet - ".$this->s_Title."
+ ".$this->s_Message."

+ "._("Please fix the above error and reload the page.")." +
"; + return($display);; + }else{ + + $smarty = get_smarty(); + $smarty->assign("s_Trace",print_a($this->a_Trace,TRUE)); + $smarty->assign("i_Type",$this->i_Type); + $smarty->assign("s_Message",$this->s_Message); + $smarty->assign("s_Title",$this->s_Title); + $smarty->assign("i_ID",$this->i_ID); + $smarty->assign("frame",false); + $smarty->assign("JS",$_SESSION['js']); + $smarty->assign("IE",preg_match("/MSIE/", $_SERVER['HTTP_USER_AGENT'])); + return($smarty->fetch(get_template_path('msg_dialog.tpl'))); + } }