From: Marcel Werk Date: Mon, 23 Nov 2020 14:19:48 +0000 (+0100) Subject: randomized sort order of related articles X-Git-Tag: 5.3.1~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4b73397fb4205fc0093a1385239cd9158265715a;p=GitHub%2FWoltLab%2FWCF.git randomized sort order of related articles --- 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);