Fix broken cache update when deleting a preference.

Before, it would only store the preference for the updated app instead of all.
This commit is contained in:
Nathan Gray 2014-03-31 16:59:01 +00:00
parent ae940d9174
commit 5be831d9dc

View File

@ -743,7 +743,12 @@ class preferences
'preference_app' => $row['preference_app'],
),__LINE__,__FILE__);
// update instance-wide cache
egw_cache::setInstance(__CLASS__, $row['preference_owner'], $value);
$cached = egw_cache::getInstance(__CLASS__, $row['preference_owner']);
if($cached && $cached[$row['preference_app']])
{
$cached[$row['preference_app']] = $value;
egw_cache::setInstance(__CLASS__, $row['preference_owner'], $cached);
}
}
}
$GLOBALS['egw']->db->transaction_commit();