summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-19 06:02:53 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-19 06:02:53 +0000
commit0448a5b32cd69dfdced339cb7bad0cbc5b940c53 (patch)
treef213cc8c5816f0947ba33bb2389a18869277660c /core
parentd97308ffe70005a0d3cb0f0b7e96d82375f79e06 (diff)
Flush the access_intent cache after ALTER TABLE queries, fixes a
problem where the install.sql had the wrong view permissions.
Diffstat (limited to 'core')
-rw-r--r--core/helpers/access.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/helpers/access.php b/core/helpers/access.php
index 4aba5e9a..23db5782 100644
--- a/core/helpers/access.php
+++ b/core/helpers/access.php
@@ -406,6 +406,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`");
+ ORM::factory("access_intent")->clear_cache();
}
/**
@@ -422,6 +423,7 @@ class access_Core {
$db->query("ALTER TABLE `$cache_table` ADD `$field` TINYINT(2) NOT NULL DEFAULT 0");
$db->query("ALTER TABLE `access_intents` ADD `$field` BOOLEAN DEFAULT NULL");
$db->query("UPDATE `access_intents` SET `$field` = 0 WHERE `item_id` = 1");
+ ORM::factory("access_intent")->clear_cache();
}
/**