summaryrefslogtreecommitdiff
path: root/includes/model/ShiftEntry_model.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-10-07 17:22:48 +0200
committermsquare <msquare@notrademark.de>2016-10-07 17:22:48 +0200
commitc48335e702361eec3818a6b1021d443fee9037f5 (patch)
treece65c5ec1f7f86e5b10c31492c3551fe6a6ad26e /includes/model/ShiftEntry_model.php
parent6d97aa2d273464e3cb6703a0527793c52583d4cd (diff)
improve shift rendering
Diffstat (limited to 'includes/model/ShiftEntry_model.php')
-rw-r--r--includes/model/ShiftEntry_model.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/model/ShiftEntry_model.php b/includes/model/ShiftEntry_model.php
index 425b92e8..63127bc7 100644
--- a/includes/model/ShiftEntry_model.php
+++ b/includes/model/ShiftEntry_model.php
@@ -110,12 +110,16 @@ function ShiftEntries_finished_by_user($user) {
* @param int $angeltype_id
*/
function ShiftEntries_by_shift_and_angeltype($shift_id, $angeltype_id) {
- return sql_select("
+ $result = sql_select("
SELECT *
FROM `ShiftEntry`
WHERE `SID`=" . sql_escape($shift_id) . "
AND `TID`=" . sql_escape($angeltype_id) . "
");
+ if ($result === false) {
+ engelsystem_error("Unable to load shift entries.");
+ }
+ return $result;
}
/**