summaryrefslogtreecommitdiff
path: root/includes/model/Shifts_model.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-03 14:12:17 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-03 15:32:59 +0100
commit55141154c083acc2d0397f4c62b4e0be1c7a19fa (patch)
tree7e5e54a19f7df976fa68c42f21f1484112a7c257 /includes/model/Shifts_model.php
parent356b2582f3e6a43ecf2607acad4a7fe0b37f659a (diff)
Replaced " with '
Diffstat (limited to 'includes/model/Shifts_model.php')
-rw-r--r--includes/model/Shifts_model.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php
index 7c52d305..e182d905 100644
--- a/includes/model/Shifts_model.php
+++ b/includes/model/Shifts_model.php
@@ -8,9 +8,9 @@ use Engelsystem\ShiftSignupState;
*/
function Shifts_by_room($room)
{
- $result = sql_select("SELECT * FROM `Shifts` WHERE `RID`=" . sql_escape($room['RID']) . " ORDER BY `start`");
+ $result = sql_select('SELECT * FROM `Shifts` WHERE `RID`=' . sql_escape($room['RID']) . ' ORDER BY `start`');
if ($result === false) {
- engelsystem_error("Unable to load shifts.");
+ engelsystem_error('Unable to load shifts.');
}
return $result;
}
@@ -49,7 +49,7 @@ function Shifts_by_ShiftsFilter(ShiftsFilter $shiftsFilter)
ORDER BY `start`";
$result = sql_select($SQL);
if ($result === false) {
- engelsystem_error("Unable to load shifts by filter.");
+ engelsystem_error('Unable to load shifts by filter.');
}
return $result;
}
@@ -92,7 +92,7 @@ function NeededAngeltypes_by_ShiftsFilter(ShiftsFilter $shiftsFilter)
AND NOT `Shifts`.`PSID` IS NULL";
$result = sql_select($SQL);
if ($result === false) {
- engelsystem_error("Unable to load needed angeltypes by filter.");
+ engelsystem_error('Unable to load needed angeltypes by filter.');
}
return $result;
}
@@ -135,7 +135,7 @@ function NeededAngeltype_by_Shift_and_Angeltype($shift, $angeltype)
AND `AngelTypes`.`id`=" . sql_escape($angeltype['id']) . "
AND NOT `Shifts`.`PSID` IS NULL");
if ($result === false) {
- engelsystem_error("Unable to load needed angeltypes by filter.");
+ engelsystem_error('Unable to load needed angeltypes by filter.');
}
if (count($result) == 0) {
return null;
@@ -169,7 +169,7 @@ function ShiftEntries_by_ShiftsFilter(ShiftsFilter $shiftsFilter)
ORDER BY `Shifts`.`start`";
$result = sql_select($SQL);
if ($result === false) {
- engelsystem_error("Unable to load shift entries by filter.");
+ engelsystem_error('Unable to load shift entries by filter.');
}
return $result;
}
@@ -486,18 +486,18 @@ function Shift_create($shift)
*/
function Shifts_by_user($user, $include_freeload_comments = false)
{
- $result = sql_select("
+ $result = sql_select('
SELECT `ShiftTypes`.`id` AS `shifttype_id`, `ShiftTypes`.`name`,
`ShiftEntry`.`id`, `ShiftEntry`.`SID`, `ShiftEntry`.`TID`, `ShiftEntry`.`UID`, `ShiftEntry`.`freeloaded`, `ShiftEntry`.`Comment`,
- " . ($include_freeload_comments ? "`ShiftEntry`.`freeload_comment`, " : "") . "
+ ' . ($include_freeload_comments ? '`ShiftEntry`.`freeload_comment`, ' : '') . '
`Shifts`.*, `Room`.*
FROM `ShiftEntry`
JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`)
JOIN `ShiftTypes` ON (`ShiftTypes`.`id` = `Shifts`.`shifttype_id`)
JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`)
- WHERE `UID`='" . sql_escape($user['UID']) . "'
+ WHERE `UID`=\'' . sql_escape($user['UID']) . '\'
ORDER BY `start`
- ");
+ ');
if ($result === false) {
engelsystem_error('Unable to load users shifts.');
}
@@ -552,12 +552,12 @@ function Shift($shift_id)
*/
function Shifts()
{
- $shifts_source = sql_select("
+ $shifts_source = sql_select('
SELECT `ShiftTypes`.`name`, `Shifts`.*, `Room`.`RID`, `Room`.`Name` AS `room_name`
FROM `Shifts`
JOIN `ShiftTypes` ON (`ShiftTypes`.`id` = `Shifts`.`shifttype_id`)
JOIN `Room` ON `Room`.`RID` = `Shifts`.`RID`
- ");
+ ');
if ($shifts_source === false) {
return false;
}