From: Marcel Werk Date: Mon, 27 Jun 2022 16:04:37 +0000 (+0200) Subject: Fix sorting of articles by number of comments X-Git-Tag: 5.5.0_RC_3~17 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2932e60b4a0105be51e7ea6530442c60ab2ca4ef;p=GitHub%2FWoltLab%2FWCF.git 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. --- 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;