fixed not working non-static use after Jörgs commit ($app was NOT set anymore)

This commit is contained in:
Ralf Becker 2010-06-16 11:02:24 +00:00
parent b53e7ccbcc
commit e5552d1b45

View File

@ -121,13 +121,14 @@ class config
*/ */
/* static */ function save_value($name,$value,$app=null) /* static */ function save_value($name,$value,$app=null)
{ {
if (!$app && !isset($this)) if (!$app && (!isset($this) || !is_a($this,__CLASS__)))
{ {
throw new egw_exception_assertion_failed('$app parameter required for static call of config::save_value($name,$value,$app)!'); throw new egw_exception_assertion_failed('$app parameter required for static call of config::save_value($name,$value,$app)!');
} }
//echo "<p>config::save_value('$name','".print_r($value,True)."','$app')</p>\n"; //echo "<p>config::save_value('$name','".print_r($value,True)."','$app')</p>\n";
if (!$app || isset($this) && is_a($this,'config') && $app == $this->appname) if (!$app || isset($this) && is_a($this,__CLASS__) && $app == $this->appname)
{ {
$app = $this->appname;
$this->config_data[$name] = $value; $this->config_data[$name] = $value;
} }
//echo "<p>config::save_value('$name','".print_r($value,True)."','$app')</p>\n"; //echo "<p>config::save_value('$name','".print_r($value,True)."','$app')</p>\n";