mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-21 21:30:08 +00:00
Guests are not supported.
This commit is contained in:
parent
c39d34aadb
commit
3ef8578a46
@ -37,6 +37,9 @@ public function assignVariables() {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads chat-version. Used to avoid caching of JS-File when Tims Chat is updated.
|
||||||
|
*/
|
||||||
public function readChatVersion() {
|
public function readChatVersion() {
|
||||||
CacheHandler::getInstance()->addResource(
|
CacheHandler::getInstance()->addResource(
|
||||||
'packages',
|
'packages',
|
||||||
@ -47,7 +50,7 @@ public function readChatVersion() {
|
|||||||
foreach ($packages as $package) {
|
foreach ($packages as $package) {
|
||||||
if ($package->package != 'timwolla.wcf.chat') continue;
|
if ($package->package != 'timwolla.wcf.chat') continue;
|
||||||
$this->chatVersion = $package->packageVersion;
|
$this->chatVersion = $package->packageVersion;
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,6 +102,9 @@ public function readParameters() {
|
|||||||
if (isset($_GET['id'])) $this->roomID = (int) $_GET['id'];
|
if (isset($_GET['id'])) $this->roomID = (int) $_GET['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads the smilies in the default category.
|
||||||
|
*/
|
||||||
public function readDefaultSmileys() {
|
public function readDefaultSmileys() {
|
||||||
$smilies = \wcf\data\smiley\SmileyCache::getInstance()->getSmilies();
|
$smilies = \wcf\data\smiley\SmileyCache::getInstance()->getSmilies();
|
||||||
$this->smilies = $smilies[null];
|
$this->smilies = $smilies[null];
|
||||||
@ -108,6 +114,10 @@ public function readDefaultSmileys() {
|
|||||||
* @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
|
||||||
|
Loading…
Reference in New Issue
Block a user