diff options
| -rw-r--r-- | .build_number | 2 | ||||
| -rw-r--r-- | installer/installer.php | 10 | ||||
| -rw-r--r-- | modules/gallery/config/locale.php | 7 |
3 files changed, 15 insertions, 4 deletions
diff --git a/.build_number b/.build_number index 33f98732..d03d7173 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=148 +build_number=150 diff --git a/installer/installer.php b/installer/installer.php index c23d918f..0bef57ae 100644 --- a/installer/installer.php +++ b/installer/installer.php @@ -191,8 +191,10 @@ class installer { $errors[] = "Gallery 3 requires a MySQL database, but PHP doesn't have either the <a href=\"http://php.net/mysql\">MySQL</a> or the <a href=\"http://php.net/mysqli\">MySQLi</a> extension."; } - if (!@preg_match("/^.$/u", utf8_encode("\xF1"))) { - $errors[] = "PHP is missing <a href=\"http://php.net/pcre\">Perl-Compatible Regular Expression</a> support."; + if (!preg_match("/^.$/u", "ñ")) { + $errors[] = "PHP is missing <a href=\"http://php.net/pcre\">Perl-Compatible Regular Expression</a> with UTF-8 support."; + } else if (!preg_match("/^\pL$/u", "ñ")) { + $errors[] = "PHP is missing <a href=\"http://php.net/pcre\">Perl-Compatible Regular Expression</a> with Unicode support."; } if (!(function_exists("spl_autoload_register"))) { @@ -211,6 +213,10 @@ class installer { $errors[] = "PHP is missing the <a href=\"http://php.net/iconv\">iconv extension</a>"; } + if (!(extension_loaded("xml"))) { + $errors[] = "PHP is missing the <a href=\"http://php.net/xml\">XML Parser extension</a>"; + } + if (!(extension_loaded("simplexml"))) { $errors[] = "PHP is missing the <a href=\"http://php.net/simplexml\">SimpleXML extension</a>"; } 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 |
