added flag to disable the str_replace('phpGroupWare','eGroupWare'), called egroupware_hack

This commit is contained in:
Ralf Becker 2003-08-30 11:03:20 +00:00
parent 1b1329661f
commit b99e600aaa

View File

@ -43,6 +43,9 @@
/* last error message is retained here */ /* last error message is retained here */
var $last_error = ''; var $last_error = '';
// if true change all phpGroupWare into eGroupWare in set_var
var $egroupware_hack = True;
/***************************************************************************/ /***************************************************************************/
/* public: Constructor. /* public: Constructor.
* root: template directory. * root: template directory.
@ -139,20 +142,15 @@
{ {
if (!is_array($varname)) if (!is_array($varname))
{ {
if (!empty($varname)) if (empty($varname))
{ {
if ($this->debug) return;
{
print "scalar: set *$varname* to *$value*<br>\n";
} }
$this->varkeys[$varname] = $this->varname($varname); $varname = array(
$this->varvals[$varname] = str_replace('phpGroupWare','eGroupWare',$value); $varname => $value
);
} }
} foreach($varname as $k => $v)
else
{
reset($varname);
while(list($k, $v) = each($varname))
{ {
if (!empty($k)) if (!empty($k))
{ {
@ -161,8 +159,7 @@
print "array: set *$k* to *$v*<br>\n"; print "array: set *$k* to *$v*<br>\n";
} }
$this->varkeys[$k] = $this->varname($k); $this->varkeys[$k] = $this->varname($k);
$this->varvals[$k] = str_replace('phpGroupWare','eGroupWare',$v); $this->varvals[$k] = $this->egroupware_hack ? str_replace('phpGroupWare','eGroupWare',$v) : $v;
}
} }
} }
} }