summaryrefslogtreecommitdiff
path: root/includes/model
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-21 19:37:42 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-21 20:12:35 +0100
commit915ce28feeb9104bf7854ccbd80caebb5dce4aaa (patch)
tree503a31809070fee875e82213d46b90fb0b2fcac9 /includes/model
parent9a3ad8883403949a59e8935497a548ec536f1d40 (diff)
Replaced " with '
Diffstat (limited to 'includes/model')
-rw-r--r--includes/model/ShiftEntry_model.php4
-rw-r--r--includes/model/Shifts_model.php36
-rw-r--r--includes/model/User_model.php6
3 files changed, 23 insertions, 23 deletions
diff --git a/includes/model/ShiftEntry_model.php b/includes/model/ShiftEntry_model.php
index 87e186ac..d7810feb 100644
--- a/includes/model/ShiftEntry_model.php
+++ b/includes/model/ShiftEntry_model.php
@@ -46,7 +46,7 @@ function ShiftEntries_freeleaded_count()
*/
function ShiftEntries_by_shift($shift_id)
{
- return DB::select("
+ return DB::select('
SELECT
`User`.`Nick`,
`User`.`email`,
@@ -62,7 +62,7 @@ function ShiftEntries_by_shift($shift_id)
FROM `ShiftEntry`
JOIN `User` ON `ShiftEntry`.`UID`=`User`.`UID`
JOIN `AngelTypes` ON `ShiftEntry`.`TID`=`AngelTypes`.`id`
- WHERE `ShiftEntry`.`SID` = ?",
+ WHERE `ShiftEntry`.`SID` = ?',
[$shift_id]
);
}
diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php
index 3f199803..c70ba830 100644
--- a/includes/model/Shifts_model.php
+++ b/includes/model/Shifts_model.php
@@ -24,15 +24,15 @@ function Shifts_by_room($room)
function Shifts_by_ShiftsFilter(ShiftsFilter $shiftsFilter)
{
//@TODO
- $sql = "SELECT * FROM (
+ $sql = 'SELECT * FROM (
SELECT DISTINCT `Shifts`.*, `ShiftTypes`.`name`, `Room`.`Name` AS `room_name`
FROM `Shifts`
JOIN `Room` USING (`RID`)
JOIN `ShiftTypes` ON `ShiftTypes`.`id` = `Shifts`.`shifttype_id`
JOIN `NeededAngelTypes` ON `NeededAngelTypes`.`shift_id`=`Shifts`.`SID`
- WHERE `Shifts`.`RID` IN (" . implode(',', $shiftsFilter->getRooms()) . ")
- AND `start` BETWEEN " . $shiftsFilter->getStartTime() . " AND " . $shiftsFilter->getEndTime() . "
- AND `NeededAngelTypes`.`angel_type_id` IN (" . implode(',', $shiftsFilter->getTypes()) . ")
+ WHERE `Shifts`.`RID` IN (' . implode(',', $shiftsFilter->getRooms()) . ')
+ AND `start` BETWEEN ' . $shiftsFilter->getStartTime() . ' AND ' . $shiftsFilter->getEndTime() . '
+ AND `NeededAngelTypes`.`angel_type_id` IN (' . implode(',', $shiftsFilter->getTypes()) . ')
AND `NeededAngelTypes`.`count` > 0
AND `Shifts`.`PSID` IS NULL
@@ -43,13 +43,13 @@ function Shifts_by_ShiftsFilter(ShiftsFilter $shiftsFilter)
JOIN `Room` USING (`RID`)
JOIN `ShiftTypes` ON `ShiftTypes`.`id` = `Shifts`.`shifttype_id`
JOIN `NeededAngelTypes` ON `NeededAngelTypes`.`room_id`=`Shifts`.`RID`
- WHERE `Shifts`.`RID` IN (" . implode(',', $shiftsFilter->getRooms()) . ")
- AND `start` BETWEEN " . $shiftsFilter->getStartTime() . " AND " . $shiftsFilter->getEndTime() . "
- AND `NeededAngelTypes`.`angel_type_id` IN (" . implode(',', $shiftsFilter->getTypes()) . ")
+ WHERE `Shifts`.`RID` IN (' . implode(',', $shiftsFilter->getRooms()) . ')
+ AND `start` BETWEEN ' . $shiftsFilter->getStartTime() . ' AND ' . $shiftsFilter->getEndTime() . '
+ AND `NeededAngelTypes`.`angel_type_id` IN (' . implode(',', $shiftsFilter->getTypes()) . ')
AND `NeededAngelTypes`.`count` > 0
AND NOT `Shifts`.`PSID` IS NULL) AS tmp_shifts
- ORDER BY `start`";
+ ORDER BY `start`';
$result = DB::select($sql);
if (DB::getStm()->errorCode() != '00000') {
engelsystem_error('Unable to load shifts by filter.');
@@ -64,7 +64,7 @@ function Shifts_by_ShiftsFilter(ShiftsFilter $shiftsFilter)
function NeededAngeltypes_by_ShiftsFilter(ShiftsFilter $shiftsFilter)
{
//@TODO
- $sql = "
+ $sql = '
SELECT
`NeededAngelTypes`.*,
`Shifts`.`SID`,
@@ -75,8 +75,8 @@ function NeededAngeltypes_by_ShiftsFilter(ShiftsFilter $shiftsFilter)
FROM `Shifts`
JOIN `NeededAngelTypes` ON `NeededAngelTypes`.`shift_id`=`Shifts`.`SID`
JOIN `AngelTypes` ON `AngelTypes`.`id`= `NeededAngelTypes`.`angel_type_id`
- WHERE `Shifts`.`RID` IN (" . implode(',', $shiftsFilter->getRooms()) . ")
- AND `start` BETWEEN " . $shiftsFilter->getStartTime() . " AND " . $shiftsFilter->getEndTime() . "
+ WHERE `Shifts`.`RID` IN (' . implode(',', $shiftsFilter->getRooms()) . ')
+ AND `start` BETWEEN ' . $shiftsFilter->getStartTime() . ' AND ' . $shiftsFilter->getEndTime() . '
AND `Shifts`.`PSID` IS NULL
UNION
@@ -91,9 +91,9 @@ function NeededAngeltypes_by_ShiftsFilter(ShiftsFilter $shiftsFilter)
FROM `Shifts`
JOIN `NeededAngelTypes` ON `NeededAngelTypes`.`room_id`=`Shifts`.`RID`
JOIN `AngelTypes` ON `AngelTypes`.`id`= `NeededAngelTypes`.`angel_type_id`
- WHERE `Shifts`.`RID` IN (" . implode(',', $shiftsFilter->getRooms()) . ")
- AND `start` BETWEEN " . $shiftsFilter->getStartTime() . " AND " . $shiftsFilter->getEndTime() . "
- AND NOT `Shifts`.`PSID` IS NULL";
+ WHERE `Shifts`.`RID` IN (' . implode(',', $shiftsFilter->getRooms()) . ')
+ AND `start` BETWEEN ' . $shiftsFilter->getStartTime() . ' AND ' . $shiftsFilter->getEndTime() . '
+ AND NOT `Shifts`.`PSID` IS NULL';
$result = DB::select($sql);
if (DB::getStm()->errorCode() != '00000') {
engelsystem_error('Unable to load needed angeltypes by filter.');
@@ -162,7 +162,7 @@ function NeededAngeltype_by_Shift_and_Angeltype($shift, $angeltype)
function ShiftEntries_by_ShiftsFilter(ShiftsFilter $shiftsFilter)
{
// @TODO
- $sql = "
+ $sql = '
SELECT
`User`.`Nick`,
`User`.`email`,
@@ -177,9 +177,9 @@ function ShiftEntries_by_ShiftsFilter(ShiftsFilter $shiftsFilter)
FROM `Shifts`
JOIN `ShiftEntry` ON `ShiftEntry`.`SID`=`Shifts`.`SID`
JOIN `User` ON `ShiftEntry`.`UID`=`User`.`UID`
- WHERE `Shifts`.`RID` IN (" . implode(',', $shiftsFilter->getRooms()) . ")
- AND `start` BETWEEN " . $shiftsFilter->getStartTime() . " AND " . $shiftsFilter->getEndTime() . "
- ORDER BY `Shifts`.`start`";
+ WHERE `Shifts`.`RID` IN (' . implode(',', $shiftsFilter->getRooms()) . ')
+ AND `start` BETWEEN ' . $shiftsFilter->getStartTime() . ' AND ' . $shiftsFilter->getEndTime() . '
+ ORDER BY `Shifts`.`start`';
$result = DB::select($sql);
if (DB::getStm()->errorCode() != '00000') {
engelsystem_error('Unable to load shift entries by filter.');
diff --git a/includes/model/User_model.php b/includes/model/User_model.php
index 836ca914..097e8faf 100644
--- a/includes/model/User_model.php
+++ b/includes/model/User_model.php
@@ -28,7 +28,7 @@ function User_delete($user_id)
*/
function User_update($user)
{
- return (bool)DB::update("
+ return (bool)DB::update('
UPDATE `User` SET
`Nick`=?,
`Name`=?,
@@ -54,7 +54,7 @@ function User_update($user)
`planned_arrival_date`=?,
`planned_departure_date`=?
WHERE `UID`=?
- ",
+ ',
[
$user['Nick'],
$user['Name'],
@@ -241,7 +241,7 @@ function Users_by_angeltype_inverted($angeltype)
]
);
if (DB::getStm()->errorCode() != '00000') {
- engelsystem_error("Unable to load users.");
+ engelsystem_error('Unable to load users.');
}
return $result;
}