From d8070fce5995992704b45d5886891e25c2be2ee0 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 28 Nov 2007 08:01:48 +0000 Subject: [PATCH] Fixed msg_dialog. Hide trace, if there is no trace available git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7925 594d385d-05f5-0310-b6e9-bd551577e9d8 --- ihtml/themes/default/msg_dialog.tpl | 4 ++-- include/class_msg_dialog.inc | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ihtml/themes/default/msg_dialog.tpl b/ihtml/themes/default/msg_dialog.tpl index d7d9ac49b..9d7fb391b 100644 --- a/ihtml/themes/default/msg_dialog.tpl +++ b/ihtml/themes/default/msg_dialog.tpl @@ -91,7 +91,7 @@ {else} - {if $s_Trace != ""} + {if $s_Trace != "" && $i_TraceCnt != 0} @@ -126,7 +126,7 @@

- {if $s_Trace} + {if $s_Trace != "" && $i_TraceCnt != 0}
Trace
diff --git a/include/class_msg_dialog.inc b/include/class_msg_dialog.inc index 349d56bb0..538dc152a 100644 --- a/include/class_msg_dialog.inc +++ b/include/class_msg_dialog.inc @@ -43,7 +43,7 @@ class msg_dialog if( isset($config) && is_object($config) && isset($config->data['MAIN']['DISPLAYERRORS']) && - !preg_match("/^true$/i",$config->data['MAIN']['DISPLAYERRORS'])){ + preg_match("/^true$/i",$config->data['MAIN']['DISPLAYERRORS'])){ $this->a_Trace = debug_backtrace(); } if(!isset($_SESSION['msg_dialogs'])){ @@ -91,7 +91,8 @@ class msg_dialog }else{ $smarty = get_smarty(); - $smarty->assign("s_Trace",print_a($this->a_Trace,TRUE)); + $smarty->assign("s_Trace" ,print_a($this->a_Trace,TRUE)); + $smarty->assign("i_TraceCnt",count($this->a_Trace)); $smarty->assign("i_Type",$this->i_Type); $smarty->assign("s_Message",$this->s_Message); $smarty->assign("s_Title",$this->s_Title); -- 2.30.2