add some check if cached config does not meet basic requirements, recreate it then

This commit is contained in:
Ralf Becker 2012-10-01 09:23:51 +00:00
parent 7783f1535a
commit 3e538116c9

View File

@ -340,7 +340,8 @@ class config
{
config::$db = $GLOBALS['egw_setup']->db;
}
if (!(self::$configs = egw_cache::getInstance(__CLASS__, 'configs')))
// if item is not cached or cache is not looking alright --> query config from database
if (!(self::$configs = egw_cache::getInstance(__CLASS__, 'configs')) || !is_array(self::$configs['phpgwapi']))
{
self::$configs = array();
foreach(self::$db->select(config::TABLE,'*',false,__LINE__,__FILE__) as $row)