dev/core#2814 Fix activity:sendEmail to use renderTemplate
authorEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 3 Sep 2021 22:53:42 +0000 (10:53 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sat, 4 Sep 2021 23:24:36 +0000 (11:24 +1200)
commit0952020a3389b888bd2e5d72b4e878211e69ba23
treed51ff6b6b3747266a251eef05e4eaca9840ab950
parent50991431cfdc5a98179404d5d9ba3f2ecc445301
dev/core#2814 Fix activity:sendEmail to use renderTemplate

Note that this does create a situation where more queries could occur but
1) this is only called in core from the email task - which is limited to 50 contacts so it
is low-volume
2) this is really the start of a cleanup - there are other places where
queries can be removed when we look at the total flow but I feel we need to get
some simplification happening first & hence have picked on this focus
as the first step (ie removing the calls to replaceContactTokens)
3) this seems to be called in extensions to some extent - and it should still work
- there might be more queries but I think the 'support contract' for calling an
unsupported function does not include it working in ways not required by
core code
CRM/Activity/BAO/Activity.php
tests/phpunit/CRM/Activity/BAO/ActivityTest.php