Skip to content

Commit

Permalink
reporting#10 - fix pagination on Contribution Detail report
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaphoneJon committed Feb 22, 2019
1 parent be70413 commit 4a3c55d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CRM/Report/Form/Contribute/Detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,10 @@ public function statistics(&$rows) {
*
* @return string
*/
public function buildQuery($applyLimit = TRUE) {
public function buildQuery($applyLimit = FALSE) {
if ($this->isTempTableBuilt) {
return "SELECT * FROM civireport_contribution_detail_temp3 $this->_orderBy";
$this->limit();
return "SELECT SQL_CALC_FOUND_ROWS * FROM civireport_contribution_detail_temp3 $this->_orderBy $this->_limit";
}
return parent::buildQuery($applyLimit);
}
Expand Down Expand Up @@ -509,7 +510,6 @@ public function beginPostProcessCommon() {
// 1. use main contribution query to build temp table 1
$sql = $this->buildQuery();
$this->createTemporaryTable('civireport_contribution_detail_temp1', $sql);
$this->setPager();

// 2. customize main contribution query for soft credit, and build temp table 2 with soft credit contributions only
$this->queryMode = 'SoftCredit';
Expand Down

0 comments on commit 4a3c55d

Please sign in to comment.