mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Make the UTF tools available - recent changes require them in the install and they are likely to be needed in conversion as well
Fix some broken redirects Change the structure of language packs we scan for. (language packs should be named in the form xx-yy - all lowercase with hyphens as the separator) git-svn-id: file:///svn/phpbb/trunk@6461 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
17f25374ad
commit
d7545025c3
2 changed files with 10 additions and 9 deletions
|
@ -110,17 +110,18 @@ include($phpbb_root_path . 'includes/template.' . $phpEx);
|
|||
include($phpbb_root_path . 'includes/acm/acm_file.' . $phpEx);
|
||||
include($phpbb_root_path . 'includes/cache.' . $phpEx);
|
||||
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
||||
|
||||
// Try and load an appropriate language if required
|
||||
$language = request_var('language', '');
|
||||
|
||||
if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$language)
|
||||
{
|
||||
$accept_lang_ary = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
$accept_lang_ary = explode(',', strtolower($_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));
|
||||
// Set correct format ... guess full xx-yy form
|
||||
$accept_lang = substr($accept_lang, 0, 2) . '-' . substr($accept_lang, 3, 2);
|
||||
|
||||
if (file_exists($phpbb_root_path . 'language/' . $accept_lang))
|
||||
{
|
||||
|
@ -129,7 +130,7 @@ if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$language)
|
|||
}
|
||||
else
|
||||
{
|
||||
// No match on xx_YY so try xx
|
||||
// No match on xx-yy so try xx
|
||||
$accept_lang = substr($accept_lang, 0, 2);
|
||||
if (file_exists($phpbb_root_path . 'language/' . $accept_lang))
|
||||
{
|
||||
|
@ -319,11 +320,11 @@ class module
|
|||
'PAGE_TITLE' => $this->get_page_title(),
|
||||
'T_IMAGE_PATH' => $phpbb_root_path . 'adm/images/',
|
||||
|
||||
'S_USER_LANG' => $language,
|
||||
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
|
||||
'S_CONTENT_ENCODING' => 'UTF-8',
|
||||
'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
|
||||
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
|
||||
'S_USER_LANG' => $language,
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -553,7 +553,7 @@ class install_install extends module
|
|||
{
|
||||
// Someone's been silly and tried calling this page direct
|
||||
// So we send them back to the start to do it again properly
|
||||
$this->p_master->redirect("index?mode=install");
|
||||
$this->p_master->redirect("index.$phpEx?mode=install");
|
||||
}
|
||||
|
||||
$s_hidden_fields = ($img_imagick) ? '<input type="hidden" name="img_imagick" value="' . addslashes($img_imagick) . '" />' : '';
|
||||
|
@ -725,7 +725,7 @@ class install_install extends module
|
|||
{
|
||||
// Someone's been silly and tried calling this page direct
|
||||
// So we send them back to the start to do it again properly
|
||||
$this->p_master->redirect("index?mode=install");
|
||||
$this->p_master->redirect("index.$phpEx?mode=install");
|
||||
}
|
||||
|
||||
$s_hidden_fields = ($img_imagick) ? '<input type="hidden" name="img_imagick" value="' . addslashes($img_imagick) . '" />' : '';
|
||||
|
@ -880,7 +880,7 @@ class install_install extends module
|
|||
{
|
||||
// Someone's been silly and tried calling this page direct
|
||||
// So we send them back to the start to do it again properly
|
||||
$this->p_master->redirect("index?mode=install");
|
||||
$this->p_master->redirect("index.$phpEx?mode=install");
|
||||
}
|
||||
|
||||
$s_hidden_fields = ($img_imagick) ? '<input type="hidden" name="img_imagick" value="' . addslashes($img_imagick) . '" />' : '';
|
||||
|
@ -964,7 +964,7 @@ class install_install extends module
|
|||
{
|
||||
// Someone's been silly and tried calling this page direct
|
||||
// So we send them back to the start to do it again properly
|
||||
$this->p_master->redirect("index?mode=install");
|
||||
$this->p_master->redirect("index.$phpEx?mode=install");
|
||||
}
|
||||
|
||||
$cookie_domain = ($server_name != '') ? $server_name : (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME');
|
||||
|
|
Loading…
Add table
Reference in a new issue