diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-04-14 15:10:51 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-04-14 15:10:51 +0000 |
commit | 0562395c27cd6cafcaacd3798f6a51d8cc703c7a (patch) | |
tree | 1551918557e4038bd21137cf9fad11b10cbfba3c /phpBB/install/index.php | |
parent | 8017db012b5249f2ed69e78629dc30772ffc6d24 (diff) | |
download | forums-0562395c27cd6cafcaacd3798f6a51d8cc703c7a.tar forums-0562395c27cd6cafcaacd3798f6a51d8cc703c7a.tar.gz forums-0562395c27cd6cafcaacd3798f6a51d8cc703c7a.tar.bz2 forums-0562395c27cd6cafcaacd3798f6a51d8cc703c7a.tar.xz forums-0562395c27cd6cafcaacd3798f6a51d8cc703c7a.zip |
fixing a bug within the installer (displaying notices) and making sure the installer is using the error handler.
git-svn-id: file:///svn/phpbb/trunk@5783 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/index.php')
-rwxr-xr-x | phpBB/install/index.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/phpBB/install/index.php b/phpBB/install/index.php index d888af955b..5fda7beba9 100755 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -74,13 +74,15 @@ define('STRIP', (get_magic_quotes_gpc()) ? true : false); // Try and load an appropriate language if required $language = request_var('language', ''); -if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && $language == '') + +if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$language) { $accept_lang_ary = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); foreach ($accept_lang_ary as $accept_lang) { // Set correct format ... guess full xx_YY form $accept_lang = substr($accept_lang, 0, 2) . '_' . strtoupper(substr($accept_lang, 3, 2)); + if (file_exists($phpbb_root_path . 'language/' . $accept_lang)) { $language = $accept_lang; @@ -101,7 +103,7 @@ if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && $language == '') // No appropriate language found ... so let's use the first one in the language // dir, this may or may not be English -if ($language == '') +if (!$language) { $dir = @opendir($phpbb_root_path . 'language'); while (($file = readdir($dir)) !== false) @@ -126,6 +128,9 @@ include($phpbb_root_path . 'language/' . $language . '/posting.'.$phpEx); $mode = request_var('mode', 'overview'); $sub = request_var('sub', ''); +// Set PHP error handler to ours +set_error_handler('msg_handler'); + $user = new user(); $auth = new auth(); $cache = new cache(); |