diff options
author | Bart Visscher <bartv@thisnet.nl> | 2011-10-01 01:14:09 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2011-10-03 20:42:47 +0200 |
commit | 6159b79715d77b2128934409fcbd81557a67ea37 (patch) | |
tree | 85f02c357ba4fd3acfc111fe5706e100ca0eba5c /apps | |
parent | ffc5c4dabeb6c6db38c48bd4ac3401a585624608 (diff) | |
download | nextcloud-server-6159b79715d77b2128934409fcbd81557a67ea37.tar.gz nextcloud-server-6159b79715d77b2128934409fcbd81557a67ea37.zip |
Take setting default value out of loop
Diffstat (limited to 'apps')
-rw-r--r-- | apps/calendar/templates/part.eventform.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/calendar/templates/part.eventform.php b/apps/calendar/templates/part.eventform.php index 4c34b3e1fcc..8588b9168f7 100644 --- a/apps/calendar/templates/part.eventform.php +++ b/apps/calendar/templates/part.eventform.php @@ -12,8 +12,8 @@ <td> <select id="category" name="categories[]" multiple="multiple" title="<?php echo $l->t("Select category") ?>"> <?php + if (!isset($_['categories'])) {$_['categories'] = array();} foreach($_['category_options'] as $category){ - if (!isset($_['categories'])) {$_['categories'] = array();} echo '<option value="' . $category . '"' . (in_array($category, $_['categories']) ? ' selected="selected"' : '') . '>' . $category . '</option>'; } ?> @@ -22,8 +22,8 @@ <td> <select style="width:140px;" name="calendar"> <?php + if (!isset($_['calendar'])) {$_['calendar'] = false;} foreach($_['calendar_options'] as $calendar){ - if (!isset($_['calendar'])) {$_['calendar'] = false;} echo '<option value="' . $calendar['id'] . '"' . ($_['calendar'] == $calendar['id'] ? ' selected="selected"' : '') . '>' . $calendar['displayname'] . '</option>'; } ?> |