mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-21 23:33:54 -04:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user