CRM-17763 postMailing hook -- use mailing ID as only param
authorBrian Shaughnessy <brian@lcdservices.biz>
Mon, 4 Jan 2016 11:27:52 +0000 (06:27 -0500)
committerBrian Shaughnessy <brian@lcdservices.biz>
Mon, 4 Jan 2016 11:27:52 +0000 (06:27 -0500)
CRM/Mailing/BAO/MailingJob.php
CRM/Utils/Hook.php

index 4ec5fb4fbc70b61b51611de0b3c75ac10e71deb7..71851049debb97b30a98813df81baf549af512f8 100644 (file)
@@ -287,8 +287,7 @@ class CRM_Mailing_BAO_MailingJob extends CRM_Mailing_DAO_MailingJob {
         $transaction->commit();
 
         // CRM-17763
-        $details = CRM_Mailing_BAO_Mailing::report($job->mailing_id);
-        CRM_Utils_Hook::postMailing($details);
+        CRM_Utils_Hook::postMailing($job->mailing_id);
       }
     }
   }
index 8a95d958adcf0a1e6647d541e0787df9c2c0968a..ced92c3d6d69b10b616e831bd737b23bb662fb62 100644 (file)
@@ -1571,14 +1571,13 @@ abstract class CRM_Utils_Hook {
   /**
    * This hook is called when a CiviMail mailing has completed
    *
-   * @param array $report
-   *   Output from: CRM_Mailing_BAO_Mailing::report()
-   *   Includes details about the mailing, including stats to date, jobs, etc.
+   * @param int $mailingId
+   *   Mailing ID
    *
    * @return mixed
    */
-  public static function postMailing($report) {
-    return self::singleton()->invoke(1, $report,
+  public static function postMailing($mailingId) {
+    return self::singleton()->invoke(1, $mailingId,
       self::$_nullObject, self::$_nullObject,
       self::$_nullObject, self::$_nullObject, self::$_nullObject,
       'civicrm_postMailing'