diff options
author | Bart Visscher <bartv@thisnet.nl> | 2011-10-06 11:14:07 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2011-10-06 13:22:36 +0200 |
commit | c28f1e0276bef100b88b4df0bd8f2a0d7d888314 (patch) | |
tree | 9160adc3dabe20632d8f9c3306f44e890e7a125f /apps/calendar/templates | |
parent | bf017fb4bdae355675d5b81755ed0c738cf58d2e (diff) | |
download | nextcloud-server-c28f1e0276bef100b88b4df0bd8f2a0d7d888314.tar.gz nextcloud-server-c28f1e0276bef100b88b4df0bd8f2a0d7d888314.zip |
Implement timezone fix from Stephen Rees-Carter
Diffstat (limited to 'apps/calendar/templates')
-rw-r--r-- | apps/calendar/templates/settings.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/apps/calendar/templates/settings.php b/apps/calendar/templates/settings.php index 19a1a543b46..913e54dd8fc 100644 --- a/apps/calendar/templates/settings.php +++ b/apps/calendar/templates/settings.php @@ -16,16 +16,18 @@ OC_UTIL::addStyle('', 'jquery.multiselect'); <?php $continent = ''; foreach($_['timezones'] as $timezone): - if ( preg_match( '/^(America|Antartica|Arctic|Asia|Atlantic|Europe|Indian|Pacific)\//', $timezone ) ): - $ex=explode('/', $timezone, 2);//obtain continent,city - if ($continent!=$ex[0]): - if ($continent!="") echo '</optgroup>'; - echo '<optgroup label="'.$ex[0].'">'; - endif; - $city=$ex[1]; - $continent=$ex[0]; - echo '<option value="'.$timezone.'"'.($_['timezone'] == $timezone?' selected="selected"':'').'>'.$city.'</option>'; + $ex=explode('/', $timezone, 2);//obtain continent,city + if (!isset($ex[1])) { + $ex[1] = $ex[0]; + $ex[0] = "Other"; + } + if ($continent!=$ex[0]): + if ($continent!="") echo '</optgroup>'; + echo '<optgroup label="'.$ex[0].'">'; endif; + $city=$ex[1]; + $continent=$ex[0]; + echo '<option value="'.$timezone.'"'.($_['timezone'] == $timezone?' selected="selected"':'').'>'.$city.'</option>'; endforeach;?> </select></td></tr> |