Reactions were not displayed in article list when sorted by title
authorMarcel Werk <burntime@woltlab.com>
Thu, 5 Aug 2021 15:56:02 +0000 (17:56 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 5 Aug 2021 15:56:02 +0000 (17:56 +0200)
wcfsetup/install/files/lib/page/ArticleListPage.class.php

index c98f11982bc09d978e9f08daeff731ea3e78f562..5629b9c98b7d1fba8fd6f781169ac9cd220fa647 100644 (file)
@@ -187,7 +187,10 @@ class ArticleListPage extends SortablePage
         $this->applyFilters();
 
         if ($this->sortField === 'title') {
-            $this->objectList->sqlSelects = "(
+            if (!empty($this->objectList->sqlSelects)) {
+                $this->objectList->sqlSelects .= ',';
+            }
+            $this->objectList->sqlSelects .= "(
                 SELECT  title
                 FROM    wcf" . WCF_N . "_article_content
                 WHERE   articleID = article.articleID