1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 10:16:36 +02:00

The same way we allow defining a custom template/style path we now allow this for languages too.

This will allow applications to define their own language folder for certain parts for example.
Callable by $user->set_custom_lang_path({new_path})


git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8782 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2008-08-23 17:20:55 +00:00
parent 6c763cd8b6
commit d7fa3f83ce
6 changed files with 63 additions and 43 deletions

View File

@@ -43,7 +43,7 @@ class ucp_register
$submit = (isset($_POST['submit'])) ? true : false;
$change_lang = request_var('change_lang', '');
$user_lang = request_var('lang', $user->lang_name);
if ($agreed)
{
add_form_key('ucp_register');
@@ -58,7 +58,7 @@ class ucp_register
{
$use_lang = ($change_lang) ? basename($change_lang) : basename($user_lang);
if (file_exists($phpbb_root_path . 'language/' . $use_lang . '/'))
if (file_exists($user->lang_path . $use_lang . '/'))
{
if ($change_lang)
{
@@ -69,7 +69,6 @@ class ucp_register
}
$user->lang_name = $lang = $use_lang;
$user->lang_path = $phpbb_root_path . 'language/' . $lang . '/';
$user->lang = array();
$user->add_lang(array('common', 'ucp'));
}
@@ -471,7 +470,7 @@ class ucp_register
if (!$change_lang || !$confirm_id)
{
$user->confirm_gc(CONFIRM_REG);
$sql = 'SELECT COUNT(session_id) AS attempts
FROM ' . CONFIRM_TABLE . "
WHERE session_id = '" . $db->sql_escape($user->session_id) . "'