Code cleanup
authorAlexander Ebert <ebert@woltlab.com>
Fri, 4 Jan 2019 11:53:27 +0000 (12:53 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 4 Jan 2019 11:53:27 +0000 (12:53 +0100)
See #2689

wcfsetup/install/files/lib/page/CombinedTaggedPage.class.php
wcfsetup/install/files/lib/system/tagging/TagEngine.class.php

index 223421dc8695c87860ebaa12088125680f58b25e..723fb21b832b26be0ce3e8f9d7b93b0c94e02ecf 100644 (file)
@@ -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]);
                        }
                }
index 460ede456323992f78e7c1fd3e7705ac09f2628f..fef795a638c71b6efce5d2518adc861b96ed73bc 100644 (file)
@@ -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.
         *