CRM-17120 remove calls to uncached function
authoreileen <emcnaughton@wikimedia.org>
Wed, 28 Oct 2015 00:11:49 +0000 (13:11 +1300)
committereileen <emcnaughton@wikimedia.org>
Wed, 28 Oct 2015 00:11:49 +0000 (13:11 +1300)
CRM/Case/Form/Activity.php
CRM/Contribute/BAO/ContributionSoft.php
CRM/Contribute/Page/ContributionRecur.php
CRM/Financial/Page/AJAX.php
CRM/Pledge/BAO/Pledge.php

index ac997bc85aaeacd25dd5a0b9f14f28662a4090c3..44a99f08239e0a5bd15fee4ed0a58534da813e53 100644 (file)
@@ -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;
index 62cb90ea845d351c26cc10c7251f19e73cdc6a39..aecf78541a7646e5352a2ed3aa400c863817465a 100644 (file)
@@ -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'] . '<br /> (test)';
index 132b03bb4cbf35e0b8a3e65933fcf4b3de33cfd6..8acb3bfc7407d9272389fcdbaeb13c3d561cfb06 100644 (file)
@@ -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);
index b2a632164bb996186e6a71676153194c19fbeee0..9ccc4d531a0b3e62a6aefa3f04c9e2b85d7f35cb 100644 (file)
@@ -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)) {
index 23920741a52aa1448603526a22f0e58d0d8ed449..78402112a6a3ef64e5908dbca0df35d13502658c 100644 (file)
@@ -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),