From ccb5b57b4aa6ec511c6c45580fd51245f79b27c2 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 12 Oct 2013 10:28:39 +0200 Subject: [PATCH] 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. --- .../lib/system/cache/builder/TagCloudCacheBuilder.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.20.1