fix shift entry delete

This commit is contained in:
msquare 2017-12-19 22:24:06 +01:00
parent a498ac4653
commit afd7c59d1d
2 changed files with 2 additions and 2 deletions

View File

@ -255,7 +255,7 @@ function shift_entry_load() {
*/
function shift_entry_delete_controller()
{
global $privileges, $user;
global $user;
$request = request();
$shiftEntry = shift_entry_load();

View File

@ -139,7 +139,7 @@ function ShiftEntry($shift_entry_id)
function ShiftEntry_delete($shiftEntry)
{
mail_shift_removed(User($shiftEntry['UID']), Shift($shiftEntry['SID']));
DB::delete('DELETE FROM `ShiftEntry` WHERE `id` = ?', [$shift_entry_id]);
DB::delete('DELETE FROM `ShiftEntry` WHERE `id` = ?', [$shiftEntry['id']]);
$signout_user = User($shiftEntry['UID']);
$shift = Shift($shiftEntry['SID']);