From 475a7cc2aaa5c2d1d97c4c970b44a135c9d53bab Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 4 Jan 2019 12:53:27 +0100 Subject: [PATCH] Code cleanup See #2689 --- .../files/lib/page/CombinedTaggedPage.class.php | 2 +- .../files/lib/system/tagging/TagEngine.class.php | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/wcfsetup/install/files/lib/page/CombinedTaggedPage.class.php b/wcfsetup/install/files/lib/page/CombinedTaggedPage.class.php index 223421dc86..723fb21b83 100644 --- a/wcfsetup/install/files/lib/page/CombinedTaggedPage.class.php +++ b/wcfsetup/install/files/lib/page/CombinedTaggedPage.class.php @@ -90,7 +90,7 @@ class CombinedTaggedPage extends MultipleLinkPage { unset($this->availableObjectTypes[$key]); } - if (!$objectType->getProcessor() instanceof ICombinedTaggable) { + if (!($objectType->getProcessor() instanceof ICombinedTaggable)) { unset($this->availableObjectTypes[$key]); } } diff --git a/wcfsetup/install/files/lib/system/tagging/TagEngine.class.php b/wcfsetup/install/files/lib/system/tagging/TagEngine.class.php index 460ede4563..fef795a638 100644 --- a/wcfsetup/install/files/lib/system/tagging/TagEngine.class.php +++ b/wcfsetup/install/files/lib/system/tagging/TagEngine.class.php @@ -273,20 +273,6 @@ class TagEngine extends SingletonFactory { ]; } - public function setJoinCondition($objectType, array $tags, PreparedStatementConditionBuilder $conditions) { - $conditions->add('tag_to_object.objectTypeID = ?', [$this->getObjectTypeID($objectType)]); - - $tagIDs = []; - foreach ($tags as $tag) { - $tagIDs[] = $tag->tagID; - } - $conditions->add('tag_to_object.tagID IN (?)', [$tagIDs]); - } - - public function getSqlGroupAndHaving(array $tags) { - return 'GROUP BY tag_to_object.objectID HAVING COUNT(tag_to_object.objectID) = ' . count($tags); - } - /** * Returns the matching tags by name. * -- 2.20.1