summaryrefslogtreecommitdiff
path: root/includes/controller/rooms_controller.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-03 03:22:48 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-03 03:22:48 +0100
commit356b2582f3e6a43ecf2607acad4a7fe0b37f659a (patch)
treee02c9214b23a0b9ec33aa725db962d565bd30a82 /includes/controller/rooms_controller.php
parentd71e7bbfad2f07f82df0c515608996d250fd4182 (diff)
PPHDoc, formatting, fixes, cleanup
Diffstat (limited to 'includes/controller/rooms_controller.php')
-rw-r--r--includes/controller/rooms_controller.php23
1 files changed, 20 insertions, 3 deletions
diff --git a/includes/controller/rooms_controller.php b/includes/controller/rooms_controller.php
index d19e91bb..9910f50c 100644
--- a/includes/controller/rooms_controller.php
+++ b/includes/controller/rooms_controller.php
@@ -8,6 +8,8 @@ use Engelsystem\ShiftsFilterRenderer;
/**
* View a room with its shifts.
+ *
+ * @return array
*/
function room_controller()
{
@@ -55,6 +57,8 @@ function room_controller()
/**
* Dispatch different room actions.
+ *
+ * @return array
*/
function rooms_controller()
{
@@ -63,19 +67,30 @@ function rooms_controller()
}
switch ($_REQUEST['action']) {
- default:
- case 'list':
- redirect(page_link_to('admin_rooms'));
case 'view':
return room_controller();
+ case 'list':
+ default:
+ redirect(page_link_to('admin_rooms'));
+ break;
}
+
+ exit;
}
+/**
+ * @param array $room
+ * @return string
+ */
function room_link($room)
{
return page_link_to('rooms') . '&action=view&room_id=' . $room['RID'];
}
+/**
+ * @param array $room
+ * @return string
+ */
function room_edit_link($room)
{
return page_link_to('admin_rooms') . '&show=edit&id=' . $room['RID'];
@@ -83,6 +98,8 @@ function room_edit_link($room)
/**
* Loads room by request param room_id
+ *
+ * @return array
*/
function load_room()
{