mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-31 12:10:51 -04:00
Oops, fix up a bug originally added in
7d66ab2e94 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.
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user