From: Matthias Schmidt Date: Sat, 12 Oct 2013 08:28:39 +0000 (+0200) Subject: Fixes issue with tag cache builder X-Git-Tag: 2.0.0_Beta_11~39^2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ccb5b57b4aa6ec511c6c45580fd51245f79b27c2;p=GitHub%2FWoltLab%2FWCF.git Fixes issue with tag cache builder Since cache builders are singletons, before reading tags, the previously read tags need to be removed, i.e. `$tags` needs to be emptied. --- diff --git a/wcfsetup/install/files/lib/system/cache/builder/TagCloudCacheBuilder.class.php b/wcfsetup/install/files/lib/system/cache/builder/TagCloudCacheBuilder.class.php index 57e8d6f8cd..7a6a0c33d9 100644 --- a/wcfsetup/install/files/lib/system/cache/builder/TagCloudCacheBuilder.class.php +++ b/wcfsetup/install/files/lib/system/cache/builder/TagCloudCacheBuilder.class.php @@ -78,6 +78,8 @@ class TagCloudCacheBuilder extends AbstractCacheBuilder { * Reads associated tags. */ protected function getTags() { + $this->tags = array(); + if (!empty($this->objectTypeIDs)) { // get tag ids $tagIDs = array(); @@ -86,7 +88,7 @@ class TagCloudCacheBuilder extends AbstractCacheBuilder { $conditionBuilder->add('object.languageID IN (?)', array($this->languageIDs)); $sql = "SELECT COUNT(*) AS counter, object.tagID FROM wcf".WCF_N."_tag_to_object object - ".$conditionBuilder->__toString()." + ".$conditionBuilder." GROUP BY object.tagID ORDER BY counter DESC"; $statement = WCF::getDB()->prepareStatement($sql, 500);