diff --git a/file/lib/action/ChatLeaveAction.class.php b/file/lib/action/ChatLeaveAction.class.php index 50e8a38..8fc2f89 100644 --- a/file/lib/action/ChatLeaveAction.class.php +++ b/file/lib/action/ChatLeaveAction.class.php @@ -42,6 +42,23 @@ class ChatLeaveAction extends AbstractAction { */ public $userData = array(); + /** + * shortcut for the active request + * @see wcf\system\request\Request::getRequestObject() + */ + public $request = null; + + /** + * Disallows direct access. + * + * @see wcf\page\IPage::__run() + */ + public function __run() { + if (($this->request = RequestHandler::getInstance()->getActiveRequest()->getRequestObject()) === $this) throw new IllegalLinkException(); + + parent::__run(); + } + /** * @see \wcf\action\IAction::execute() */ diff --git a/file/lib/form/ChatForm.class.php b/file/lib/form/ChatForm.class.php index b9d75eb..1e87e53 100644 --- a/file/lib/form/ChatForm.class.php +++ b/file/lib/form/ChatForm.class.php @@ -70,6 +70,23 @@ class ChatForm extends AbstractForm { */ public $useTemplate = false; + /** + * shortcut for the active request + * @see wcf\system\request\Request::getRequestObject() + */ + public $request = null; + + /** + * Disallows direct access. + * + * @see wcf\page\IPage::__run() + */ + public function __run() { + if (($this->request = RequestHandler::getInstance()->getActiveRequest()->getRequestObject()) === $this) throw new IllegalLinkException(); + + parent::__run(); + } + /** * @see \wcf\page\IPage::readData() */ diff --git a/file/lib/page/ChatCopyrightPage.class.php b/file/lib/page/ChatCopyrightPage.class.php index 2b93f38..41f4b00 100644 --- a/file/lib/page/ChatCopyrightPage.class.php +++ b/file/lib/page/ChatCopyrightPage.class.php @@ -22,6 +22,23 @@ class ChatCopyrightPage extends AbstractPage { */ public $neededPermissions = array('user.chat.canEnter'); + /** + * shortcut for the active request + * @see wcf\system\request\Request::getRequestObject() + */ + public $request = null; + + /** + * Disallows direct access. + * + * @see wcf\page\IPage::__run() + */ + public function __run() { + if (($this->request = RequestHandler::getInstance()->getActiveRequest()->getRequestObject()) === $this) throw new IllegalLinkException(); + + parent::__run(); + } + /** * @see \wcf\page\IPage::readParameters() */ diff --git a/file/lib/page/ChatMessagePage.class.php b/file/lib/page/ChatMessagePage.class.php index d539032..fa1ea84 100644 --- a/file/lib/page/ChatMessagePage.class.php +++ b/file/lib/page/ChatMessagePage.class.php @@ -54,6 +54,23 @@ class ChatMessagePage extends AbstractPage { */ public $useTemplate = false; + /** + * shortcut for the active request + * @see wcf\system\request\Request::getRequestObject() + */ + public $request = null; + + /** + * Disallows direct access. + * + * @see wcf\page\IPage::__run() + */ + public function __run() { + if (($this->request = RequestHandler::getInstance()->getActiveRequest()->getRequestObject()) === $this) throw new IllegalLinkException(); + + parent::__run(); + } + /** * @see \wcf\page\Page::readData() */ diff --git a/file/lib/page/ChatRefreshRoomListPage.class.php b/file/lib/page/ChatRefreshRoomListPage.class.php index 5f78de1..0fd25b4 100644 --- a/file/lib/page/ChatRefreshRoomListPage.class.php +++ b/file/lib/page/ChatRefreshRoomListPage.class.php @@ -36,6 +36,23 @@ class ChatRefreshRoomListPage extends AbstractPage { */ public $useTemplate = false; + /** + * shortcut for the active request + * @see wcf\system\request\Request::getRequestObject() + */ + public $request = null; + + /** + * Disallows direct access. + * + * @see wcf\page\IPage::__run() + */ + public function __run() { + if (($this->request = RequestHandler::getInstance()->getActiveRequest()->getRequestObject()) === $this) throw new IllegalLinkException(); + + parent::__run(); + } + /** * @see \wcf\page\IPage::readData() */