mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Use $loginRequired
This commit is contained in:
parent
b06f5c9df1
commit
3bb8ef4577
@ -13,6 +13,11 @@
|
||||
* @subpackage action
|
||||
*/
|
||||
class ChatLeaveAction extends AbstractAction {
|
||||
/**
|
||||
* @see wcf\action\AbstractAction::$loginRequired
|
||||
*/
|
||||
public $loginRequired = true;
|
||||
|
||||
/**
|
||||
* @see \wcf\action\AbstractAction::$neededModules
|
||||
*/
|
||||
@ -43,10 +48,6 @@ class ChatLeaveAction extends AbstractAction {
|
||||
public function execute() {
|
||||
parent::execute();
|
||||
|
||||
if (!WCF::getUser()->userID) {
|
||||
throw new IllegalLinkException();
|
||||
}
|
||||
|
||||
$this->userData['roomID'] = \wcf\util\ChatUtil::readUserData('roomID');
|
||||
|
||||
$this->room = chat\room\ChatRoom::getCache()->search($this->userData['roomID']);
|
||||
|
@ -29,6 +29,11 @@ class ChatForm extends AbstractForm {
|
||||
*/
|
||||
public $enableSmilies = 1;
|
||||
|
||||
/**
|
||||
* @see wcf\page\AbstractPage::$loginRequired
|
||||
*/
|
||||
public $loginRequired = true;
|
||||
|
||||
/**
|
||||
* @see \wcf\page\AbstractPage::$neededModules
|
||||
*/
|
||||
|
@ -13,6 +13,11 @@
|
||||
* @subpackage page
|
||||
*/
|
||||
class ChatMessagePage extends AbstractPage {
|
||||
/**
|
||||
* @see wcf\page\AbstractPage::$loginRequired
|
||||
*/
|
||||
public $loginRequired = true;
|
||||
|
||||
/**
|
||||
* The new and unseen messages.
|
||||
*
|
||||
@ -121,11 +126,6 @@ public function readRoom() {
|
||||
* @see \wcf\page\IPage::show()
|
||||
*/
|
||||
public function show() {
|
||||
// guests are not supported
|
||||
if (!WCF::getUser()->userID) {
|
||||
throw new \wcf\system\exception\PermissionDeniedException();
|
||||
}
|
||||
|
||||
parent::show();
|
||||
|
||||
@header('Content-type: application/json');
|
||||
|
@ -21,6 +21,11 @@ class ChatPage extends AbstractPage {
|
||||
*/
|
||||
public $chatVersion = '';
|
||||
|
||||
/**
|
||||
* @see wcf\page\AbstractPage::$loginRequired
|
||||
*/
|
||||
public $loginRequired = true;
|
||||
|
||||
/**
|
||||
* @see \wcf\page\AbstractPage::$neededModules
|
||||
*/
|
||||
@ -231,11 +236,6 @@ public function readRoom() {
|
||||
* @see \wcf\page\IPage::show()
|
||||
*/
|
||||
public function show() {
|
||||
// guests are not supported
|
||||
if (!WCF::getUser()->userID) {
|
||||
throw new \wcf\system\exception\PermissionDeniedException();
|
||||
}
|
||||
|
||||
\wcf\system\menu\page\PageMenu::getInstance()->setActiveMenuItem('wcf.header.menu.chat');
|
||||
|
||||
// remove index breadcrumb
|
||||
|
@ -14,6 +14,11 @@
|
||||
* @subpackage page
|
||||
*/
|
||||
class ChatRefreshRoomListPage extends AbstractPage {
|
||||
/**
|
||||
* @see wcf\page\AbstractPage::$loginRequired
|
||||
*/
|
||||
public $loginRequired = true;
|
||||
|
||||
/**
|
||||
* @see \wcf\page\AbstractPage::$neededModules
|
||||
*/
|
||||
@ -48,11 +53,6 @@ public function readData() {
|
||||
* @see \wcf\page\IPage::show()
|
||||
*/
|
||||
public function show() {
|
||||
// guests are not supported
|
||||
if (!WCF::getUser()->userID) {
|
||||
throw new \wcf\system\exception\PermissionDeniedException();
|
||||
}
|
||||
|
||||
parent::show();
|
||||
|
||||
@header('Content-type: application/json');
|
||||
|
Loading…
Reference in New Issue
Block a user