summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 15d10f4)
raw | patch | inline | side by side (parent: 15d10f4)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 28 Nov 2007 07:57:54 +0000 (07:57 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 28 Nov 2007 07:57:54 +0000 (07:57 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7924 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_msg_dialog.inc | patch | blob | history |
index 505d47fc7b412bb77c4a673042f69f364a7e6e75..349d56bb00752802fd8b2ac3920bc6af4b576408 100644 (file)
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;
$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();
}