CRM-16923 refine setting of enotices on dodgey setting of processor
authoreileenmcnaughton <eileen@fuzion.co.nz>
Wed, 29 Jul 2015 09:09:42 +0000 (09:09 +0000)
committereileenmcnaughton <eileen@fuzion.co.nz>
Wed, 29 Jul 2015 09:09:42 +0000 (09:09 +0000)
CRM/Contribute/BAO/Contribution.php

index 2e7d984c6c0c860d7e7502f739a2e9ce60b92103..a66437c8bf43960d5a42cd66f9f91381fbf31305 100644 (file)
@@ -2091,7 +2091,9 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
         $this->contribution_page_id,
         'payment_processor'
       );
-      $intentionalEnotice = $CRM16923AnUnreliableMethodHasBeenUserToDeterminePaymentProcessorFromContributionPage;
+      if ($paymentProcessorID) {
+        $intentionalEnotice = $CRM16923AnUnreliableMethodHasBeenUserToDeterminePaymentProcessorFromContributionPage;
+      }
     }
 
     if (!empty($ids['contributionRecur'])) {
@@ -2209,7 +2211,9 @@ WHERE  contribution_id = %1 ";
       // in future we should look at throwing an exception here rather than an dubious guess.
       if (!$paymentProcessorID) {
         $paymentProcessorID = $this->_relatedObjects['event']->payment_processor;
-        $intentionalEnotice = $CRM16923AnUnreliableMethodHasBeenUserToDeterminePaymentProcessorFromEvent;
+        if ($paymentProcessorID) {
+          $intentionalEnotice = $CRM16923AnUnreliableMethodHasBeenUserToDeterminePaymentProcessorFromEvent;
+        }
       }
     }