From 4b73397fb4205fc0093a1385239cd9158265715a Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 23 Nov 2020 15:19:48 +0100 Subject: [PATCH] randomized sort order of related articles --- wcfsetup/install/files/lib/page/AbstractArticlePage.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/page/AbstractArticlePage.class.php b/wcfsetup/install/files/lib/page/AbstractArticlePage.class.php index 3b364bbc5c..8f007ad0dc 100644 --- a/wcfsetup/install/files/lib/page/AbstractArticlePage.class.php +++ b/wcfsetup/install/files/lib/page/AbstractArticlePage.class.php @@ -150,7 +150,7 @@ abstract class AbstractArticlePage extends AbstractPage { " . $conditionBuilder . " GROUP BY tag_to_object.objectID HAVING COUNT(*) >= " . round(count($this->tags) * ARTICLE_RELATED_ARTICLES_MATCH_THRESHOLD / 100) . " - ORDER BY count DESC, MAX(article.time) DESC"; + ORDER BY count DESC, RAND()"; $statement = WCF::getDB()->prepareStatement($sql, ARTICLE_RELATED_ARTICLES); $statement->execute($conditionBuilder->getParameters()); $articleIDs = $statement->fetchAll(\PDO::FETCH_COLUMN); -- 2.20.1