summaryrefslogtreecommitdiff
path: root/includes/controller/shifts_controller.php
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2014-12-17 17:22:35 +0100
committerPhilip Häusler <msquare@notrademark.de>2014-12-17 17:22:35 +0100
commita791a75b0a893308f35865542149c77f8761b3a0 (patch)
tree15635291aea7fe4d0b94a761bef885abcad708b0 /includes/controller/shifts_controller.php
parent634a3739b25bc5167c084b431c931d6d60944a1d (diff)
integrate shift type into shifts
Diffstat (limited to 'includes/controller/shifts_controller.php')
-rw-r--r--includes/controller/shifts_controller.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/controller/shifts_controller.php b/includes/controller/shifts_controller.php
index 868e903b..8352092d 100644
--- a/includes/controller/shifts_controller.php
+++ b/includes/controller/shifts_controller.php
@@ -48,7 +48,14 @@ function shifts_json_export_controller() {
require_once realpath(__DIR__ . '/../pages/user_shifts.php');
view_user_shifts();
} else {
- $ical_shifts = sql_select("SELECT `Shifts`.*, `Room`.`Name` as `room_name` FROM `ShiftEntry` INNER JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`) INNER JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`) WHERE `UID`=" . sql_escape($user['UID']) . " ORDER BY `start`");
+ $ical_shifts = sql_select("
+ SELECT `ShiftTypes`.`name`, `Shifts`.*, `Room`.`Name` as `room_name`
+ FROM `ShiftEntry`
+ INNER JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`)
+ INNER JOIN `ShiftTypes` ON (`Shifts`.`shifttype_id`=`ShiftTypes`.`id`)
+ INNER JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`)
+ WHERE `UID`=" . sql_escape($user['UID']) . "
+ ORDER BY `start`");
}
header("Content-Type: application/json; charset=utf-8");