summaryrefslogtreecommitdiff
path: root/includes/model
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2014-12-07 17:13:14 +0100
committerPhilip Häusler <msquare@notrademark.de>2014-12-07 17:13:14 +0100
commit156db1eadd905c7ee4c7c37dc246c8c689ae2396 (patch)
treee52d8248ff62759dacec6e30a5139b109531aa10 /includes/model
parent0a74ab94a8ebc93a7624e0bef90dfd7d8024deaa (diff)
add shift entry update model
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) {