Merge pull request #22629 from braders/attachmentInfo-docblock
[civicrm-core.git] / CRM / Campaign / Form / Task.php
index 3b9844e2715cbebd1fcab45b0b5fd20699567f7c..924e49ed4f29b6d772ff7c4dee7d476521b3e09e 100644 (file)
@@ -35,7 +35,7 @@ class CRM_Campaign_Form_Task extends CRM_Core_Form_Task {
 
     $this->_task = $values['task'];
 
-    $ids = $form->getSelectedIDs($values);
+    $ids = $this->getSelectedIDs($values);
 
     if (!$ids) {
       $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
@@ -52,15 +52,7 @@ class CRM_Campaign_Form_Task extends CRM_Core_Form_Task {
     $this->_voterIds = $this->_contactIds = $this->_componentIds = $ids;
 
     $this->assign('totalSelectedContacts', count($this->_contactIds));
-
-    //set the context for redirection for any task actions
-    $session = CRM_Core_Session::singleton();
-    $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
-    $urlParams = 'force=1';
-    if (CRM_Utils_Rule::qfKey($qfKey)) {
-      $urlParams .= '&qfKey=' . $qfKey;
-    }
-    $session->replaceUserContext(CRM_Utils_System::url('civicrm/survey/search', $urlParams));
+    $this->setNextUrl('survey');
   }
 
   /**