fix shift update
This commit is contained in:
parent
739eddefd5
commit
ca37de95da
|
@ -19,6 +19,7 @@ function Room_ids() {
|
||||||
*/
|
*/
|
||||||
function Room($id) {
|
function Room($id) {
|
||||||
$room_source = sql_select("SELECT * FROM `Room` WHERE `RID`='" . sql_escape($id) . "' AND `show` = 'Y' LIMIT 1");
|
$room_source = sql_select("SELECT * FROM `Room` WHERE `RID`='" . sql_escape($id) . "' AND `show` = 'Y' LIMIT 1");
|
||||||
|
|
||||||
if ($room_source === false)
|
if ($room_source === false)
|
||||||
return false;
|
return false;
|
||||||
if (count($room_source) > 0)
|
if (count($room_source) > 0)
|
||||||
|
|
|
@ -16,7 +16,7 @@ function ShiftEntries_by_shift($shift_id) {
|
||||||
FROM `ShiftEntry`
|
FROM `ShiftEntry`
|
||||||
JOIN `User` ON `ShiftEntry`.`UID`=`User`.`UID`
|
JOIN `User` ON `ShiftEntry`.`UID`=`User`.`UID`
|
||||||
JOIN `AngelTypes` ON `ShiftEntry`.`TID`=`AngelTypes`.`id`
|
JOIN `AngelTypes` ON `ShiftEntry`.`TID`=`AngelTypes`.`id`
|
||||||
WHERE `ShiftEntry`.`SID`='" . sql_escape($shift_id)) . "'";
|
WHERE `ShiftEntry`.`SID`='" . sql_escape($shift_id) . "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -85,7 +85,7 @@ function Shift_signup_allowed($shift, $angeltype, $user_angeltype = null, $user_
|
||||||
* Delete a shift by its external id.
|
* Delete a shift by its external id.
|
||||||
*/
|
*/
|
||||||
function Shift_delete_by_psid($shift_psid) {
|
function Shift_delete_by_psid($shift_psid) {
|
||||||
return sql_query("DELETE FROM `Shifts` WHERE `PSID`='" . sql_escape($shift_psid)."'");
|
return sql_query("DELETE FROM `Shifts` WHERE `PSID`='" . sql_escape($shift_psid) . "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -151,6 +151,7 @@ function user_shifts() {
|
||||||
$shift['RID'] = $rid;
|
$shift['RID'] = $rid;
|
||||||
$shift['start'] = $start;
|
$shift['start'] = $start;
|
||||||
$shift['end'] = $end;
|
$shift['end'] = $end;
|
||||||
|
|
||||||
$result = Shift_update($shift);
|
$result = Shift_update($shift);
|
||||||
if ($result === false)
|
if ($result === false)
|
||||||
engelsystem_error('Unable to update shift.');
|
engelsystem_error('Unable to update shift.');
|
||||||
|
|
Loading…
Reference in New Issue