From 2932e60b4a0105be51e7ea6530442c60ab2ca4ef Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 27 Jun 2022 18:04:37 +0200 Subject: [PATCH] Fix sorting of articles by number of comments Sorting by comments resulted in an exception because the comments column is no longer present in the article table. --- .../files/lib/system/box/ArticleListBoxController.class.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/box/ArticleListBoxController.class.php b/wcfsetup/install/files/lib/system/box/ArticleListBoxController.class.php index 44f5494b1f..ed0b49d5ec 100644 --- a/wcfsetup/install/files/lib/system/box/ArticleListBoxController.class.php +++ b/wcfsetup/install/files/lib/system/box/ArticleListBoxController.class.php @@ -49,7 +49,6 @@ class ArticleListBoxController extends AbstractDatabaseObjectListBoxController */ public $validSortFields = [ 'time', - 'comments', 'views', 'random', ]; @@ -74,9 +73,6 @@ class ArticleListBoxController extends AbstractDatabaseObjectListBoxController $objectList = new AccessibleArticleList(); switch ($this->sortField) { - case 'comments': - $objectList->getConditionBuilder()->add('article.comments > ?', [0]); - break; case 'views': $objectList->getConditionBuilder()->add('article.views > ?', [0]); break; -- 2.20.1