CRM_Activity_Tokens - Simplify prefetch. Remove special-cases for `actionSearchResult`.
authorTim Otten <totten@civicrm.org>
Wed, 11 Aug 2021 01:13:48 +0000 (18:13 -0700)
committerTim Otten <totten@civicrm.org>
Wed, 11 Aug 2021 01:57:05 +0000 (18:57 -0700)
commit9ae8e0ffd7804b1e7f52b6955dbc954e1b57ea42
tree9fea5fe876f226035538374df55b233c99abf580
parent3b191d7d7a24835a9cd19de49d6577484d5c4182
CRM_Activity_Tokens - Simplify prefetch. Remove special-cases for `actionSearchResult`.

Before: There are two distinct ways in which `CRM_Activity_Tokens` can be called, eg

* For scheduled reminders, it's given `$row->context[actionSearchResult]`. The query is
  inspected for data.
* For everything else, it's given `$row->context[activityId]`. The value is

After: `CRM_Activity_Tokens` always receives activities as `$row->context[activityId]`.

Comment: There are pre-existing tests for activity-based reminders and tokens in
`CRM_Core_BAO_ActionScheduleTest` and `CRM_Activity_ActionMappingTest`.
CRM/Activity/Tokens.php