summaryrefslogtreecommitdiff
path: root/modules/gallery/config
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-05-05 14:52:47 -0700
committerBharat Mediratta <bharat@menalto.com>2011-05-05 14:52:47 -0700
commit5bae21864f54a03b557ab349cf97ba5f1d4276dc (patch)
treef2952563a8dd0334c0a1184b71b92fc4b60e29e6 /modules/gallery/config
parent05ecfda36b7acee7f8d36df8391ba960097178a8 (diff)
Follow-on to 6f916e49d5b431c2c1961a13d1a61fef8c02d628 -- don't make
database calls if Gallery isn't installed, else we fail to bounce the user to the installer on fresh packages. #1637.
Diffstat (limited to 'modules/gallery/config')
-rw-r--r--modules/gallery/config/locale.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/gallery/config/locale.php b/modules/gallery/config/locale.php
index 13de9098..bce7fb49 100644
--- a/modules/gallery/config/locale.php
+++ b/modules/gallery/config/locale.php
@@ -32,7 +32,12 @@ $config['language'] = array('en_US', 'English_United States');
* Locale timezone. Set in 'Advanced' settings, falling back to the server's zone.
* @see http://php.net/timezones
*/
-$config['timezone'] = module::get_var("gallery", "timezone", date_default_timezone_get());
+if (file_exists(VARPATH . "database.php")) {
+ $config['timezone'] = module::get_var("gallery", "timezone", date_default_timezone_get());
+} else {
+ // Gallery3 is not installed yet -- don't make module::get_var() calls.
+ $config['timezone'] = date_default_timezone_get();
+}
// i18n settings