From 5400c4be26a809be8b0571f1291aa528ef39b743 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 7 May 2012 13:45:13 -0700 Subject: Oops, fix up a bug originally added in 7d66ab2e949bc915f108737f08cac2f9057ef729 when I tweaked the name of the rss_available variable to be rss_visible, but got it wrong. Bump the comment module to 6 so that we run the installer and clean up old vars. Fixes #1854. --- modules/comment/helpers/comment_installer.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'modules/comment/helpers') diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php index a64064f6..cbb8c783 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_available", "both"); - module::set_version("comment", 5); + module::set_var("comment", "rss_visible", "both"); + module::set_version("comment", 6); } static function upgrade($version) { @@ -81,6 +81,16 @@ class comment_installer { module::set_var("comment", "rss_visible", "all"); module::set_version("comment", $version = 5); } + + // In version 5 we accidentally set the installer variable to rss_available when it should + // have been rss_visible. Migrate it over now, if necessary. + if ($version == 5) { + if (!module::get_var("comment", "rss_visible")) { + module::set_var("comment", "rss_visible", module::get_var("comment", "rss_available")); + } + module::clear_var("comment", "rss_available"); + module::set_version("comment", $version = 6); + } } static function uninstall() { -- cgit v1.2.3