From: eileenmcnaughton Date: Wed, 16 Dec 2015 18:07:32 +0000 (+0000) Subject: CRM-17118 use shared function to add campaign field X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=69d29ea7598f38875750492ecfaab7d735484bab;p=civicrm-core.git CRM-17118 use shared function to add campaign field This function does some checks to make sure there are enabled campaigns --- diff --git a/CRM/Contribute/Form/UpdateSubscription.php b/CRM/Contribute/Form/UpdateSubscription.php index 1ade6eca22..3c871634a3 100644 --- a/CRM/Contribute/Form/UpdateSubscription.php +++ b/CRM/Contribute/Form/UpdateSubscription.php @@ -159,7 +159,7 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Core_Form { } if (CRM_Core_Permission::check('edit contributions')) { - $this->addEntityRef('campaign_id', 'Campaign', array('entity' => 'Campaign')); + CRM_Campaign_BAO_Campaign::addCampaign($this, CRM_Utils_Array::value('campaign_id', $this->_values)); } $type = 'next';