aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-07-19 17:41:27 +0200
committerJoas Schilling <nickvergessen@gmx.de>2012-07-19 17:41:27 +0200
commit7df1c84447903ecc97a8418339ec6933bdfc9035 (patch)
tree49a4ca4338b2ff5a8bbda518eac236c1af87e043 /phpBB/includes/functions.php
parent5b7884907c7b6e24689f826f90fc5f10cb968118 (diff)
downloadforums-7df1c84447903ecc97a8418339ec6933bdfc9035.tar
forums-7df1c84447903ecc97a8418339ec6933bdfc9035.tar.gz
forums-7df1c84447903ecc97a8418339ec6933bdfc9035.tar.bz2
forums-7df1c84447903ecc97a8418339ec6933bdfc9035.tar.xz
forums-7df1c84447903ecc97a8418339ec6933bdfc9035.zip
[feature/new-tz-handling] Don't use global user but make it a parameter
PHPBB3-9558
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 98465ca462..0b71ea3484 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1184,22 +1184,23 @@ function phpbb_get_timezone_identifiers($selected_timezone)
*/
function tz_select($default = '', $truncate = false)
{
- $timezone_select = phpbb_timezone_select($default, $truncate);
+ global $user;
+
+ $timezone_select = phpbb_timezone_select($user, $default, $truncate);
return $timezone_select['tz_select'];
}
/**
* Options to pick a timezone and date/time
*
+* @param phpbb_user $user Object of the current user
* @param string $default A timezone to select
* @param boolean $truncate Shall we truncate the options text
*
* @return array Returns an array, also containing the options for the time selector.
*/
-function phpbb_timezone_select($default = '', $truncate = false)
+function phpbb_timezone_select($user, $default = '', $truncate = false)
{
- global $user;
-
static $timezones;
$default_offset = '';