From 18f383f8fbce6be1aa8dd99a3ad95d3040a0316e Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 20 Nov 2018 20:31:14 +1300 Subject: [PATCH] Remove duplicate call to contribution summary This is an expensive call (we get it at over 10 seconds for high giving contacts in a large database) and it is quite simply called twice. Removing these few lines knock out several expensive queries but I have checked contribution tab, user dashboard, contribution search and advanced search displayed as contributions and can find no instances where less info is shown. (in the case of advanced search displayed as contributions it doesn't show before or after) --- CRM/Contribute/Form/Search.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CRM/Contribute/Form/Search.php b/CRM/Contribute/Form/Search.php index 194a44ff49d1..d8c2640b5410 100644 --- a/CRM/Contribute/Form/Search.php +++ b/CRM/Contribute/Form/Search.php @@ -387,9 +387,7 @@ public function postProcess() { if ($this->_context == 'user') { $query->setSkipPermission(TRUE); } - $summary = &$query->summaryContribution($this->_context); - $this->set('summary', $summary); - $this->assign('contributionSummary', $summary); + $controller->run(); }