summaryrefslogtreecommitdiff
path: root/includes/controller
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2014-12-16 09:25:36 +0100
committerPhilip Häusler <msquare@notrademark.de>2014-12-17 14:59:41 +0100
commitc8cc46886b4a163f9408df80c3bfbdcfa4ae2f7b (patch)
tree109544b122e6a2032a413633b78e5a40baa422e5 /includes/controller
parenta73e98a8e069074fe439d8d54c93fd35c46ace8e (diff)
shift type list
Diffstat (limited to 'includes/controller')
-rw-r--r--includes/controller/shifttypes_controller.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/controller/shifttypes_controller.php b/includes/controller/shifttypes_controller.php
index 3ceb5c0d..6d061111 100644
--- a/includes/controller/shifttypes_controller.php
+++ b/includes/controller/shifttypes_controller.php
@@ -10,6 +10,19 @@ function shifttype_controller() {
}
function shifttypes_list_controller() {
+ global $privileges, $user;
+
+ if (! in_array('shifttypes', $privileges))
+ redirect('?');
+
+ $shifttypes = ShiftTypes();
+ if ($shifttypes === false)
+ engelsystem_error("Unable to load shifttypes.");
+
+ return array(
+ shifttypes_title(),
+ ShiftTypes_list_view($shifttypes)
+ );
}
/**