mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 19:39:16 -04:00
Change model_cache::clear() API to clear everything. This prevents
old ORM relationships from hanging around, which was causing problems when doing MPTT manipulations (resulting in incorrect permission propagation-- very bad!)
This commit is contained in:
@@ -32,10 +32,8 @@ class model_cache_Core {
|
||||
return self::$cache->$model_name->$field_name->$id;
|
||||
}
|
||||
|
||||
static function clear($model_name, $id, $field_name="id") {
|
||||
if (!empty(self::$cache->$model_name->$field_name->$id)) {
|
||||
unset(self::$cache->$model_name->$field_name->$id);
|
||||
}
|
||||
static function clear() {
|
||||
self::$cache = new stdClass();
|
||||
}
|
||||
|
||||
static function set($model) {
|
||||
|
||||
Reference in New Issue
Block a user