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

Use $loginRequired

This commit is contained in:
Tim Düsterhus 2012-08-08 16:51:24 +02:00
parent b06f5c9df1
commit 3bb8ef4577
5 changed files with 25 additions and 19 deletions

View File

@ -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']);

View File

@ -29,6 +29,11 @@ class ChatForm extends AbstractForm {
*/
public $enableSmilies = 1;
/**
* @see wcf\page\AbstractPage::$loginRequired
*/
public $loginRequired = true;
/**
* @see \wcf\page\AbstractPage::$neededModules
*/

View File

@ -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');

View File

@ -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

View File

@ -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');