ORDER BY Primary Key in MultipleLinkPage
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 9 Feb 2016 18:59:44 +0000 (19:59 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 9 Feb 2016 18:59:44 +0000 (19:59 +0100)
wcfsetup/install/files/lib/page/MultipleLinkPage.class.php

index 36459c242ceb645fe1eed42260e3e5e2f547b872..df6d9e3a28be292dfb07ba247fa73dae25925ed9 100644 (file)
@@ -118,7 +118,9 @@ abstract class MultipleLinkPage extends AbstractPage {
                if ($this->items) {
                        $this->sqlLimit = $this->itemsPerPage;
                        $this->sqlOffset = ($this->pageNo - 1) * $this->itemsPerPage;
-                       if ($this->sortField && $this->sortOrder) $this->sqlOrderBy = $this->sortField." ".$this->sortOrder;
+                       if ($this->sortField && $this->sortOrder) {
+                               $this->sqlOrderBy = $this->sortField." ".$this->sortOrder.", ".$this->objectList->getDatabaseTableIndexName()." ".$this->sortOrder;
+                       }
                        $this->readObjects();
                }
        }