allow admin to sign up more angels than needed again

This commit is contained in:
Philip Häusler 2014-12-27 00:15:41 +01:00
parent f687076507
commit 582c429fd4
1 changed files with 12 additions and 12 deletions

View File

@ -251,7 +251,6 @@ function user_shifts() {
WHERE `start` < '" . sql_escape($shift['end']) . "' AND `end` > '" . sql_escape($shift['start']) . "'") > 0) { 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.")); error(_("You already subscribed to shift in the same timeslot. Please contact a dispatcher to join the shift."));
redirect(shift_link($shift)); redirect(shift_link($shift));
}
$needed_angeltypes = NeededAngelTypes_by_shift($shift['SID']); $needed_angeltypes = NeededAngelTypes_by_shift($shift['SID']);
if ($needed_angeltypes === false) if ($needed_angeltypes === false)
@ -264,6 +263,7 @@ function user_shifts() {
error(_("The shift is already full.")); error(_("The shift is already full."));
redirect(shift_link($shift)); redirect(shift_link($shift));
} }
}
if (in_array('user_shifts_admin', $privileges)) if (in_array('user_shifts_admin', $privileges))
$type = sql_select("SELECT * FROM `AngelTypes` WHERE `id`=" . sql_escape($type_id) . " LIMIT 1"); $type = sql_select("SELECT * FROM `AngelTypes` WHERE `id`=" . sql_escape($type_id) . " LIMIT 1");