diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-08-07 12:18:43 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-08-07 12:18:43 -0700 |
commit | 779d91cca01567a09b894e9fff4dfa32cb82d3d9 (patch) | |
tree | 3b2eccb1f86100b35b3f13b514c0fb10e017432f /modules | |
parent | 67636ade24ca5fca394cc4f75227294f6927be29 (diff) |
Add an index for left_ptr, since we use that in ORM_MPTT::parents()
which is on every album page. Bump Gallery module version to 33.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/helpers/gallery_installer.php | 10 | ||||
-rw-r--r-- | modules/gallery/module.info | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index 7896a7a7..21c47ad5 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -114,7 +114,8 @@ class gallery_installer { KEY `parent_id` (`parent_id`), KEY `type` (`type`), KEY `random` (`rand_key`), - KEY `weight` (`weight` DESC)) + KEY `weight` (`weight` DESC), + KEY `left_ptr` (`left_ptr`)) DEFAULT CHARSET=utf8;"); $db->query("CREATE TABLE {logs} ( @@ -298,7 +299,7 @@ class gallery_installer { module::set_var("gallery", "simultaneous_upload_limit", 5); module::set_var("gallery", "admin_area_timeout", 90 * 60); module::set_var("gallery", "maintenance_mode", 0); - module::set_version("gallery", 32); + module::set_version("gallery", 33); } static function upgrade($version) { @@ -572,6 +573,11 @@ class gallery_installer { ->execute(); module::set_version("gallery", $version = 32); } + + if ($version == 32) { + $db->query("ALTER TABLE {items} ADD KEY (`left_ptr`)"); + module::set_version("gallery", $version = 33); + } } static function uninstall() { diff --git a/modules/gallery/module.info b/modules/gallery/module.info index 59db07de..dbecda03 100644 --- a/modules/gallery/module.info +++ b/modules/gallery/module.info @@ -1,3 +1,3 @@ name = "Gallery 3" description = "Gallery core application" -version = 32 +version = 33 |