1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Fix MessageLogPage when temporary rooms exist

This commit is contained in:
Tim Düsterhus 2013-09-08 20:52:31 +02:00
parent 017487bbe8
commit 0ef6dbb36b

View File

@ -124,8 +124,7 @@ public function readParameters() {
$this->rooms = \chat\data\room\RoomCache::getInstance()->getRooms(); $this->rooms = \chat\data\room\RoomCache::getInstance()->getRooms();
foreach ($this->rooms as $id => $room) { foreach ($this->rooms as $id => $room) {
if (!$room->permanent) if (!$room->permanent) unset($this->rooms[$key]);
unset($this->rooms[$key]);
} }
if (isset($_REQUEST['id'])) $this->roomID = intval($_REQUEST['id']); if (isset($_REQUEST['id'])) $this->roomID = intval($_REQUEST['id']);
@ -134,6 +133,7 @@ public function readParameters() {
$this->room = \chat\data\room\RoomCache::getInstance()->getRoom($this->roomID); $this->room = \chat\data\room\RoomCache::getInstance()->getRoom($this->roomID);
if (!$this->room) throw new \wcf\system\exception\IllegalLinkException(); if (!$this->room) throw new \wcf\system\exception\IllegalLinkException();
if (!$this->room->permanent) throw new \wcf\system\exception\PermissionDeniedException();
if (isset($_REQUEST['date'])) $date = $_REQUEST['date'].' 00:00:00'; if (isset($_REQUEST['date'])) $date = $_REQUEST['date'].' 00:00:00';
else $date = 'today 00:00:00'; else $date = 'today 00:00:00';