diff --git a/.travis.yml b/.travis.yml
index 42f983f..00c1311 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,5 +7,9 @@ before_install:
- phpenv rehash
before_script:
- git clone --branch=master --depth=1 --quiet git://github.com/WoltLab/WCF.git WCF
+ - rm WCF/CodeSniff/WCF/Sniffs/Namespaces/ClassMustBeImportedSniff.php
+ - rm WCF/CodeSniff/WCF/Sniffs/Namespaces/UseDeclarationSniff.php
+ - sed -i 's///' WCF/CodeSniff/WCF/ruleset.xml
+ - sed -i 's///' WCF/CodeSniff/WCF/ruleset.xml
script:
- phpcs -p --extensions=php --standard="`pwd`/WCF/CodeSniff/WCF" file
diff --git a/file/lib/page/ChatPage.class.php b/file/lib/page/ChatPage.class.php
index 0e52689..571f646 100644
--- a/file/lib/page/ChatPage.class.php
+++ b/file/lib/page/ChatPage.class.php
@@ -117,17 +117,7 @@ public function assignVariables() {
* Reads chat-version. Used to avoid caching of JS-File when Tims Chat is updated.
*/
public function readChatVersion() {
- CacheHandler::getInstance()->addResource(
- 'packages',
- WCF_DIR.'cache/cache.packages.php',
- 'wcf\system\cache\builder\PackageCacheBuilder'
- );
- $packages = CacheHandler::getInstance()->get('packages');
- foreach ($packages as $package) {
- if ($package->package != \wcf\util\ChatUtil::PACKAGE_IDENTIFIER) continue;
- $this->chatVersion = $package->packageVersion;
- return;
- }
+ return $this->chatVersion = \wcf\data\package\PackageCache::getInstance()->getPackage(\wcf\util\ChatUtil::getPackageID())->packageVersion;
}
/**
diff --git a/file/lib/system/cache/builder/ChatPermissionCacheBuilder.class.php b/file/lib/system/cache/builder/ChatPermissionCacheBuilder.class.php
index 22234dd..dce4ffb 100644
--- a/file/lib/system/cache/builder/ChatPermissionCacheBuilder.class.php
+++ b/file/lib/system/cache/builder/ChatPermissionCacheBuilder.class.php
@@ -22,7 +22,6 @@ public function getData(array $cacheResource) {
if (count($groupIDs)) {
$conditionBuilder = new \wcf\system\database\util\PreparedStatementConditionBuilder();
- $conditionBuilder->add('acl_option.packageID IN (?)', array(\wcf\system\package\PackageDependencyHandler::getInstance()->getDependencies()));
$conditionBuilder->add('acl_option.objectTypeID = ?', array(\wcf\system\acl\ACLHandler::getInstance()->getObjectTypeID('be.bastelstu.wcf.chat.room')));
$conditionBuilder->add('option_to_group.optionID = acl_option.optionID');
$conditionBuilder->add('option_to_group.groupID IN (?)', array($groupIDs));
diff --git a/file/lib/system/chat/permission/ChatPermissionHandler.class.php b/file/lib/system/chat/permission/ChatPermissionHandler.class.php
index bc32e21..62b1eea 100644
--- a/file/lib/system/chat/permission/ChatPermissionHandler.class.php
+++ b/file/lib/system/chat/permission/ChatPermissionHandler.class.php
@@ -53,7 +53,6 @@ public function __construct(\wcf\data\user\User $user = null) {
$userPermissions = array();
$conditionBuilder = new \wcf\system\database\util\PreparedStatementConditionBuilder();
- $conditionBuilder->add('acl_option.packageID IN (?)', array(PackageDependencyHandler::getInstance()->getDependencies()));
$conditionBuilder->add('acl_option.objectTypeID = ?', array(ACLHandler::getInstance()->getObjectTypeID('be.bastelstu.wcf.chat.room')));
$conditionBuilder->add('option_to_user.optionID = acl_option.optionID');
$conditionBuilder->add('option_to_user.userID = ?', array($user->userID));
diff --git a/file/lib/util/ChatUtil.class.php b/file/lib/util/ChatUtil.class.php
index f30ac25..d125b14 100644
--- a/file/lib/util/ChatUtil.class.php
+++ b/file/lib/util/ChatUtil.class.php
@@ -1,7 +1,7 @@
getPackageID(self::PACKAGE_IDENTIFIER);
+ self::$packageID = PackageCache::getInstance()->getPackageID(self::PACKAGE_IDENTIFIER);
}
return self::$packageID;
diff --git a/template/chat.tpl b/template/chat.tpl
index 0ba448b..3398e6f 100644
--- a/template/chat.tpl
+++ b/template/chat.tpl
@@ -147,7 +147,7 @@
'wcf.chat.notify.title': '{lang}wcf.chat.notify.title{/lang}'
});
WCF.Icon.addObject({
- 'be.bastelstu.wcf.chat.chat': '{icon size='L'}chat{/icon}'
+ 'be.bastelstu.wcf.chat.chat': '{icon}chat{/icon}'
});
{event name='shouldInit'}
// Boot the chat