summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2016-01-19 11:34:49 +0100
committerPhilip Häusler <msquare@notrademark.de>2016-01-19 11:35:00 +0100
commitc4179df5037813240415e8109148973ddee95a97 (patch)
treeeaba681a959ca2ada72259bdc97d5625b3fe1706 /includes
parent839727c7b6120f11bda2cb0bf73417e6ea1f77f8 (diff)
fixes #237 bug when editing a room without changing its name
Diffstat (limited to 'includes')
-rw-r--r--includes/pages/admin_rooms.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/pages/admin_rooms.php b/includes/pages/admin_rooms.php
index 5287191c..8a43544c 100644
--- a/includes/pages/admin_rooms.php
+++ b/includes/pages/admin_rooms.php
@@ -56,7 +56,7 @@ function admin_rooms() {
if (isset($_REQUEST['name']) && strlen(strip_request_item('name')) > 0) {
$name = strip_request_item('name');
- if (isset($room) && sql_num_query("SELECT * FROM `Room` WHERE `Name`='" . sql_escape($name) . "'") > 0) {
+ if (isset($room) && sql_num_query("SELECT * FROM `Room` WHERE `Name`='" . sql_escape($name) . "' AND NOT `RID`=" . sql_escape($id)) > 0) {
$ok = false;
$msg .= error(_("This name is already in use."), true);
}