Flush the access_intent cache after ALTER TABLE queries, fixes a

problem where the install.sql had the wrong view permissions.
This commit is contained in:
Bharat Mediratta
2009-01-19 06:02:53 +00:00
parent d97308ffe7
commit 0448a5b32c
2 changed files with 7 additions and 5 deletions
+2
View File
@@ -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();
}
/**