summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2015-08-13 11:22:25 +0200
committerPhilip Häusler <msquare@notrademark.de>2015-08-13 11:22:25 +0200
commit723961c19e030903a0fb863a95cd5a0a0520d89f (patch)
tree130edffc95338ec561d7228241a9042592fb55a9 /includes
parentdf526fa2bfa378000ec41f3984dc0d56bbd7172f (diff)
User shift admins see free and occupied shifts by default
Diffstat (limited to 'includes')
-rw-r--r--includes/pages/user_shifts.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php
index eb74d640..c330fc45 100644
--- a/includes/pages/user_shifts.php
+++ b/includes/pages/user_shifts.php
@@ -371,9 +371,13 @@ function view_user_shifts() {
$_SESSION['user_shifts'] = array();
if (! isset($_SESSION['user_shifts']['filled'])) {
- $_SESSION['user_shifts']['filled'] = array(
+ // User shift admins see free and occupied shifts by default
+ $_SESSION['user_shifts']['filled'] = in_array('user_shifts_admin', $privileges) ? [
+ 0,
+ 1
+ ] : [
0
- );
+ ];
}
foreach (array(