diff options
author | Bharat Mediratta <bharat@menalto.com> | 2012-10-08 14:04:40 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2012-10-08 14:04:40 -0700 |
commit | b7e89613fc47a52016abb0377b15f6844bd08c06 (patch) | |
tree | 0ff79b020e7f3126b4c3fdf22e5b697ba2053d4e | |
parent | 8855847df26cc431a1ff74e0edcc2c370b8f94f6 (diff) |
Installer for comment module version 6 still set rss_visible to "both"
not "all". Fix that now and rebuild the installer package. Fixes #1917.
-rw-r--r-- | installer/install.sql | 4 | ||||
-rw-r--r-- | modules/comment/helpers/comment_installer.php | 13 | ||||
-rw-r--r-- | modules/comment/module.info | 2 |
3 files changed, 14 insertions, 5 deletions
diff --git a/installer/install.sql b/installer/install.sql index 2353a75a..aee0900c 100644 --- a/installer/install.sql +++ b/installer/install.sql @@ -246,7 +246,7 @@ CREATE TABLE {modules} ( /*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO {modules} VALUES (1,1,'gallery',50,1); INSERT INTO {modules} VALUES (2,1,'user',4,2); -INSERT INTO {modules} VALUES (3,1,'comment',6,3); +INSERT INTO {modules} VALUES (3,1,'comment',7,3); INSERT INTO {modules} VALUES (4,1,'organize',4,4); INSERT INTO {modules} VALUES (5,1,'info',2,5); INSERT INTO {modules} VALUES (6,1,'rss',1,6); @@ -419,7 +419,7 @@ INSERT INTO {vars} VALUES (NULL,'gallery','identity_provider','user'); INSERT INTO {vars} VALUES (NULL,'user','minimum_password_length','5'); INSERT INTO {vars} VALUES (NULL,'comment','spam_caught','0'); INSERT INTO {vars} VALUES (NULL,'comment','access_permissions','everybody'); -INSERT INTO {vars} VALUES (NULL,'comment','rss_visible','both'); +INSERT INTO {vars} VALUES (NULL,'comment','rss_visible','all'); INSERT INTO {vars} VALUES (NULL,'info','show_title','1'); INSERT INTO {vars} VALUES (NULL,'info','show_description','1'); INSERT INTO {vars} VALUES (NULL,'info','show_owner','1'); diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php index cbb8c783..f7bebe69 100644 --- a/modules/comment/helpers/comment_installer.php +++ b/modules/comment/helpers/comment_installer.php @@ -48,8 +48,8 @@ class comment_installer { module::set_var("comment", "spam_caught", 0); module::set_var("comment", "access_permissions", "everybody"); - module::set_var("comment", "rss_visible", "both"); - module::set_version("comment", 6); + module::set_var("comment", "rss_visible", "all"); + module::set_version("comment", 7); } static function upgrade($version) { @@ -91,6 +91,15 @@ class comment_installer { module::clear_var("comment", "rss_available"); module::set_version("comment", $version = 6); } + + // In version 6 we accidentally left the install value of "rss_visible" to "both" when it + // should have been "all" + if ($version == 6) { + if (module::get_var("comment", "rss_visible") == "both") { + module::set_var("comment", "rss_visible", "all"); + } + module::set_version("comment", $version = 7); + } } static function uninstall() { diff --git a/modules/comment/module.info b/modules/comment/module.info index bd4abe9f..97e8a73b 100644 --- a/modules/comment/module.info +++ b/modules/comment/module.info @@ -1,6 +1,6 @@ name = "Comments" description = "Allows users and guests to leave comments on photos and albums." -version = 6 +version = 7 author_name = "Gallery Team" author_url = "http://codex.gallery2.org/Gallery:Team" info_url = "http://codex.gallery2.org/Gallery3:Modules:comment" |