1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-22 19:07:27 +01:00

[feature/new-tz-handling] Fix displaying of "All times are" string

PHPBB3-9558
This commit is contained in:
Joas Schilling 2012-06-04 19:19:34 +02:00
parent 50936cb2ef
commit 00b5e5345d
2 changed files with 10 additions and 2 deletions

View File

@ -4769,6 +4769,14 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
}
}
$dt = new phpbb_datetime('now', $user->tz);
$timezone_offset = 'GMT' . phpbb_format_timezone_offset($dt->getOffset());
$timezone_name = $user->tz->getName();
if (isset($user->lang['timezones'][$timezone_name]))
{
$timezone_name = $user->lang['timezones'][$timezone_name];
}
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
'SITENAME' => $config['sitename'],
@ -4836,7 +4844,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'S_CONTENT_FLOW_BEGIN' => ($user->lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
'S_CONTENT_FLOW_END' => ($user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left',
'S_CONTENT_ENCODING' => 'UTF-8',
'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], ''),
'S_TIMEZONE' => sprintf($user->lang['ALL_TIMES'], $timezone_offset, $timezone_name),
'S_DISPLAY_ONLINE_LIST' => ($l_online_time) ? 1 : 0,
'S_DISPLAY_SEARCH' => (!$config['load_search']) ? 0 : (isset($auth) ? ($auth->acl_get('u_search') && $auth->acl_getf_global('f_search')) : 1),
'S_DISPLAY_PM' => ($config['allow_privmsg'] && !empty($user->data['is_registered']) && ($auth->acl_get('u_readpm') || $auth->acl_get('u_sendpm'))) ? true : false,

View File

@ -74,7 +74,7 @@ $lang = array_merge($lang, array(
'ALL_FORUMS' => 'All forums',
'ALL_MESSAGES' => 'All messages',
'ALL_POSTS' => 'All posts',
'ALL_TIMES' => 'All times are %1$s %2$s',
'ALL_TIMES' => 'All times are <abbr title="%2$s">%1$s</abbr>',
'ALL_TOPICS' => 'All Topics',
'AND' => 'And',
'ARE_WATCHING_FORUM' => 'You have subscribed to be notified of new posts in this forum.',