From 0cdcffc65ad47b76c6fc9736b5ca171016b6912e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 31 May 2013 02:07:03 +0200 Subject: [PATCH] Forbid editing of temprooms in ACP --- file/lib/acp/form/RoomEditForm.class.php | 3 +++ file/lib/acp/page/RoomListPage.class.php | 1 + 2 files changed, 4 insertions(+) diff --git a/file/lib/acp/form/RoomEditForm.class.php b/file/lib/acp/form/RoomEditForm.class.php index ba81659..e8bd450 100644 --- a/file/lib/acp/form/RoomEditForm.class.php +++ b/file/lib/acp/form/RoomEditForm.class.php @@ -53,6 +53,9 @@ public function readParameters() { if (!$this->roomObj->roomID) { throw new \wcf\system\exception\IllegalLinkException(); } + if (!$this->roomObj->permanent) { + throw new \wcf\system\exception\PermissionDeniedException(); + } } /** diff --git a/file/lib/acp/page/RoomListPage.class.php b/file/lib/acp/page/RoomListPage.class.php index 105123b..aa3a88f 100644 --- a/file/lib/acp/page/RoomListPage.class.php +++ b/file/lib/acp/page/RoomListPage.class.php @@ -39,6 +39,7 @@ public function readData() { $this->objects = new \chat\data\room\RoomList(); $this->objects->sqlOrderBy = 'showOrder ASC'; + $this->objects->getConditionBuilder()->add('permanent = ?', array(1)); $this->objects->readObjects(); }