summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/access.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-07-17 12:51:27 -0700
committerBharat Mediratta <bharat@menalto.com>2009-07-17 12:51:27 -0700
commitcd907c2b42f8b50ebe6d490aab42365e16deb258 (patch)
treeb58350f7d7ffebeb91d5d9d2f273c0561625664b /modules/gallery/helpers/access.php
parent8a6556b30bc34d69284df6246f4010a8835f3bc2 (diff)
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!)
Diffstat (limited to 'modules/gallery/helpers/access.php')
-rw-r--r--modules/gallery/helpers/access.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gallery/helpers/access.php b/modules/gallery/helpers/access.php
index 5dd1e465..63324e5d 100644
--- a/modules/gallery/helpers/access.php
+++ b/modules/gallery/helpers/access.php
@@ -205,6 +205,7 @@ class access_Core {
}
self::_update_htaccess_files($album, $group, $perm_name, $value);
+ model_cache::clear();
}
/**
@@ -256,6 +257,7 @@ class access_Core {
}
}
}
+ model_cache::clear();
}
/**
@@ -426,6 +428,7 @@ class access_Core {
$cache_table = $perm_name == "view" ? "items" : "access_caches";
$db->query("ALTER TABLE {{$cache_table}} DROP `$field`");
$db->query("ALTER TABLE {access_intents} DROP `$field`");
+ model_cache::clear();
ORM::factory("access_intent")->clear_cache();
}
@@ -443,6 +446,7 @@ class access_Core {
$db->query("ALTER TABLE {{$cache_table}} ADD `$field` SMALLINT NOT NULL DEFAULT 0");
$db->query("ALTER TABLE {access_intents} ADD `$field` BOOLEAN DEFAULT NULL");
$db->update("access_intents", array($field => 0), array("item_id" => 1));
+ model_cache::clear();
ORM::factory("access_intent")->clear_cache();
}