From e965f8d04150fbd17ee1b5fcbca5ae85bbe6d6bd Mon Sep 17 00:00:00 2001 From: msquare Date: Thu, 29 Sep 2016 11:18:17 +0200 Subject: prohibit inline control structures on model and view --- includes/model/Room_model.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'includes/model/Room_model.php') 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; } -- cgit v1.2.3-54-g00ecf