Fix CRM-21589: "Repeat Contributions" report ignores sort.
authorAllen Shaw <allen@JoineryHQ.com>
Thu, 21 Dec 2017 18:30:15 +0000 (12:30 -0600)
committerAllen Shaw <allen@JoineryHQ.com>
Thu, 21 Dec 2017 18:30:15 +0000 (12:30 -0600)
CRM/Report/Form/Contribute/Repeat.php

index 81821de8233d1bea422cdb3091f1676f82d587c1..1d84e5bdbab02675aa5f960c39688cd121510cc2 100644 (file)
@@ -829,10 +829,11 @@ GROUP BY    currency
     $this->from();
     $this->where();
     $this->groupBy();
+    $this->orderBy();
     $this->limit();
 
     $count = 0;
-    $sql = "{$this->_select} {$this->_from} {$this->_where} {$this->_groupBy} {$this->_limit}";
+    $sql = "{$this->_select} {$this->_from} {$this->_where} {$this->_groupBy} {$this->_orderBy} {$this->_limit}";
     $dao = $this->executeReportQuery($sql);
     $rows = array();
     while ($dao->fetch()) {