summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2014-12-27 00:15:41 +0100
committerPhilip Häusler <msquare@notrademark.de>2014-12-27 00:15:41 +0100
commit582c429fd4a247433c02b064841580cf1ee78176 (patch)
treec854e1b009e8f031305a47bb06c9faf92422e130
parentf687076507c622ac331b37efbeeacfc914c00f25 (diff)
allow admin to sign up more angels than needed again
-rw-r--r--includes/pages/user_shifts.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php
index 81bc5f54..d3acf2e8 100644
--- a/includes/pages/user_shifts.php
+++ b/includes/pages/user_shifts.php
@@ -251,19 +251,19 @@ function user_shifts() {
WHERE `start` < '" . sql_escape($shift['end']) . "' AND `end` > '" . sql_escape($shift['start']) . "'") > 0) {
error(_("You already subscribed to shift in the same timeslot. Please contact a dispatcher to join the shift."));
redirect(shift_link($shift));
- }
-
- $needed_angeltypes = NeededAngelTypes_by_shift($shift['SID']);
- if ($needed_angeltypes === false)
- engelsystem_error('Unable to load needed angel types.');
- // you canot join if shift is full
- foreach ($needed_angeltypes as $needed_angeltype)
- if ($needed_angeltype['angel_type_id'] == $type_id)
- if ($needed_angeltype['taken'] >= $needed_angeltype['count']) {
- error(_("The shift is already full."));
- redirect(shift_link($shift));
- }
+ $needed_angeltypes = NeededAngelTypes_by_shift($shift['SID']);
+ if ($needed_angeltypes === false)
+ engelsystem_error('Unable to load needed angel types.');
+
+ // you canot join if shift is full
+ foreach ($needed_angeltypes as $needed_angeltype)
+ if ($needed_angeltype['angel_type_id'] == $type_id)
+ if ($needed_angeltype['taken'] >= $needed_angeltype['count']) {
+ error(_("The shift is already full."));
+ redirect(shift_link($shift));
+ }
+ }
if (in_array('user_shifts_admin', $privileges))
$type = sql_select("SELECT * FROM `AngelTypes` WHERE `id`=" . sql_escape($type_id) . " LIMIT 1");