summaryrefslogtreecommitdiff
path: root/includes/model
diff options
context:
space:
mode:
Diffstat (limited to 'includes/model')
-rw-r--r--includes/model/ShiftEntry_model.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/includes/model/ShiftEntry_model.php b/includes/model/ShiftEntry_model.php
index f84b312f..903bc544 100644
--- a/includes/model/ShiftEntry_model.php
+++ b/includes/model/ShiftEntry_model.php
@@ -35,6 +35,17 @@ function ShiftEntry_create($shift_entry) {
}
/**
+ * Update a shift entry.
+ */
+function ShiftEntry_update($shift_entry) {
+ return sql_query("UPDATE `ShiftEntry` SET
+ `Comment`='" . sql_escape($shift_entry['Comment']) . "',
+ `freeload_comment`='" . sql_escape($shift_entry['freeload_comment']) . "',
+ `freeloaded`=" . sql_escape($shift_entry['freeloaded'] ? 'TRUE' : 'FALSE') . "
+ WHERE `id`=" . sql_escape($shift_entry['id']));
+}
+
+/**
* Delete a shift entry.
*/
function ShiftEntry_delete($shift_entry_id) {