From 17dea6fa47ef23afb2d9fded795535047f0d6abd Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Fri, 20 Nov 2015 17:09:24 -0500 Subject: [PATCH] CRM-17586 - fix for coding standards. --- CRM/Report/Form/Contribute/PCP.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/CRM/Report/Form/Contribute/PCP.php b/CRM/Report/Form/Contribute/PCP.php index 8ed35a035f..8856646730 100644 --- a/CRM/Report/Form/Contribute/PCP.php +++ b/CRM/Report/Form/Contribute/PCP.php @@ -265,10 +265,10 @@ LEFT JOIN civicrm_contribution_page {$this->_aliases['civicrm_contribution_page' $statistics = parent::statistics($rows); // Calculate totals from the civicrm_contribution_soft table. - $select - = "SELECT SUM({$this->_aliases['civicrm_contribution_soft']}.amount) as committed_total, " . - "COUNT({$this->_aliases['civicrm_contribution_soft']}.id) as donors_total, " . - "SUM(IF( contribution_civireport.contribution_status_id > 1, 0, contribution_soft_civireport.amount)) AS received_total "; + $select = "SELECT SUM({$this->_aliases['civicrm_contribution_soft']}.amount) " + . "as committed_total, COUNT({$this->_aliases['civicrm_contribution_soft']}.id) " + . "as donors_total, SUM(IF( contribution_civireport.contribution_status_id > 1, 0, " + . "contribution_soft_civireport.amount)) AS received_total "; $sql = "{$select} {$this->_from} {$this->_where}"; $dao = CRM_Core_DAO::executeQuery($sql); $dao->fetch(); @@ -278,12 +278,11 @@ LEFT JOIN civicrm_contribution_page {$this->_aliases['civicrm_contribution_page' // Calculate goal total goal from the PCP table (we only want one result per // PCP page - the query above produces one result per contribution made). - $sql = - "SELECT SUM(goal_amount) as goal_total FROM civicrm_pcp WHERE ". - "goal_amount IS NOT NULL AND id IN (" . - "SELECT DISTINCT {$this->_aliases['civicrm_pcp']}.id {$this->_from} ". - "{$this->_where}". - ")"; + $sql = "SELECT SUM(goal_amount) as goal_total FROM civicrm_pcp WHERE " + . "goal_amount IS NOT NULL AND id IN (" + . "SELECT DISTINCT {$this->_aliases['civicrm_pcp']}.id {$this->_from} " + . "{$this->_where}" + . ")"; $dao = CRM_Core_DAO::executeQuery($sql); $dao->fetch(); $goal_total = $dao->goal_total; -- 2.25.1