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:04:49 +00:00
parent e7f0769a26
commit c8615c194c

View File

@ -121,13 +121,14 @@ class config
*/
/* 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)!');
}
//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;
}
//echo "<p>config::save_value('$name','".print_r($value,True)."','$app')</p>\n";