aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-05-27 05:47:15 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2024-05-27 05:47:15 +0000
commite48767859758c9e12cf464313ca104482d5bec4d (patch)
tree99cbed7c36a63f3561707843be1fa772b4f57e4e
parente82be6c8a2c29fb5c432bd28185a7a366c2771d9 (diff)
fixes #4210
Closes #4210 Merge request studip/studip!3040
-rw-r--r--app/controllers/resources/booking.php2
-rw-r--r--app/views/admin/lockrules/_form.php8
-rw-r--r--app/views/resources/booking/_add_edit_form.php2
3 files changed, 7 insertions, 5 deletions
diff --git a/app/controllers/resources/booking.php b/app/controllers/resources/booking.php
index 45ccb16..a4722ed 100644
--- a/app/controllers/resources/booking.php
+++ b/app/controllers/resources/booking.php
@@ -1352,7 +1352,7 @@ class Resources_BookingController extends AuthenticatedController
$resource,
$time_intervals,
[1, 3],
- ($this->booking->id ? [$this->booking->id] : [])
+ isset($this->booking->id) ? [$this->booking->id] : []
);
$reservations_to_overwrite = array_merge(
$reservations_to_overwrite,
diff --git a/app/views/admin/lockrules/_form.php b/app/views/admin/lockrules/_form.php
index c4ef111..b96c7b6 100644
--- a/app/views/admin/lockrules/_form.php
+++ b/app/views/admin/lockrules/_form.php
@@ -85,12 +85,14 @@ use Studip\Button;
</td>
<td>
<input type="radio"
- name="lockdata_attributes[<?= $attr ?>]" <?= ($lock_rule['attributes'][$attr] ? 'checked' : '') ?>
- value="1"/>
+ name="lockdata_attributes[<?= $attr ?>]"
+ <?= !empty($lock_rule['attributes'][$attr]) ? 'checked' : '' ?>
+ value="1">
</td>
<td>
<input type="radio"
- name="lockdata_attributes[<?= $attr ?>]" <?= (!$lock_rule['attributes'][$attr] ? 'checked' : '') ?>
+ name="lockdata_attributes[<?= $attr ?>]"
+ <?= empty($lock_rule['attributes'][$attr]) ? 'checked' : '' ?>
value="0"/>
</td>
</tr>
diff --git a/app/views/resources/booking/_add_edit_form.php b/app/views/resources/booking/_add_edit_form.php
index 571ff63..f982c37 100644
--- a/app/views/resources/booking/_add_edit_form.php
+++ b/app/views/resources/booking/_add_edit_form.php
@@ -537,7 +537,7 @@
<label>
<input type="checkbox" value="1"
name="overwrite_bookings"
- <?= $overwrite_bookings ? 'checked="checked"' : '' ?>>
+ <?= !empty($overwrite_bookings) ? 'checked' : '' ?>>
<?= _('Vorhandene Buchungen überschreiben') ?>
</label>
</fieldset>