Remove duplicate call to contribution summary
authoreileen <emcnaughton@wikimedia.org>
Tue, 20 Nov 2018 07:31:14 +0000 (20:31 +1300)
committereileen <emcnaughton@wikimedia.org>
Thu, 22 Nov 2018 01:42:36 +0000 (14:42 +1300)
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

index 194a44ff49d1a5639b99e8949bf7cbf4855ee226..d8c2640b54101cf094355dbabd498c58f4e54913 100644 (file)
@@ -387,9 +387,7 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search {
     if ($this->_context == 'user') {
       $query->setSkipPermission(TRUE);
     }
-    $summary = &$query->summaryContribution($this->_context);
-    $this->set('summary', $summary);
-    $this->assign('contributionSummary', $summary);
+
     $controller->run();
   }