From 5bae21864f54a03b557ab349cf97ba5f1d4276dc Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 5 May 2011 14:52:47 -0700 Subject: 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. --- modules/gallery/config/locale.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules') 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 -- cgit v1.2.3