summaryrefslogtreecommitdiff
path: root/includes/model/Room_model.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-09-29 11:18:17 +0200
committermsquare <msquare@notrademark.de>2016-09-29 11:18:17 +0200
commite965f8d04150fbd17ee1b5fcbca5ae85bbe6d6bd (patch)
treef610d047f1cdc830ffc34881f6ea6d26ef0e3983 /includes/model/Room_model.php
parent91dafb19ec171e747d9976cf738606759bde3aae (diff)
prohibit inline control structures on model and view
Diffstat (limited to 'includes/model/Room_model.php')
-rw-r--r--includes/model/Room_model.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/includes/model/Room_model.php b/includes/model/Room_model.php
index 6d8a205e..1768b61b 100644
--- a/includes/model/Room_model.php
+++ b/includes/model/Room_model.php
@@ -25,8 +25,9 @@ function Room_create($name, $from_frab, $public) {
`FromPentabarf`='" . sql_escape($from_frab ? 'Y' : '') . "',
`show`='" . sql_escape($public ? 'Y' : '') . "',
`Number`=0");
- if ($result === false)
+ if ($result === false) {
return false;
+ }
return sql_id();
}
@@ -38,10 +39,12 @@ function Room_create($name, $from_frab, $public) {
function Room($id) {
$room_source = sql_select("SELECT * FROM `Room` WHERE `RID`='" . sql_escape($id) . "' AND `show` = 'Y'");
- if ($room_source === false)
+ if ($room_source === false) {
return false;
- if (count($room_source) > 0)
+ }
+ if (count($room_source) > 0) {
return $room_source[0];
+ }
return null;
}