diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2011-04-23 07:27:02 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2011-04-23 07:27:02 -0700 |
commit | a1f419435c755500bbd11cb6c48a5bb31f8e6421 (patch) | |
tree | 1e673daeb106731abbfd4f8095011538a1c31fe8 /modules/gallery | |
parent | 4b01676f323fb280ebaa4c041e6894cbb464d8fe (diff) | |
parent | 33e4a995aa844ebb523ee85a1584ab0386129f7d (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery')
-rw-r--r-- | modules/gallery/config/locale.php | 8 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_installer.php | 10 | ||||
-rw-r--r-- | modules/gallery/libraries/Gallery_View.php | 3 | ||||
-rw-r--r-- | modules/gallery/module.info | 2 |
4 files changed, 15 insertions, 8 deletions
diff --git a/modules/gallery/config/locale.php b/modules/gallery/config/locale.php index 0509e45f..13de9098 100644 --- a/modules/gallery/config/locale.php +++ b/modules/gallery/config/locale.php @@ -29,14 +29,10 @@ $config['language'] = array('en_US', 'English_United States'); /** - * Locale timezone. Defaults to use the server timezone. + * Locale timezone. Set in 'Advanced' settings, falling back to the server's zone. * @see http://php.net/timezones */ -$config['timezone'] = ini_get('date.timezone'); -if (empty($config['timezone'])) { - // This is a required field. Pick something as a default. - $config['timezone'] = "America/Los_Angeles"; -} +$config['timezone'] = module::get_var("gallery", "timezone", date_default_timezone_get()); // i18n settings diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index 20de1fea..83c5ed71 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -311,8 +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_version("gallery", 47); + module::set_version("gallery", 48); } static function upgrade($version) { @@ -683,6 +684,13 @@ class gallery_installer { module::set_var("gallery", "apple_touch_icon_url", "lib/images/apple-touch-icon.png"); module::set_version("gallery", $version = 47); } + + if ($version == 47) { + // 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); + } } static function uninstall() { diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php index 77e3d204..1395686c 100644 --- a/modules/gallery/libraries/Gallery_View.php +++ b/modules/gallery/libraries/Gallery_View.php @@ -136,6 +136,9 @@ class Gallery_View_Core extends View { } unset($this->combine_queue[$type][$group]); + if (empty($this->combine_queue[$type])) { + unset($this->combine_queue[$type]); + } if ($type == "css") { return html::stylesheet("combined/css/$key", "screen,print,projection", true); diff --git a/modules/gallery/module.info b/modules/gallery/module.info index aa1dc341..807d08fd 100644 --- a/modules/gallery/module.info +++ b/modules/gallery/module.info @@ -1,3 +1,3 @@ name = "Gallery 3" description = "Gallery core application" -version = 47 +version = 48 |