diff options
author | Bot <bot@myigel.name> | 2017-01-03 03:22:48 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-01-03 03:22:48 +0100 |
commit | 356b2582f3e6a43ecf2607acad4a7fe0b37f659a (patch) | |
tree | e02c9214b23a0b9ec33aa725db962d565bd30a82 /includes/model/Room_model.php | |
parent | d71e7bbfad2f07f82df0c515608996d250fd4182 (diff) |
PPHDoc, formatting, fixes, cleanup
Diffstat (limited to 'includes/model/Room_model.php')
-rw-r--r-- | includes/model/Room_model.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/includes/model/Room_model.php b/includes/model/Room_model.php index 4c097f23..9c202c1e 100644 --- a/includes/model/Room_model.php +++ b/includes/model/Room_model.php @@ -4,6 +4,7 @@ * returns a list of rooms. * * @param boolean $show_all returns also hidden rooms when true + * @return array|false */ function Rooms($show_all = false) { @@ -14,6 +15,7 @@ function Rooms($show_all = false) * Delete a room * * @param int $room_id + * @return mysqli_result|false */ function Room_delete($room_id) { @@ -29,15 +31,19 @@ function Room_delete($room_id) * Is this a frab imported room? * @param boolean $public * Is the room visible for angels? + * @param int $number + * Room number + * @return false|int */ -function Room_create($name, $from_frab, $public) +function Room_create($name, $from_frab, $public, $number = null) { $result = sql_query(" INSERT INTO `Room` SET `Name`='" . sql_escape($name) . "', `FromPentabarf`='" . sql_escape($from_frab ? 'Y' : '') . "', `show`='" . sql_escape($public ? 'Y' : '') . "', - `Number`=0"); + `Number`=" . (int)$number + ); if ($result === false) { return false; } @@ -47,7 +53,8 @@ function Room_create($name, $from_frab, $public) /** * Returns room by id. * - * @param $room_id RID + * @param int $room_id RID + * @return array|false */ function Room($room_id) { |