mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Merge pull request #10 from torrentpier/fix-user_lang-locale
Add check lang
This commit is contained in:
commit
494d9b24fb
@ -269,7 +269,7 @@ else
|
||||
{
|
||||
// Generate frameset
|
||||
$template->assign_vars(array(
|
||||
'CONTENT_ENCODING' => $bb_cfg['lang'][$userdata['user_lang']]['encoding'],
|
||||
'CONTENT_ENCODING' => isset($bb_cfg['lang'][$userdata['user_lang']]['encoding']) ? $bb_cfg['lang'][$userdata['user_lang']]['encoding'] : 'utf-8',
|
||||
'TPL_ADMIN_FRAMESET' => true,
|
||||
));
|
||||
send_no_cache_headers();
|
||||
|
@ -110,7 +110,7 @@ $template->assign_vars(array(
|
||||
// The following assigns all _common_ variables that may be used at any point in a template
|
||||
$template->assign_vars(array(
|
||||
'SIMPLE_HEADER' => !empty($gen_simple_header),
|
||||
'CONTENT_ENCODING' => $bb_cfg['lang'][$userdata['user_lang']]['encoding'],
|
||||
'CONTENT_ENCODING' => isset($bb_cfg['lang'][$userdata['user_lang']]['encoding']) ? $bb_cfg['lang'][$userdata['user_lang']]['encoding'] : 'utf-8',
|
||||
|
||||
'IN_ADMIN' => defined('IN_ADMIN'),
|
||||
'SHOW_ADS' => (!$logged_in || isset($bb_cfg['show_ads_users'][$user->id]) || (!IS_AM && $user->show_ads)),
|
||||
|
@ -595,7 +595,7 @@ class user_common
|
||||
if (!defined('LANG_DIR')) define('LANG_DIR', DEFAULT_LANG_DIR);
|
||||
|
||||
require(LANG_DIR .'main.php');
|
||||
setlocale(LC_ALL, $bb_cfg['lang'][$this->data['user_lang']]['locale']);
|
||||
setlocale(LC_ALL, isset($bb_cfg['lang'][$this->data['user_lang']]['locale']) ? $bb_cfg['lang'][$this->data['user_lang']]['locale'] : 'en_US.UTF-8');
|
||||
|
||||
$theme = setup_style();
|
||||
$DeltaTime = new Date_Delta();
|
||||
|
Loading…
Reference in New Issue
Block a user