From 770207474e1287b240d761dac891c58af6ad9f72 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 9 Dec 2008 14:47:35 +0000 Subject: [PATCH] debug stuff related to placeholder substitution --- phpgwapi/inc/class.preferences.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.preferences.inc.php b/phpgwapi/inc/class.preferences.inc.php index 30cee2fb4c..0bc9be9909 100644 --- a/phpgwapi/inc/class.preferences.inc.php +++ b/phpgwapi/inc/class.preferences.inc.php @@ -69,7 +69,7 @@ class preferences var $table = 'egw_preferences'; var $values,$vars; // standard notify substitues, will be set by standard_substitues() - + var $debug = false; /** * Standard constructor for setting $this->account_id */ @@ -110,6 +110,7 @@ class preferences } foreach($vals as $key => $val) { + if ($this->debug) error_log(__METHOD__." replacing \$\$$key\$\$ with $val "); $replace[] = '$$'.$key.'$$'; $with[] = $val; } @@ -147,6 +148,7 @@ class preferences */ function standard_substitutes() { + if ($this->debug) error_log(__METHOD__." is called "); if (!is_array(@$GLOBALS['egw_info']['user']['preferences'])) { $GLOBALS['egw_info']['user']['preferences'] = $this->data; // else no lang() @@ -174,6 +176,7 @@ class preferences 'email' => lang('email-address of the user, eg. "%1"',$this->values['email']), 'date' => lang('todays date, eg. "%1"',$this->values['date']), ); + if ($this->debug) error_log(__METHOD__.print_r($this->vars,true)); // do the substituetion in the effective prefs (data) // foreach($this->data as $app => $data)