(dev/mail/5) "New Mailing" - Previews should not schedule real blasts
In `CRM_Mailing_BAO_Mailing::create` and `Mailing.create` API, there is a (*ahem*) special behavior where setting the `scheduled_date` will immediately trigger scheduling. One shouldn't submit `scheduled_date` for a preview. This was not symptomatic before #11142/v4.7.31 because all preview operations were wrapped in a transaction and rolled back. But now previews are allowed to have side-effects, so we need some other means to prevent. This copies the workaround from `crmMailingMgr.save()` and applies it to `crmMailingMgr.preview()` (etal).
Showing with 3 additions and 0 deletions