1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 15:16:16 +02:00

[ticket/12858] Directly return and use timezone selects

PHPBB3-12858
This commit is contained in:
Marc Alexander 2014-09-17 19:07:24 +02:00
parent 9c310f789f
commit f4761b5e08
5 changed files with 5 additions and 9 deletions

View File

@ -907,9 +907,8 @@ class acp_board
global $template, $user; global $template, $user;
$timezone_select = phpbb_timezone_select($template, $user, $value, true); $timezone_select = phpbb_timezone_select($template, $user, $value, true);
$timezone_select['tz_select'];
return '<select name="config[' . $key . ']" id="' . $key . '">' . $timezone_select['tz_select'] . '</select>'; return '<select name="config[' . $key . ']" id="' . $key . '">' . $timezone_select . '</select>';
} }
/** /**

View File

@ -1661,7 +1661,7 @@ class acp_users
${'s_sort_' . $sort_option . '_dir'} .= '</select>'; ${'s_sort_' . $sort_option . '_dir'} .= '</select>';
} }
$timezone_selects = phpbb_timezone_select($template, $user, $data['tz'], true); phpbb_timezone_select($template, $user, $data['tz'], true);
$user_prefs_data = array( $user_prefs_data = array(
'S_PREFS' => true, 'S_PREFS' => true,
'S_JABBER_DISABLED' => ($config['jab_enable'] && $user_row['user_jabber'] && @extension_loaded('xml')) ? false : true, 'S_JABBER_DISABLED' => ($config['jab_enable'] && $user_row['user_jabber'] && @extension_loaded('xml')) ? false : true,

View File

@ -1132,9 +1132,7 @@ function phpbb_timezone_select($template, $user, $default = '', $truncate = fals
} }
$tz_select .= '</optgroup>'; $tz_select .= '</optgroup>';
return array( return $tz_select;
'tz_select' => $tz_select,
);
} }
// Functions handling topic/post tracking/marking // Functions handling topic/post tracking/marking

View File

@ -135,8 +135,7 @@ function tz_select($default = '', $truncate = false)
{ {
global $template, $user; global $template, $user;
$timezone_select = phpbb_timezone_select($template, $user, $default, $truncate); return phpbb_timezone_select($template, $user, $default, $truncate);
return $timezone_select['tz_select'];
} }
/** /**

View File

@ -154,7 +154,7 @@ class ucp_prefs
} }
$dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>'; $dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
$timezone_selects = phpbb_timezone_select($template, $user, $data['tz'], true); phpbb_timezone_select($template, $user, $data['tz'], true);
// check if there are any user-selectable languages // check if there are any user-selectable languages
$sql = 'SELECT COUNT(lang_id) as languages_count $sql = 'SELECT COUNT(lang_id) as languages_count