summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2013-12-27 18:45:27 +0100
committerPhilip Häusler <msquare@notrademark.de>2013-12-27 18:45:27 +0100
commitc589219a962203ddb2a8b3899f964ca5ae5209ef (patch)
treeee8c01d5a839c4bd15365868851562e5d35e897c /public
parent2c41fcdc0902279fd5c651a7ba08dbe7ba02d94b (diff)
freeloader feature
Diffstat (limited to 'public')
-rw-r--r--public/index.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/public/index.php b/public/index.php
index b8c2b139..346e7cf7 100644
--- a/public/index.php
+++ b/public/index.php
@@ -196,6 +196,10 @@ if (isset($_REQUEST['p']) && preg_match("/^[a-z0-9_]*$/i", $_REQUEST['p']) && (i
}
if (isset($user)) {
+ $freeloaded_shifts_count = count(ShiftEntries_freeloaded_by_user($user));
+ if($freeloaded_shifts_count >= $max_freeloadable_shifts)
+ $content = error(sprintf(_("You freeloaded %s shifts. Shift signup is locked. Please go to heavens desk to be unlocked again."), $freeloaded_shifts_count), true) . $content;
+
// Hinweis für ungelesene Nachrichten
if ($p != "user_messages")
$content = user_unread_messages() . $content;