Merge pull request #1387 from deepak-srivastava/logrev
[civicrm-core.git] / api / v3 / MailingEventUnsubscribe.php
index efdee308cc237ecfd88d2a9d53ff7a7b1186e3a6..53a624bcc3a8b553d15bdca08f1fa6ba57c62354 100644 (file)
  */
 function civicrm_api3_mailing_event_unsubscribe_create($params) {
 
-  $job   = $params['job_id'];
+  $job = $params['job_id'];
   $queue = $params['event_queue_id'];
-  $hash  = $params['hash'];
+  $hash = $params['hash'];
   if (empty($params['org_unsubscribe'])) {
     $groups = CRM_Mailing_Event_BAO_Unsubscribe::unsub_from_mailing($job, $queue, $hash);
     if (count($groups)) {
       CRM_Mailing_Event_BAO_Unsubscribe::send_unsub_response($queue, $groups, FALSE, $job);
       return civicrm_api3_create_success($params);
     }
-    if (!groups) {}
   }
   else {
     $unsubs = CRM_Mailing_Event_BAO_Unsubscribe::unsub_from_domain($job, $queue, $hash);