|
|
@ -57,12 +57,15 @@ function user_myshifts() {
|
|
|
|
|
|
|
|
|
|
|
|
$comment = strip_request_item_nl('comment');
|
|
|
|
$comment = strip_request_item_nl('comment');
|
|
|
|
$user_source = User($shift['UID']);
|
|
|
|
$user_source = User($shift['UID']);
|
|
|
|
sql_query("UPDATE `ShiftEntry` SET
|
|
|
|
$result = ShiftEntry_update(array(
|
|
|
|
`Comment`='" . sql_escape($comment) . "',
|
|
|
|
'id' => $id,
|
|
|
|
`freeloaded`=" . sql_escape($freeloaded ? 1 : 0) . ",
|
|
|
|
'Comment' => $comment,
|
|
|
|
`freeload_comment`='" . sql_escape($freeload_comment) . "'
|
|
|
|
'freeloaded' => $freeloaded,
|
|
|
|
WHERE `id`=" . sql_escape($id) . "
|
|
|
|
'freeload_comment' => $freeload_comment
|
|
|
|
LIMIT 1");
|
|
|
|
));
|
|
|
|
|
|
|
|
if ($result === false)
|
|
|
|
|
|
|
|
engelsystem_error('Unable to update shift entr.');
|
|
|
|
|
|
|
|
|
|
|
|
engelsystem_log("Updated " . User_Nick_render($user_source) . "'s shift " . $shift['name'] . " from " . date("y-m-d H:i", $shift['start']) . " to " . date("y-m-d H:i", $shift['end']) . " with comment " . $comment);
|
|
|
|
engelsystem_log("Updated " . User_Nick_render($user_source) . "'s shift " . $shift['name'] . " from " . date("y-m-d H:i", $shift['start']) . " to " . date("y-m-d H:i", $shift['end']) . " with comment " . $comment);
|
|
|
|
success(_("Shift saved."));
|
|
|
|
success(_("Shift saved."));
|
|
|
|
redirect(page_link_to('users') . '&action=view&user_id=' . $shifts_user['UID']);
|
|
|
|
redirect(page_link_to('users') . '&action=view&user_id=' . $shifts_user['UID']);
|
|
|
|