summaryrefslogtreecommitdiff
path: root/includes/model/Room_model.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-11-09 17:43:56 +0100
committerGitHub <noreply@github.com>2016-11-09 17:43:56 +0100
commitd43eb41d25d0d5c0509417247030dd6c21118cf6 (patch)
tree2c3f78bf8fbd4215e70af7dbc2ce30cfef674816 /includes/model/Room_model.php
parentd5d2acc7d80920eef5f0ed779a3738a12d5db348 (diff)
parent22520532c78b3a032aec6ececb7623ba094da8de (diff)
Merge pull request #274 from engelsystem/task-164-shift-view
Task 164 shift view
Diffstat (limited to 'includes/model/Room_model.php')
-rw-r--r--includes/model/Room_model.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/includes/model/Room_model.php b/includes/model/Room_model.php
index 4d03260a..6b6e269e 100644
--- a/includes/model/Room_model.php
+++ b/includes/model/Room_model.php
@@ -1,8 +1,17 @@
<?php
/**
+ * returns a list of rooms.
+ * @param boolean $show_all returns also hidden rooms when true
+ */
+function Rooms($show_all = false) {
+ return sql_select("SELECT * FROM `Room`" . ($show_all ? "" : " WHERE `show`='Y'") . " ORDER BY `Name`");
+}
+
+/**
* Delete a room
- * @param int $room_id
+ *
+ * @param int $room_id
*/
function Room_delete($room_id) {
return sql_query("DELETE FROM `Room` WHERE `RID`=" . sql_escape($room_id));