summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_installer.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-04-23 12:48:04 -0700
committerBharat Mediratta <bharat@menalto.com>2011-04-23 12:48:04 -0700
commit59d5ddc8abe882c3cc3994ca2478d8dd0915f0fe (patch)
tree1e30b729ad80e903a39425907df8e023c763821b /modules/gallery/helpers/gallery_installer.php
parentdbdc3f088661826a56e62b85398dd795a9abb063 (diff)
Set the default value for gallery.timezone to null so that each install uses
date_default_timezone_get() in modules/gallery/config/locale.php but it's still overrideable in Admin > Settings > Advanced. Follow on fix for #1637.
Diffstat (limited to 'modules/gallery/helpers/gallery_installer.php')
-rw-r--r--modules/gallery/helpers/gallery_installer.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index 83c5ed71..7a9af402 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -311,9 +311,9 @@ class gallery_installer {
module::set_var("gallery", "email_header_separator", serialize("\n"));
module::set_var("gallery", "show_user_profiles_to", "registered_users");
module::set_var("gallery", "extra_binary_paths", "/usr/local/bin:/opt/local/bin:/opt/bin");
- module::set_var("gallery", "timezone", Kohana::config("locale.timezone"));
+ module::set_var("gallery", "timezone", null);
- module::set_version("gallery", 48);
+ module::set_version("gallery", 49);
}
static function upgrade($version) {
@@ -685,11 +685,12 @@ class gallery_installer {
module::set_version("gallery", $version = 47);
}
- if ($version == 47) {
+ if ($version == 47 || $version == 48) {
// Add configuration variable to set timezone. Defaults to the currently
- // used timezone (from PHP configuration).
- module::set_var("gallery", "timezone", Kohana::config("locale.timezone"));
- module::set_version("gallery", $version = 48);
+ // used timezone (from PHP configuration). Note that in v48 we werew
+ // setting this value incorrectly, so we're going to stomp this value for v49.
+ module::set_var("gallery", "timezone", null);
+ module::set_version("gallery", $version = 49);
}
}