summaryrefslogtreecommitdiff
path: root/includes/controller/shift_entries_controller.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-11-12 23:00:46 +0100
committermsquare <msquare@notrademark.de>2016-11-12 23:00:46 +0100
commit1a3b4e2a334c57cc403be1d8e21fd8e162d9df5c (patch)
treebd61f7ab438d50a57ccb34866022aab13d4fdfcb /includes/controller/shift_entries_controller.php
parent106a6788086f9be3ef6d30d1844f512fcbf22e23 (diff)
redone shift coloring and shift signup state
Diffstat (limited to 'includes/controller/shift_entries_controller.php')
-rw-r--r--includes/controller/shift_entries_controller.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/controller/shift_entries_controller.php b/includes/controller/shift_entries_controller.php
index 9e252a4f..1b1a4d02 100644
--- a/includes/controller/shift_entries_controller.php
+++ b/includes/controller/shift_entries_controller.php
@@ -42,8 +42,9 @@ function shift_entry_add_controller() {
}
$type = $type[0];
- if (! Shift_signup_allowed($shift, $type)) {
- error(_('You are not allowed to sign up for this shift. Maybe shift is full or already running.'));
+ $shift_signup_allowed = Shift_signup_allowed(User($user_id), $shift, $type);
+ if (! $shift_signup_allowed->isSignupAllowed()) {
+ error(_("You are not allowed to sign up for this shift. Maybe shift is full or already running."));
redirect(shift_link($shift));
}