From 98f355cd86828ccb8a24f24ab06c29d53bff530c Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Sun, 9 Mar 2014 13:12:46 +0100 Subject: added angeltype description --- includes/model/AngelType_model.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'includes/model') diff --git a/includes/model/AngelType_model.php b/includes/model/AngelType_model.php index 180712b2..8f577571 100644 --- a/includes/model/AngelType_model.php +++ b/includes/model/AngelType_model.php @@ -17,12 +17,14 @@ function AngelType_delete($angeltype) { * @param int $angeltype_id * @param string $name * @param boolean $restricted + * @param string $description */ -function AngelType_update($angeltype_id, $name, $restricted) { +function AngelType_update($angeltype_id, $name, $restricted, $description) { return sql_query(" UPDATE `AngelTypes` SET `name`='" . sql_escape($name) . "', - `restricted`=" . sql_escape($restricted ? 1 : 0) . " + `restricted`=" . sql_escape($restricted ? 1 : 0) . ", + `description`='" . sql_escape($description) . "' WHERE `id`=" . sql_escape($angeltype_id) . " LIMIT 1"); } @@ -32,13 +34,15 @@ function AngelType_update($angeltype_id, $name, $restricted) { * * @param string $name * @param boolean $restricted + * @param string $description * @return New Angeltype id */ -function AngelType_create($name, $restricted) { +function AngelType_create($name, $restricted, $description) { $result = sql_query(" INSERT INTO `AngelTypes` SET `name`='" . sql_escape($name) . "', - `restricted`=" . sql_escape($restricted ? 1 : 0)); + `restricted`=" . sql_escape($restricted ? 1 : 0) . " + `description`='" . sql_escape($description) . "'"); if ($result === false) return false; return sql_id(); -- cgit v1.2.3-70-g09d2