mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
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
This commit is contained in:
parent
8017db012b
commit
0562395c27
2 changed files with 9 additions and 4 deletions
|
@ -69,7 +69,7 @@ class template
|
||||||
|
|
||||||
if (file_exists($phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template'))
|
if (file_exists($phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template'))
|
||||||
{
|
{
|
||||||
$this->root = $phpbb_root_path . 'styles/' . $user->theme['template_path']. '/template';
|
$this->root = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template';
|
||||||
$this->cachepath = $phpbb_root_path . 'cache/tpl_' . $user->theme['template_path'] . '_';
|
$this->cachepath = $phpbb_root_path . 'cache/tpl_' . $user->theme['template_path'] . '_';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ class template
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->theme['template_storedb'])
|
if (isset($user->theme['template_storedb']) && $user->theme['template_storedb'])
|
||||||
{
|
{
|
||||||
$sql = 'SELECT * FROM ' . STYLES_TPLDATA_TABLE . '
|
$sql = 'SELECT * FROM ' . STYLES_TPLDATA_TABLE . '
|
||||||
WHERE template_id = ' . $user->theme['template_id'] . "
|
WHERE template_id = ' . $user->theme['template_id'] . "
|
||||||
|
|
|
@ -74,13 +74,15 @@ define('STRIP', (get_magic_quotes_gpc()) ? true : false);
|
||||||
|
|
||||||
// Try and load an appropriate language if required
|
// Try and load an appropriate language if required
|
||||||
$language = request_var('language', '');
|
$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']);
|
$accept_lang_ary = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||||
foreach ($accept_lang_ary as $accept_lang)
|
foreach ($accept_lang_ary as $accept_lang)
|
||||||
{
|
{
|
||||||
// Set correct format ... guess full xx_YY form
|
// Set correct format ... guess full xx_YY form
|
||||||
$accept_lang = substr($accept_lang, 0, 2) . '_' . strtoupper(substr($accept_lang, 3, 2));
|
$accept_lang = substr($accept_lang, 0, 2) . '_' . strtoupper(substr($accept_lang, 3, 2));
|
||||||
|
|
||||||
if (file_exists($phpbb_root_path . 'language/' . $accept_lang))
|
if (file_exists($phpbb_root_path . 'language/' . $accept_lang))
|
||||||
{
|
{
|
||||||
$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
|
// No appropriate language found ... so let's use the first one in the language
|
||||||
// dir, this may or may not be English
|
// dir, this may or may not be English
|
||||||
if ($language == '')
|
if (!$language)
|
||||||
{
|
{
|
||||||
$dir = @opendir($phpbb_root_path . 'language');
|
$dir = @opendir($phpbb_root_path . 'language');
|
||||||
while (($file = readdir($dir)) !== false)
|
while (($file = readdir($dir)) !== false)
|
||||||
|
@ -126,6 +128,9 @@ include($phpbb_root_path . 'language/' . $language . '/posting.'.$phpEx);
|
||||||
$mode = request_var('mode', 'overview');
|
$mode = request_var('mode', 'overview');
|
||||||
$sub = request_var('sub', '');
|
$sub = request_var('sub', '');
|
||||||
|
|
||||||
|
// Set PHP error handler to ours
|
||||||
|
set_error_handler('msg_handler');
|
||||||
|
|
||||||
$user = new user();
|
$user = new user();
|
||||||
$auth = new auth();
|
$auth = new auth();
|
||||||
$cache = new cache();
|
$cache = new cache();
|
||||||
|
|
Loading…
Add table
Reference in a new issue