CRM-15108 - Redirect back to starting point after adding contacts to group
authorColeman Watts <coleman@civicrm.org>
Fri, 15 Aug 2014 18:01:05 +0000 (19:01 +0100)
committerColeman Watts <coleman@civicrm.org>
Fri, 15 Aug 2014 18:01:05 +0000 (19:01 +0100)
CRM/Contact/Form/Task/AddToGroup.php

index 593f28dc0c05fdc84030763affddac4162b2cc93..cb2aca15c8ea01c799c9eeef23d16426ecf74327 100644 (file)
@@ -246,6 +246,10 @@ class CRM_Contact_Form_Task_AddToGroup extends CRM_Contact_Form_Task {
     }
     $status = '<ul><li>' . implode('</li><li>', $status) . '</li></ul>';
     CRM_Core_Session::setStatus($status, ts('Added Contact to %1', array(1 => $groupName, 'count' => $added, 'plural' => 'Added Contacts to %1')), 'success', array('expires' => 0));
+
+    if ($this->_context === 'amtg') {
+      CRM_Core_Session::singleton()->pushUserContext(CRM_Utils_System::url('civicrm/group/search', "reset=1&force=1&context=smog&gid=$groupID"));
+    }
   }
   //end of function
 }