Fixed sql issue in related articles query
authorMarcel Werk <burntime@woltlab.com>
Mon, 6 Jun 2016 20:11:39 +0000 (22:11 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 6 Jun 2016 20:11:48 +0000 (22:11 +0200)
wcfsetup/install/files/lib/page/ArticlePage.class.php

index 649bd0d6ee5e7153991e15e922a7eaddbc7b2130..c750e0194c012fec291571db1f3b31e5577d4822 100644 (file)
@@ -185,7 +185,7 @@ class ArticlePage extends AbstractPage {
                                        FROM            wcf" . WCF_N . "_tag_to_object
                                        " . $conditionBuilder . "
                                        GROUP BY        objectID
-                                       HAVING          count > " . (round(count($this->tags) * (ARTICLE_RELATED_ARTICLES_MATCH_THRESHOLD / 100))) . "
+                                       HAVING          COUNT(*) > " . (round(count($this->tags) * (ARTICLE_RELATED_ARTICLES_MATCH_THRESHOLD / 100))) . "
                                        ORDER BY        count DESC";
                                $statement = WCF::getDB()->prepareStatement($sql, ARTICLE_RELATED_ARTICLES);
                                $statement->execute($conditionBuilder->getParameters());