fixes #237 bug when editing a room without changing its name
This commit is contained in:
parent
839727c7b6
commit
c4179df503
|
@ -56,7 +56,7 @@ function admin_rooms() {
|
||||||
|
|
||||||
if (isset($_REQUEST['name']) && strlen(strip_request_item('name')) > 0) {
|
if (isset($_REQUEST['name']) && strlen(strip_request_item('name')) > 0) {
|
||||||
$name = strip_request_item('name');
|
$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;
|
$ok = false;
|
||||||
$msg .= error(_("This name is already in use."), true);
|
$msg .= error(_("This name is already in use."), true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue