From 46bf4bd0a6231721bafd75807a31e877349141df Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 28 Nov 2007 07:57:54 +0000 Subject: [PATCH] Closes #282, only display trace information, if trace is enabled git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7924 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_msg_dialog.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/class_msg_dialog.inc b/include/class_msg_dialog.inc index 505d47fc7..349d56bb0 100644 --- a/include/class_msg_dialog.inc +++ b/include/class_msg_dialog.inc @@ -16,6 +16,8 @@ class msg_dialog public function __construct($s_title,$s_message,$i_type) { + global $config; + if(!in_array($i_type,array(INFO_DIALOG,WARNING_DIALOG,ERROR_DIALOG,CONFIRM_DIALOG,FATAL_ERROR_DIALOG))){ trigger_error("Invalid msg_dialog type."); $i_type = INFO_DIALOG; @@ -36,7 +38,14 @@ class msg_dialog $this->s_Title = $s_title; $this->s_Message = $s_message; $this->i_Type = $i_type; - $this->a_Trace = debug_backtrace(); + + /* 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'])){ + $this->a_Trace = debug_backtrace(); + } if(!isset($_SESSION['msg_dialogs'])){ $_SESSION['msg_dialogs'] = array(); } -- 2.30.2