mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Disallow direct access
This commit is contained in:
parent
1108d32ed3
commit
f507070d20
@ -42,6 +42,23 @@ class ChatLeaveAction extends AbstractAction {
|
|||||||
*/
|
*/
|
||||||
public $userData = array();
|
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()
|
* @see \wcf\action\IAction::execute()
|
||||||
*/
|
*/
|
||||||
|
@ -70,6 +70,23 @@ class ChatForm extends AbstractForm {
|
|||||||
*/
|
*/
|
||||||
public $useTemplate = false;
|
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()
|
* @see \wcf\page\IPage::readData()
|
||||||
*/
|
*/
|
||||||
|
@ -22,6 +22,23 @@ class ChatCopyrightPage extends AbstractPage {
|
|||||||
*/
|
*/
|
||||||
public $neededPermissions = array('user.chat.canEnter');
|
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()
|
* @see \wcf\page\IPage::readParameters()
|
||||||
*/
|
*/
|
||||||
|
@ -54,6 +54,23 @@ class ChatMessagePage extends AbstractPage {
|
|||||||
*/
|
*/
|
||||||
public $useTemplate = false;
|
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()
|
* @see \wcf\page\Page::readData()
|
||||||
*/
|
*/
|
||||||
|
@ -36,6 +36,23 @@ class ChatRefreshRoomListPage extends AbstractPage {
|
|||||||
*/
|
*/
|
||||||
public $useTemplate = false;
|
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()
|
* @see \wcf\page\IPage::readData()
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user