Correctly filter out rooms w/o permission in room select

This commit is contained in:
Tim Düsterhus 2014-08-08 01:59:24 +02:00
parent 44a4353fcf
commit bc11d9a7ef
2 changed files with 6 additions and 2 deletions

View File

@ -93,7 +93,7 @@ Building file.tar
-----------------
EOT;
passthru('tar cvf ../file.tar --exclude=*coffee -- *', $code);
passthru('tar cvf ../file.tar --exclude=*coffee --exclude-vcs -- *', $code);
if ($code != 0) exit($code);
echo <<<EOT
@ -123,7 +123,7 @@ EOT;
file_put_contents('package.xml.old', file_get_contents('package.xml'));
file_put_contents('package.xml', preg_replace('~<date>\d{4}-\d{2}-\d{2}</date>~', '<date>'.date('Y-m-d').'</date>', file_get_contents('package.xml')));
file_put_contents('package.xml', str_replace('</version>', '</version><!-- git id '.trim(shell_exec('git describe --always')).' -->', file_get_contents('package.xml')));
passthru('tar cvf be.bastelstu.chat.tar --exclude=*.old --exclude=file --exclude=template --exclude=acptemplate --exclude=contrib -- *', $code);
passthru('tar cvf be.bastelstu.chat.tar --exclude=*.old --exclude=file --exclude-vcs --exclude=template --exclude=acptemplate --exclude=contrib -- *', $code);
if (file_exists('package.xml.old')) {
file_put_contents('package.xml', file_get_contents('package.xml.old'));
unlink('package.xml.old');

View File

@ -174,6 +174,10 @@ class ChatPage extends \wcf\page\AbstractPage {
if ($this->roomID === 0) {
// no room given
if (CHAT_FORCE_ROOM_SELECT) {
$this->rooms = array_filter($this->rooms, function ($room) {
return $room->canEnter();
});
return;
}
else {