debug stuff related to placeholder substitution

This commit is contained in:
Klaus Leithoff 2008-12-09 14:47:35 +00:00
parent cf51ea7120
commit 770207474e

View File

@ -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)