From b76173070d6e4180812c63ded0085d6533b037d9 Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 28 Oct 2015 13:11:49 +1300 Subject: [PATCH] CRM-17120 remove calls to uncached function --- CRM/Case/Form/Activity.php | 2 +- CRM/Contribute/BAO/ContributionSoft.php | 4 ++-- CRM/Contribute/Page/ContributionRecur.php | 2 +- CRM/Financial/Page/AJAX.php | 2 +- CRM/Pledge/BAO/Pledge.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CRM/Case/Form/Activity.php b/CRM/Case/Form/Activity.php index ac997bc85a..44a99f0823 100644 --- a/CRM/Case/Form/Activity.php +++ b/CRM/Case/Form/Activity.php @@ -259,7 +259,7 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity { $this->_fields['followup_activity_type_id']['attributes'] = array('' => '- select activity type -') + $aTypes; } - $result = parent::buildQuickForm(); + parent::buildQuickForm(); if ($this->_action & (CRM_Core_Action::DELETE | CRM_Core_Action::DETACH | CRM_Core_Action::RENEW)) { return; diff --git a/CRM/Contribute/BAO/ContributionSoft.php b/CRM/Contribute/BAO/ContributionSoft.php index 62cb90ea84..aecf78541a 100644 --- a/CRM/Contribute/BAO/ContributionSoft.php +++ b/CRM/Contribute/BAO/ContributionSoft.php @@ -329,7 +329,7 @@ class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_Contributio 'amount' => $dao->amount, 'contact_name' => $dao->display_name, 'soft_credit_type' => $dao->soft_credit_type_id, - 'soft_credit_type_label' => CRM_Core_OptionGroup::getLabel('soft_credit_type', $dao->soft_credit_type_id), + 'soft_credit_type_label' => CRM_Core_PseudoConstant::getLabel('CRM_Contribute_BAO_ContributionSoft', 'soft_credit_type_id', $dao->soft_credit_type_id), ); $count++; } @@ -437,7 +437,7 @@ class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_Contributio $result[$cs->id]['pcp_roll_nickname'] = $cs->pcp_roll_nickname; $result[$cs->id]['pcp_personal_note'] = $cs->pcp_personal_note; $result[$cs->id]['contribution_status'] = CRM_Utils_Array::value($cs->contribution_status_id, $contributionStatus); - $result[$cs->id]['sct_label'] = CRM_Core_OptionGroup::getLabel('soft_credit_type', $cs->soft_credit_type_id); + $result[$cs->id]['sct_label'] = CRM_Core_PseudoConstant::getLabel('CRM_Contribute_BAO_ContributionSoft', 'soft_credit_type_id', $cs->soft_credit_type_id); if ($isTest) { $result[$cs->id]['contribution_status'] = $result[$cs->id]['contribution_status'] . '
(test)'; diff --git a/CRM/Contribute/Page/ContributionRecur.php b/CRM/Contribute/Page/ContributionRecur.php index 132b03bb4c..8acb3bfc74 100644 --- a/CRM/Contribute/Page/ContributionRecur.php +++ b/CRM/Contribute/Page/ContributionRecur.php @@ -59,7 +59,7 @@ class CRM_Contribute_Page_ContributionRecur extends CRM_Core_Page { } // get contribution status label if (!empty($values['contribution_status_id'])) { - $values['contribution_status'] = CRM_Core_OptionGroup::getLabel('contribution_status', $values['contribution_status_id']); + $values['contribution_status'] = CRM_Core_PseudoConstant::getLabel('CRM_Contribute_BAO_ContributionRecur', 'contribution_status_id', $values['contribution_status_id']); } $this->assign('recur', $values); diff --git a/CRM/Financial/Page/AJAX.php b/CRM/Financial/Page/AJAX.php index b2a632164b..9ccc4d531a 100644 --- a/CRM/Financial/Page/AJAX.php +++ b/CRM/Financial/Page/AJAX.php @@ -487,7 +487,7 @@ class CRM_Financial_Page_AJAX { } $batchPID = CRM_Core_DAO::getFieldValue('CRM_Batch_DAO_Batch', $entityID, 'payment_instrument_id'); - $paymentInstrument = CRM_Core_OptionGroup::getLabel('payment_instrument', $batchPID); + $paymentInstrument = CRM_Core_PseudoConstant::getLabel('CRM_Batch_BAO_Batch', 'payment_instrument_id', $batchPID); foreach ($cIDs as $key => $value) { $recordPID = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialTrxn', $value, 'payment_instrument_id'); if ($action == 'Remove' || ($recordPID == $batchPID && $action == 'Assign') || !isset($batchPID)) { diff --git a/CRM/Pledge/BAO/Pledge.php b/CRM/Pledge/BAO/Pledge.php index 23920741a5..78402112a6 100644 --- a/CRM/Pledge/BAO/Pledge.php +++ b/CRM/Pledge/BAO/Pledge.php @@ -466,7 +466,7 @@ GROUP BY currency $pledgeDAO->id = $pledgePaymentDAO->pledge_id; if ($pledgeDAO->find(TRUE)) { $params[$pledgeDAO->id] = array( - 'honor_type' => CRM_Core_OptionGroup::getLabel('soft_credit_type', $honorDAO->soft_credit_type_id, 'value'), + 'honor_type' => CRM_Core_PseudoConstant::getLabel('CRM_Contribute_BAO_ContributionSoft', 'soft_credit_type_id', $honorDAO->soft_credit_type_id), 'honorId' => $pledgeDAO->contact_id, 'amount' => $pledgeDAO->amount, 'status' => CRM_Contribute_PseudoConstant::contributionStatus($pledgeDAO->status_id), -- 2.25.1