mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Fixing ChatPageMenuItemProvider
This commit is contained in:
parent
88525e69bf
commit
ec0154e3a4
@ -23,21 +23,15 @@ public function isVisible() {
|
|||||||
// guests are not supported
|
// guests are not supported
|
||||||
if (!\wcf\system\WCF::getUser()->userID) return false;
|
if (!\wcf\system\WCF::getUser()->userID) return false;
|
||||||
|
|
||||||
try {
|
$cache = ChatRoom::getCache();
|
||||||
$cache = ChatRoom::getCache();
|
|
||||||
$i = 0;
|
foreach ($cache as $this->room) {
|
||||||
|
if ($this->room->canEnter()) {
|
||||||
do {
|
return true;
|
||||||
$cache->seek($i++);
|
|
||||||
$this->room = $cache->current();
|
|
||||||
}
|
}
|
||||||
while (!$this->room->canEnter());
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch (\OutOfBoundsException $e) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user