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
|
* @subpackage action
|
||||||
*/
|
*/
|
||||||
class ChatLeaveAction extends AbstractAction {
|
class ChatLeaveAction extends AbstractAction {
|
||||||
|
/**
|
||||||
|
* @see wcf\action\AbstractAction::$loginRequired
|
||||||
|
*/
|
||||||
|
public $loginRequired = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see \wcf\action\AbstractAction::$neededModules
|
* @see \wcf\action\AbstractAction::$neededModules
|
||||||
*/
|
*/
|
||||||
@ -43,10 +48,6 @@ class ChatLeaveAction extends AbstractAction {
|
|||||||
public function execute() {
|
public function execute() {
|
||||||
parent::execute();
|
parent::execute();
|
||||||
|
|
||||||
if (!WCF::getUser()->userID) {
|
|
||||||
throw new IllegalLinkException();
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->userData['roomID'] = \wcf\util\ChatUtil::readUserData('roomID');
|
$this->userData['roomID'] = \wcf\util\ChatUtil::readUserData('roomID');
|
||||||
|
|
||||||
$this->room = chat\room\ChatRoom::getCache()->search($this->userData['roomID']);
|
$this->room = chat\room\ChatRoom::getCache()->search($this->userData['roomID']);
|
||||||
|
@ -29,6 +29,11 @@ class ChatForm extends AbstractForm {
|
|||||||
*/
|
*/
|
||||||
public $enableSmilies = 1;
|
public $enableSmilies = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see wcf\page\AbstractPage::$loginRequired
|
||||||
|
*/
|
||||||
|
public $loginRequired = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see \wcf\page\AbstractPage::$neededModules
|
* @see \wcf\page\AbstractPage::$neededModules
|
||||||
*/
|
*/
|
||||||
|
@ -13,6 +13,11 @@
|
|||||||
* @subpackage page
|
* @subpackage page
|
||||||
*/
|
*/
|
||||||
class ChatMessagePage extends AbstractPage {
|
class ChatMessagePage extends AbstractPage {
|
||||||
|
/**
|
||||||
|
* @see wcf\page\AbstractPage::$loginRequired
|
||||||
|
*/
|
||||||
|
public $loginRequired = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The new and unseen messages.
|
* The new and unseen messages.
|
||||||
*
|
*
|
||||||
@ -121,11 +126,6 @@ public function readRoom() {
|
|||||||
* @see \wcf\page\IPage::show()
|
* @see \wcf\page\IPage::show()
|
||||||
*/
|
*/
|
||||||
public function show() {
|
public function show() {
|
||||||
// guests are not supported
|
|
||||||
if (!WCF::getUser()->userID) {
|
|
||||||
throw new \wcf\system\exception\PermissionDeniedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::show();
|
parent::show();
|
||||||
|
|
||||||
@header('Content-type: application/json');
|
@header('Content-type: application/json');
|
||||||
|
@ -21,6 +21,11 @@ class ChatPage extends AbstractPage {
|
|||||||
*/
|
*/
|
||||||
public $chatVersion = '';
|
public $chatVersion = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see wcf\page\AbstractPage::$loginRequired
|
||||||
|
*/
|
||||||
|
public $loginRequired = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see \wcf\page\AbstractPage::$neededModules
|
* @see \wcf\page\AbstractPage::$neededModules
|
||||||
*/
|
*/
|
||||||
@ -231,11 +236,6 @@ public function readRoom() {
|
|||||||
* @see \wcf\page\IPage::show()
|
* @see \wcf\page\IPage::show()
|
||||||
*/
|
*/
|
||||||
public function 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');
|
\wcf\system\menu\page\PageMenu::getInstance()->setActiveMenuItem('wcf.header.menu.chat');
|
||||||
|
|
||||||
// remove index breadcrumb
|
// remove index breadcrumb
|
||||||
|
@ -14,6 +14,11 @@
|
|||||||
* @subpackage page
|
* @subpackage page
|
||||||
*/
|
*/
|
||||||
class ChatRefreshRoomListPage extends AbstractPage {
|
class ChatRefreshRoomListPage extends AbstractPage {
|
||||||
|
/**
|
||||||
|
* @see wcf\page\AbstractPage::$loginRequired
|
||||||
|
*/
|
||||||
|
public $loginRequired = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see \wcf\page\AbstractPage::$neededModules
|
* @see \wcf\page\AbstractPage::$neededModules
|
||||||
*/
|
*/
|
||||||
@ -48,11 +53,6 @@ public function readData() {
|
|||||||
* @see \wcf\page\IPage::show()
|
* @see \wcf\page\IPage::show()
|
||||||
*/
|
*/
|
||||||
public function show() {
|
public function show() {
|
||||||
// guests are not supported
|
|
||||||
if (!WCF::getUser()->userID) {
|
|
||||||
throw new \wcf\system\exception\PermissionDeniedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::show();
|
parent::show();
|
||||||
|
|
||||||
@header('Content-type: application/json');
|
@header('Content-type: application/json');
|
||||||
|
Loading…
Reference in New Issue
Block a user