Details
-
Type: Patch
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.0.4, 3.1
-
Fix Version/s: 3.2
-
Component/s: CiviMail, CiviMember
-
Labels:None
Description
To introduce support for hook tokens in civimail and membership reminder emails, this patch against 3.0.4:
- Adds a bootstrap step in civimail.cronjob.php and UpdateMembershipRecord.php(.txt) to make token hooks declared in Drupal modules visible to those scripts (see http://forum.civicrm.org/index.php?topic=11021.0).
- Renames conf_init in civicrm.config.php to civicrm_conf_init to avoid a naming conflict when bootstrapping drupal.
- Moves the 'compose' stage of the membership reminder emails from sendReminder to slightly altered copy of compose in Mailing.php. The work being done in sendReminder seemed to parallel older versions of the compose function. It was more straightforward to adapt the compose function to be used with sendReminder than to copy several mailing functions called by compose into MessageTemplates.php to bring it up to speed with hook tokens.
Though I don't have a 3.1 install at the moment, looking at the code for MessageTemplates.php in 3.1beta6 leads me to believe that the same issue also applies there. The bootstrapping step in the bin/ files is slightly kludgy as it requires the user to set their drupal base path.