From c1718a29adfc7165908d488e0c16a54247063c18 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 4 Aug 2011 11:04:19 +0000 Subject: [PATCH] for readonly version we only need to fetch given timezone, automatic conversion from id --- etemplate/inc/class.select_widget.inc.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.select_widget.inc.php b/etemplate/inc/class.select_widget.inc.php index 28003fcad0..22df511ecf 100644 --- a/etemplate/inc/class.select_widget.inc.php +++ b/etemplate/inc/class.select_widget.inc.php @@ -466,7 +466,18 @@ class select_widget break; case 'select-timezone': // options: #rows,$type - $cell['sel_options'] = $type ? egw_time::getTimezones() : egw_time::getUserTimezones($value); + if (is_numeric($value)) + { + $value = calendar_timezones::id2tz($value); + } + if ($readonly) // for readonly we dont need to fetch all TZ's + { + $cell['sel_options'][$value] = calendar_timezones::tz2id($value,'name'); + } + else + { + $cell['sel_options'] = $type ? egw_time::getTimezones() : egw_time::getUserTimezones($value); + } break; } if ($rows > 1)