From 7255972e118af549574fe9370a762692bba86408 Mon Sep 17 00:00:00 2001 From: "Matthew Wire (MJW Consulting)" Date: Mon, 23 Jul 2018 20:25:54 +0100 Subject: [PATCH] Use same function for 'Contributions' tab count on subtab --- CRM/Contribute/Page/Tab.php | 6 +++--- templates/CRM/Contribute/Page/Tab.tpl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Contribute/Page/Tab.php b/CRM/Contribute/Page/Tab.php index a2f1a578f8..4578fb22da 100644 --- a/CRM/Contribute/Page/Tab.php +++ b/CRM/Contribute/Page/Tab.php @@ -158,7 +158,9 @@ class CRM_Contribute_Page_Tab extends CRM_Core_Page { if ($this->_contactId) { $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactId); $this->assign('displayName', $displayName); - $this->ajaxResponse['tabCount'] = CRM_Contact_BAO_Contact::getCountComponent('contribution', $this->_contactId); + $tabCount = CRM_Contact_BAO_Contact::getCountComponent('contribution', $this->_contactId); + $this->assign('tabCount', $tabCount); + $this->ajaxResponse['tabCount'] = $tabCount; } } @@ -392,8 +394,6 @@ class CRM_Contribute_Page_Tab extends CRM_Core_Page { $qfKey = NULL; } - $session = CRM_Core_Session::singleton(); - switch ($context) { case 'user': $url = CRM_Utils_System::url('civicrm/user', 'reset=1'); diff --git a/templates/CRM/Contribute/Page/Tab.tpl b/templates/CRM/Contribute/Page/Tab.tpl index f38a200afd..c4a9bc2ada 100644 --- a/templates/CRM/Contribute/Page/Tab.tpl +++ b/templates/CRM/Contribute/Page/Tab.tpl @@ -46,7 +46,7 @@