Fix config to correctly remove empty values

This commit is contained in:
Nathan Gray 2008-04-11 13:38:37 +00:00
parent a900cf91a7
commit 540901e9c7

View File

@ -152,7 +152,7 @@ class config
if (empty($value))
{
if (isset(self::$configs[$app])) unset(self::$configs[$app][$name]);
return self::$db->delete(config::TABLE,array('config_value'=>$value),__LINE__,__FILE__);
return self::$db->delete(config::TABLE,array('config_app'=>$app,'config_name'=>$name),__LINE__,__FILE__);
}
return self::$db->insert(config::TABLE,array('config_value'=>$value),array('config_app'=>$app,'config_name'=>$name),__LINE__,__FILE__);
}