[TYPO3-core] RFC #16911: Restructure of t3lib_utility_Mail hook subscriber

Jeff Segars jsegars at alumni.rice.edu
Wed Jan 5 00:54:16 CET 2011


On 1/4/11 7:55 AM, Jigal van Hemert wrote:
> Hi,
>
> This is a SVN patch request.
>
> Type: Bugfix / Clean up
>
> BT reference: http://bugs.typo3.org/view.php?id=16911
>
> Branches: trunk
>
> Problem:
> t3lib_utility_Mail used callUserFunc for a hook. This hook was used to
> reroute all mails from that class to the new Swift Mailer. The result
> was an ugly class name and pretty messy code.
>
> Solution:
> Ingo Renner supplied a nice interface and modified the hook to allow
> clean use of that interface.
> Changes of issue 16879 are included in this rewrite.
> A small fix for quoted display names is included.
> Some lengthy pieces of code and repeating code were moved to separate
> methods.
>
> How to test:
> Make form content element and test with and without "HTML mode enabled"
>
> Notes:
> Maybe t3lib/mail/class.tx_t3lib_mail_hooks.php needs to be renamed to
> t3lib/mail/class.t3lib_mail_swiftmaileradapter.php before applying the
> patch.
> Furthermore this file had Windows line endings; these have been changed
> to Unix line endings. Maybe this needs to be done before applying the
> patch if errors about failing chunks appear.
>

Haven't made it through a full review here yet, but figured the attached 
patch might be useful for others reviewing.  It's the diff between what 
was in tx_t3lib_mail_hooks and is now in t3lib_mail_swiftmailadapter 
with whitespace changes ignored.

Thanks,
Jeff
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 16911_userfunc_to_interface.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110104/8bfa1f8a/attachment-0001.asc>


More information about the TYPO3-team-core mailing list