1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 00:37:42 +02:00

[feature/new-tz-handling] Properly name new timezone selection function

Marked the old one as deprecated and made it using the new function.

PHPBB3-9558
This commit is contained in:
Joas Schilling
2012-07-17 16:09:05 +02:00
parent 48d3c68290
commit 3637cd395e
5 changed files with 38 additions and 20 deletions

View File

@@ -1143,13 +1143,26 @@ function phpbb_tz_select_compare($a, $b)
*
* @param string $default A timezone to select
* @param boolean $truncate Shall we truncate the options text
* @param boolean $return_tzs_only Shall we just return the options for the timezone selector,
* or also return the options for the time selector.
*
* @return string/array Returns either the options for timezone selector
* or an array, also containing the options for the time selector.
* @return string Returns the options for timezone selector only
*
* @deprecated
*/
function tz_select($default = '', $truncate = false, $return_tzs_only = true)
function tz_select($default = '', $truncate = false)
{
$timezone_select = phpbb_timezone_select($default, $truncate);
return $timezone_select['tz_select'];
}
/**
* Options to pick a timezone and date/time
*
* @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)
{
global $user;
@@ -1220,11 +1233,6 @@ function tz_select($default = '', $truncate = false, $return_tzs_only = true)
}
$tz_select .= '</optgroup>';
if ($return_tzs_only)
{
return $tz_select;
}
return array(
'tz_select' => $tz_select,
'tz_dates' => $tz_dates,