mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Maybe we shouldn't trust the language settings in the db so much.
git-svn-id: file:///svn/phpbb/trunk@7790 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
5aa220bcd2
commit
b83b1c7542
5 changed files with 7 additions and 6 deletions
|
@ -296,6 +296,7 @@ p a {
|
|||
<li>[Fix] Only convert non-orphaned PMs</li>
|
||||
<li>[Fix] Fixed a few Postgres related errors (Bug #12587)</li>
|
||||
<li>[Feature] New DBAL wrapper for LIKE expressions / sql_like_expression()</li>
|
||||
<li>[Sec] Stricter validation of language entries. </li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class acp_board
|
|||
'site_desc' => array('lang' => 'SITE_DESC', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
|
||||
'board_disable' => array('lang' => 'DISABLE_BOARD', 'validate' => 'bool', 'type' => 'custom', 'method' => 'board_disable', 'explain' => true),
|
||||
'board_disable_msg' => false,
|
||||
'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'validate' => 'string', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
|
||||
'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'validate' => 'lang', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
|
||||
'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'validate' => 'string', 'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true),
|
||||
'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'validate' => 'string', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => false),
|
||||
'board_dst' => array('lang' => 'SYSTEM_DST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
|
|
|
@ -1149,7 +1149,7 @@ class acp_users
|
|||
|
||||
$data = array(
|
||||
'dateformat' => request_var('dateformat', $user_row['user_dateformat'], true),
|
||||
'lang' => request_var('lang', $user_row['user_lang']),
|
||||
'lang' => basename(request_var('lang', $user_row['user_lang'])),
|
||||
'tz' => request_var('tz', (float) $user_row['user_timezone']),
|
||||
'style' => request_var('style', $user_row['user_style']),
|
||||
'dst' => request_var('dst', $user_row['user_dst']),
|
||||
|
|
|
@ -1206,7 +1206,7 @@ class user extends session
|
|||
if ($this->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
$this->lang_name = (file_exists($phpbb_root_path . 'language/' . $this->data['user_lang'] . "/common.$phpEx")) ? $this->data['user_lang'] : $config['default_lang'];
|
||||
$this->lang_path = $phpbb_root_path . 'language/' . $this->lang_name . '/';
|
||||
$this->lang_path = $phpbb_root_path . 'language/' . basename($this->lang_name) . '/';
|
||||
|
||||
$this->date_format = $this->data['user_dateformat'];
|
||||
$this->timezone = $this->data['user_timezone'] * 3600;
|
||||
|
@ -1215,7 +1215,7 @@ class user extends session
|
|||
else
|
||||
{
|
||||
$this->lang_name = $config['default_lang'];
|
||||
$this->lang_path = $phpbb_root_path . 'language/' . $this->lang_name . '/';
|
||||
$this->lang_path = $phpbb_root_path . 'language/' . basename($this->lang_name) . '/';
|
||||
$this->date_format = $config['default_dateformat'];
|
||||
$this->timezone = $config['board_timezone'] * 3600;
|
||||
$this->dst = $config['board_dst'] * 3600;
|
||||
|
@ -1616,7 +1616,7 @@ class user extends session
|
|||
{
|
||||
global $phpbb_root_path, $config;
|
||||
|
||||
$this->lang_path = $phpbb_root_path . 'language/' . $config['default_lang'] . '/';
|
||||
$this->lang_path = $phpbb_root_path . 'language/' . basename($config['default_lang']) . '/';
|
||||
}
|
||||
|
||||
// $lang == $this->lang
|
||||
|
|
|
@ -32,7 +32,7 @@ class ucp_prefs
|
|||
$data = array(
|
||||
'notifymethod' => request_var('notifymethod', $user->data['user_notify_type']),
|
||||
'dateformat' => request_var('dateformat', $user->data['user_dateformat'], true),
|
||||
'lang' => request_var('lang', $user->data['user_lang']),
|
||||
'lang' => basename(request_var('lang', $user->data['user_lang'])),
|
||||
'style' => request_var('style', (int) $user->data['user_style']),
|
||||
'tz' => request_var('tz', (float) $user->data['user_timezone']),
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue