Eileen McNaughton [Fri, 13 Aug 2021 06:49:47 +0000 (18:49 +1200)]
Move financial acl setting to the extension
Eileen McNaughton [Fri, 13 Aug 2021 06:21:15 +0000 (18:21 +1200)]
Merge pull request #21115 from totten/master-rendertpl
MessageTemplate - Add renderTemplate(). Deprecate renderMessageTemplate().
Eileen McNaughton [Fri, 13 Aug 2021 06:03:03 +0000 (18:03 +1200)]
Merge pull request #21117 from civicrm/5.41
5.41 to master
Eileen McNaughton [Fri, 13 Aug 2021 05:56:17 +0000 (17:56 +1200)]
Merge pull request #21107 from MegaphoneJon/clean-override-total
delocalize total amount before passing to setOverrideTotal
Tim Otten [Mon, 12 Jul 2021 04:24:38 +0000 (21:24 -0700)]
MessageTemplate - Deprecate renderMessageTemplate(). Prefer renderTemplate() and TokenSmarty::render(). Add tests
Seamus Lee [Fri, 13 Aug 2021 01:27:48 +0000 (11:27 +1000)]
Merge pull request #21113 from seamuslee001/master
5.41
Seamus Lee [Fri, 13 Aug 2021 01:26:44 +0000 (11:26 +1000)]
Merge in 5.41
Seamus Lee [Fri, 13 Aug 2021 01:22:45 +0000 (11:22 +1000)]
Merge pull request #21108 from seamuslee001/5.41
[REF] Upgrade CKEditor to 4.16.2
Seamus Lee [Fri, 13 Aug 2021 01:22:11 +0000 (11:22 +1000)]
Merge pull request #21111 from civicrm/5.41
5.41
Seamus Lee [Thu, 12 Aug 2021 23:35:09 +0000 (09:35 +1000)]
Merge pull request #21104 from totten/5.41-typo
(NFC) release-notes - Fix typo
Seamus Lee [Thu, 12 Aug 2021 23:34:36 +0000 (09:34 +1000)]
Merge pull request #21100 from eileenmcnaughton/exceptless
dev/core#2749 remove exception when no payment processor configured when no payment processor configured
Seamus Lee [Thu, 12 Aug 2021 22:21:06 +0000 (08:21 +1000)]
[REF] Upgrade CKEditor to 4.16.2
Seamus Lee [Thu, 12 Aug 2021 22:12:29 +0000 (08:12 +1000)]
Merge pull request #21046 from eileenmcnaughton/camp
dev/core#2747 Reconcile remaining fields between scheduled reminders and legacy tokens
Jon Goldberg [Thu, 12 Aug 2021 21:55:57 +0000 (17:55 -0400)]
delocalize total amount before passing to setOverrideTotal
Tim Otten [Thu, 12 Aug 2021 20:47:59 +0000 (13:47 -0700)]
(NFC) release-notes/5.39.1.md - Fix typo
Typo was autogenerated from a template. Template is also fixed.
colemanw [Thu, 12 Aug 2021 14:28:37 +0000 (10:28 -0400)]
Merge pull request #21094 from mattwire/hideextensionkeyupgrade
Replace extension key with label during install/upgrade/disable/uninstall
demeritcowboy [Thu, 12 Aug 2021 12:55:18 +0000 (08:55 -0400)]
Merge pull request #21096 from mattwire/guzzletimeout
Respect http_timeout core setting for Guzzle HTTP requests
Monish Deb [Thu, 12 Aug 2021 12:11:30 +0000 (17:41 +0530)]
Merge pull request #20936 from eileenmcnaughton/mem_order
dev/core#2717 Use Same order ->payment flow for non recurring back of…
Eileen McNaughton [Thu, 12 Aug 2021 04:29:46 +0000 (16:29 +1200)]
Merge pull request #21076 from eileenmcnaughton/camp_name
Token Parser - Allow tokens with multiple dots (eg {contribution.contribution_recur_id.amount})
Eileen McNaughton [Thu, 12 Aug 2021 02:04:18 +0000 (14:04 +1200)]
Merge pull request #20991 from eileenmcnaughton/invoice
dev/core#2719 [REF] Remove a couple more (tested) references to legacy contribution_invoice_settings
Tim Otten [Thu, 12 Aug 2021 00:53:11 +0000 (17:53 -0700)]
TokenProcessorTest - Ensure that tokens with dots and colons are processable
Eileen McNaughton [Wed, 11 Aug 2021 22:43:52 +0000 (10:43 +1200)]
dev/core#2749 remove exception when no payment processor configuredhen no payment processor configured
This is an attempt to fix a regression https://lab.civicrm.org/dev/core/-/issues/2749
when there are legitimately no payment processors assigned to a page.
I feel like the configuration screens are adequate to enforce this & having an exception like
this in the assign function is the wrong place.
The original issue is that the is_monetary box was not checked & hence the
processor wasn't assigned. This felt like asking users to understand that
a payment method when money options are configured
Tim Otten [Thu, 12 Aug 2021 00:24:45 +0000 (17:24 -0700)]
Merge pull request #21080 from twomice/2673_subject_token_empty_body
(dev/core#2673) Email Tokens - Custom tokens in `subject` block similar tokens in `body`
Eileen McNaughton [Wed, 11 Aug 2021 20:19:22 +0000 (08:19 +1200)]
Simplify calls to is_email_pdf
Per reviewer feedback - we don't need to check more than just the one setting. The
UI (for better or worse) ties the 2 together so under normal operation
they will be set together but we don't need to check that
Eileen McNaughton [Mon, 2 Aug 2021 00:33:29 +0000 (12:33 +1200)]
dev/core#2719 [REF] Remove a couple more (tested) references to legacy contribution_invoice_settings
Eileen McNaughton [Wed, 11 Aug 2021 23:04:09 +0000 (11:04 +1200)]
Merge pull request #21095 from colemanw/searchDisplayFix
[REF] SearchKit - Use non-deprecated join syntax when loading standalone displays
Eileen McNaughton [Wed, 11 Aug 2021 22:20:54 +0000 (10:20 +1200)]
Merge pull request #21098 from totten/master-action-batch-nfc
(NFC) MailingQueryEvent - Add more docblocks about query-writing and `tokenContext_*`
Matthew Wire [Wed, 11 Aug 2021 21:16:18 +0000 (22:16 +0100)]
tpl notice fixes
Matthew Wire [Wed, 11 Aug 2021 14:26:20 +0000 (15:26 +0100)]
Replace extension key with label during install/upgrade/disable/uninstall
Tim Otten [Wed, 11 Aug 2021 20:46:38 +0000 (13:46 -0700)]
(NFC) MailingQueryEvent - Add more docblocks about query-writing and `tokenContext_*`
Matthew Wire [Wed, 11 Aug 2021 20:44:32 +0000 (21:44 +0100)]
Merge pull request #21088 from totten/master-action-batch
ActionSchedule - Pass real batches into TokenProcessor. Simplify CRM_Activity_Tokens.
Matthew Wire [Wed, 11 Aug 2021 20:40:28 +0000 (21:40 +0100)]
Merge pull request #21091 from totten/master-schedui-acttok
Scheduled Reminders UI - Show more activity tokens in admin GUI
colemanw [Wed, 11 Aug 2021 20:34:21 +0000 (16:34 -0400)]
Merge pull request #21089 from colemanw/afformCleanup
[REF] Afform - Code cleanup in LoadAdminData API action
Matthew Wire [Wed, 11 Aug 2021 16:20:14 +0000 (17:20 +0100)]
Respect http_timeout core setting for Guzzle HTTP requests
Coleman Watts [Wed, 11 Aug 2021 15:14:20 +0000 (11:14 -0400)]
SearchKit - Use non-deprecated join syntax when loading standalone displays
Eileen McNaughton [Wed, 11 Aug 2021 08:19:30 +0000 (20:19 +1200)]
Permit parsing of related entity tokens
This fixes the regex portion for related entities tokens eg.
{participant.event_id.title}
Note the reason for this originally
is not needed but keeping the regex parts
Eileen McNaughton [Wed, 11 Aug 2021 07:58:19 +0000 (19:58 +1200)]
Add no-prefetch campaign psuedoconstant
Eileen McNaughton [Thu, 5 Aug 2021 23:08:19 +0000 (11:08 +1200)]
Reconcile remaining fields between scheduled reminders and legacy tokens
This adds the last fields that were in legacy tokens but not scheduled reminders and now
the same code is deriving the list for each. I wound up UI testing rather than unit
testing that custom fields are still advertised without this line
as the test uses rollback & adding custom fields would break that.
Eileen McNaughton [Wed, 11 Aug 2021 07:44:47 +0000 (19:44 +1200)]
Merge pull request #21081 from colemanw/upgradeAngularFileUploader
Upgrade angular-file-uploader to v2.6.1
Tim Otten [Wed, 11 Aug 2021 06:40:33 +0000 (23:40 -0700)]
Merge pull request #21092 from totten/master-acttok-test
(NFC) Expand test coverage for scheduled-reminders with `{activity.*}` tokens
Coleman Watts [Tue, 10 Aug 2021 19:57:43 +0000 (15:57 -0400)]
Upgrade angular-file-uploader to v2.6.1
Tim Otten [Wed, 11 Aug 2021 04:27:14 +0000 (21:27 -0700)]
Merge pull request #21090 from totten/master-tokproc-diag
(NFC) TokenProcessorTest - Add scenario inspired by dev/core#2673
Matthew Wire [Wed, 11 Aug 2021 04:08:12 +0000 (21:08 -0700)]
Scheduled Reminders UI - Show activity tokens in admin GUI
Matthew Wire [Wed, 11 Aug 2021 04:07:47 +0000 (21:07 -0700)]
Add actionschedule test for activity tokens
Tim Otten [Wed, 11 Aug 2021 04:01:47 +0000 (21:01 -0700)]
Merge pull request #21086 from colemanw/removeUnusedCode
CRM_Core_Component - Remove unused code
Tim Otten [Wed, 11 Aug 2021 02:40:17 +0000 (19:40 -0700)]
TokenProcessorTest - Add scenario inspired by dev/core#2673
Eileen McNaughton [Wed, 11 Aug 2021 02:13:21 +0000 (14:13 +1200)]
Merge pull request #21087 from seamuslee001/pear_db_upgrade
Upgrade Pear/DB package to be version 1.11.0
Coleman Watts [Wed, 11 Aug 2021 02:06:49 +0000 (22:06 -0400)]
Afform - Code cleanup in LoadAdminData API action
colemanw [Wed, 11 Aug 2021 02:00:09 +0000 (22:00 -0400)]
Merge pull request #21083 from eileenmcnaughton/camp_pseudo
Fix caching on campaign pseudoconstant
Tim Otten [Wed, 11 Aug 2021 01:13:48 +0000 (18:13 -0700)]
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`.
Tim Otten [Tue, 10 Aug 2021 05:59:54 +0000 (22:59 -0700)]
(REF) ActionSchedule - Pass through SQL fields named "tokenContext_*"
This will help us to consolidate the prefetching logic in `CRM_*_Tokens`.
Currently, `CRM_*_Token::alterActionScheduleQuery()` updates the query to select all fields for the entity.
This is regardless of how many fields there are, whether they are needed, etc. This is also prone to naming conflicts.
With this patch, `CRM_*_Token::alterActionScheduleQuery()` only needs to select one field (`tokenContext_fooId`). This
will then propagate to the `TokenProcessor` which can do its own optimized data-loading.
Tim Otten [Wed, 11 Aug 2021 00:52:13 +0000 (17:52 -0700)]
ActionSchedule - Fill TokenProcessor will real batches
Background: `ActionSchedule::sendMailings()` fetches a batch of pending reminders (per
some specific schedule/rule). Then it composes and sends a message for each.
Before: For each item in the batch, it makes a new `TokenProcessor`. This
means that the `TokenProcessor` only sees one pending reminder. Therefore, the
`TokenProcessor` cannot meaningfully fetch batched data.
After: It creates one `TokenProcessor` and adds rows for each pending
reminder. This means that `TokenProcessor` can fetch batched data.# On
branch master-action-batch
Comments: This part of a longer plot to simplify the `CRM_*_Tokens`.
Currently, `CRM_*_Tokens` implements duplicate prefetch mechanisms -- the
general-purpose `prefetch()` and the special-purpose
`alterActionScheduleQuery()`. This patch makes it possible to use
`prefetch()` for all the real work of prefetching (and phasing-out
`alterActionScheduleQuery()`).
Tim Otten [Wed, 11 Aug 2021 00:11:00 +0000 (17:11 -0700)]
(REF) ActionSchedule - Remove unused `try`/`catch(TokenException $e)`
This try/catch block purports to catch any exceptions of type `TokenException`.
However, if you grep the source tree, you will find that `TokenException` is never thrown.
Tim Otten [Wed, 11 Aug 2021 01:56:35 +0000 (18:56 -0700)]
Merge pull request #21085 from totten/master-action-lang
Scheduled Reminders - Pass locale through to TokenProcessor
colemanw [Wed, 11 Aug 2021 01:28:15 +0000 (21:28 -0400)]
Merge pull request #21078 from eileenmcnaughton/con
[Ref] Simplify IF clause
Seamus Lee [Wed, 11 Aug 2021 00:39:47 +0000 (10:39 +1000)]
Upgrade PearDB to 1.11.0 following upstream merge of some of CiviCRM's patches
Seamus Lee [Wed, 11 Aug 2021 00:37:10 +0000 (10:37 +1000)]
Update pear db patch following new release upstream
Coleman Watts [Wed, 11 Aug 2021 00:04:06 +0000 (20:04 -0400)]
CRM_Core_Component - Remove unused code
Eileen McNaughton [Tue, 10 Aug 2021 21:42:22 +0000 (09:42 +1200)]
Fix caching on campaign pseudoconstant
Eileen McNaughton [Tue, 10 Aug 2021 23:59:14 +0000 (11:59 +1200)]
Merge pull request #21084 from colemanw/fixGetInfoItem
APIv4 - Silently ignore errors in CoreUtil::getInfoItem()
Tim Otten [Tue, 10 Aug 2021 23:45:21 +0000 (16:45 -0700)]
ActionSchedule - Set locale during mail hooks / delivery / etc
From a core POV, this should be unnecessary. And I'm not sure that it's a
good idea for contrib to assume that the locale has been set to the email
receipient. (It probably isn't done that way in some contexts.)
Never-the-less, this should provide greater continuity with the pre-existing
behavior. If anyone, say, uses `Hook::alterMail()` to append a translated
footer, then it should continue to work in the same way as before.
Tim Otten [Tue, 10 Aug 2021 04:13:57 +0000 (21:13 -0700)]
ActionSchedule - Convert from global `setLocale()` to `$context['locale']`
Before: Runs `setLocale()` and then executes the entire pipeline for `TokenProcessor`
After: Leaves the global locale alone. Instead, rely on `TokenProcessor` to switch locale
as it visits each recipient.
Tim Otten [Tue, 10 Aug 2021 03:55:44 +0000 (20:55 -0700)]
TokenProcessor - If there is a `locale`, then use it
There are two likely ways in which a tokenized email winds up with localized strings - either
the Smarty `{ts}...{/ts}` tags define it, or a custom/hook-based tag uses `ts()`.
This ensures that the locale is set in both cases.
It's hypothetically possible that some other `civi.token.eval` listeners
need to use the `row->context['locale']`. However, I grepped universe and
couldn't find anything that would be affected. (There were two contrib
listeners for `civi.token.eval` and neither seemed to be affected.)
Tim Otten [Tue, 10 Aug 2021 03:49:30 +0000 (20:49 -0700)]
(REF) ActionSchedule - Convert setCommunicationLanguage(...) to setLocale(pickLocale(...))
Tim Otten [Tue, 10 Aug 2021 23:18:50 +0000 (16:18 -0700)]
CRM_Utils_AutoClean - Add variant of `swap()` tuned for setting locale
This can currently be done with `swap()`, but we may be doing this several
times, and `swapLocale()` is a little more pithy and a little more
microoptimal.
Coleman Watts [Tue, 10 Aug 2021 22:03:15 +0000 (18:03 -0400)]
APIv4 - Silently ignore errors in CoreUtil::getInfoItem()
Fixes dev/core#2751
Allen Shaw [Tue, 10 Aug 2021 17:51:53 +0000 (12:51 -0500)]
Use recursive array merge to fix issue with tokens in subject and body.
dev/core#2673: In an email, a token from an extension in a subject will inhibits the same token group in the email body.
Eileen McNaughton [Tue, 10 Aug 2021 09:04:55 +0000 (21:04 +1200)]
Merge pull request #21077 from johntwyman/fix-setPreUpgradeMessage-function
Fix the check to see if the financialAclExtension is installed
Eileen McNaughton [Tue, 10 Aug 2021 07:25:59 +0000 (19:25 +1200)]
[Ref] Simplify IF clause
This if is only reached if contributionStatus is completed - ergo it can't be anything else - poof.
Also previousStatus will be empty if previous_status_id is not set - so the in_array(previousStatus)
check is enough
John Twyman [Tue, 10 Aug 2021 06:48:00 +0000 (16:48 +1000)]
Fix the check to see if the financialAclExtension is installed
Eileen McNaughton [Tue, 10 Aug 2021 06:35:09 +0000 (18:35 +1200)]
Merge pull request #21074 from demeritcowboy/nocc
Remove no longer used variable in Email.tpl / smarty warning
Eileen McNaughton [Tue, 10 Aug 2021 03:22:56 +0000 (15:22 +1200)]
Merge pull request #21067 from eileenmcnaughton/email2
[Ref] extract function to getEmailDefaults
Eileen McNaughton [Tue, 10 Aug 2021 02:35:04 +0000 (14:35 +1200)]
Merge pull request #21073 from totten/master-sendtpl
MessageTemplate::sendTemplate() - Accept `array $messageTemplate` and `array $tokenContext`
Eileen McNaughton [Tue, 10 Aug 2021 02:06:31 +0000 (14:06 +1200)]
Merge pull request #21072 from colemanw/apiTableName
APIv4 - Throw exception instead of munging illegal join aliases
Eileen McNaughton [Sun, 8 Aug 2021 23:43:04 +0000 (11:43 +1200)]
[Ref] extract function to getEmailDefaults
Part of terminally deprecating the EmailCommon class
demeritcowboy [Tue, 10 Aug 2021 00:53:23 +0000 (20:53 -0400)]
no longer used
Eileen McNaughton [Tue, 10 Aug 2021 00:23:26 +0000 (12:23 +1200)]
Merge pull request #21069 from colemanw/searchKitAdminResultsTable
SearchKit - Merge admin results table with searchDisplay code
Coleman Watts [Mon, 9 Aug 2021 16:56:38 +0000 (12:56 -0400)]
APIv4 - Throw exception instead of munging illegal join aliases
The problem with "fixing" an illegal join alias is that it's then mysterious
what the correct alias will be, leading to bugs when the incorrect alias
gets used throughout the rest of the api params.
Throwing an exception seems like a better way to ensure developers
are alerted to the error.
Tim Otten [Mon, 9 Aug 2021 23:47:13 +0000 (16:47 -0700)]
(NFC) MessageTemplate - Add "INTERNAL" disclaimers for messageTemplate and tokenContext
colemanw [Mon, 9 Aug 2021 23:44:29 +0000 (19:44 -0400)]
Merge pull request #21057 from eileenmcnaughton/tok_resolve
dev/core#2747 REF] Move all the generic functions to the parent
colemanw [Mon, 9 Aug 2021 22:41:17 +0000 (18:41 -0400)]
Merge pull request #21063 from eileenmcnaughton/vars2
[Ref] Clarify what parameters are passed in
Tim Otten [Mon, 9 Aug 2021 22:02:04 +0000 (15:02 -0700)]
MessageTemplate::sendTemplate() - Accept `array $tokenContext` option (unit-test)
Tim Otten [Mon, 9 Aug 2021 22:03:48 +0000 (15:03 -0700)]
MessageTemplate::sendTemplate() - Accept `array $messsageTemplate` option (unit-test)
Tim Otten [Mon, 9 Aug 2021 22:03:15 +0000 (15:03 -0700)]
MessageTemplate::sendTemplate() - Accept `array $messsageTemplate` option
When using `sendTemplate()`, how does it resolve the literal content of the template?
* (Before+After) You may give `string $valueName` (identify+load template by workflow-name)
* (Before+After) You may give `int $messageTemplateID` (identify+load template by ID)
* (Before+After) You may give `string $subject` (override the msg_subject)
* (After) You may give `array $messageTemplate` (specify the content for any/all fields;
eg msg_subject, msg_text, msg_html)
* (After) Using `string $subject` is deprecated
Tim Otten [Sun, 11 Jul 2021 23:16:01 +0000 (16:16 -0700)]
MessageTemplate::sendTemplate() - Accept `array $tokenContext` option
When using `sendTemplate()`, what values are exported to the TokenProcessor? This option allows
you pass options directly through to tokenContext.
Eileen McNaughton [Mon, 9 Aug 2021 20:36:04 +0000 (08:36 +1200)]
Merge pull request #21070 from demeritcowboy/relative-label
Smarty notice - Explicitly set hideRelativeLabel var on Find Cases form
Coleman Watts [Sat, 7 Aug 2021 15:42:12 +0000 (11:42 -0400)]
SearchKit - Switch results table to use a search display
This greatly simplifies the SearchKit admin code by creating a
specialized searchDisplay (copied from crmSearchDisplayTable) which
eliminates all the code for the admin screen to fetch, format and display results.
Coleman Watts [Sun, 8 Aug 2021 13:30:23 +0000 (09:30 -0400)]
SearchKit - Add optional search button to displays
This allows search displays to present a button to the user instead of running immediately
demeritcowboy [Mon, 9 Aug 2021 12:31:38 +0000 (08:31 -0400)]
be explicit
Seamus Lee [Mon, 9 Aug 2021 08:42:54 +0000 (18:42 +1000)]
Merge pull request #21062 from eileenmcnaughton/vars
Move make-sure-single-set out of shared function
Seamus Lee [Mon, 9 Aug 2021 08:40:40 +0000 (18:40 +1000)]
Merge pull request #21049 from colemanw/searchDisplaysRef
[REF] SearchKit - display code refactor + pager options
Eileen McNaughton [Fri, 23 Jul 2021 00:45:07 +0000 (12:45 +1200)]
dev/core#2717 Use Same order ->payment flow for non recurring back office memberships as back office
Monish Deb [Mon, 9 Aug 2021 05:38:31 +0000 (11:08 +0530)]
Merge pull request #20976 from eileenmcnaughton/mem_status
Fix Membership.create in BAO to respect passed in status_id
Eileen McNaughton [Mon, 9 Aug 2021 02:58:18 +0000 (14:58 +1200)]
Merge pull request #21060 from demeritcowboy/test-includable
dev/core#2730 - Replace fopen call in CRM_Utils_File::isIncludable with one that doesn't need error-supression to avoid problems in php8
demeritcowboy [Mon, 9 Aug 2021 01:18:53 +0000 (21:18 -0400)]
Merge pull request #21066 from eileenmcnaughton/email
[Ref] Move rule to email trait
demeritcowboy [Sun, 8 Aug 2021 22:03:06 +0000 (18:03 -0400)]
replace fopen with stream_resolve_include_path
Eileen McNaughton [Sun, 8 Aug 2021 23:25:45 +0000 (11:25 +1200)]
[Ref] Move rule to email trait
This is part of dis-establishing EmailCommon - the function is not called from elsewhere
demeritcowboy [Sun, 8 Aug 2021 21:58:20 +0000 (17:58 -0400)]
Merge pull request #21061 from eileenmcnaughton/trait
Remove unused assignment
Coleman Watts [Fri, 6 Aug 2021 21:52:16 +0000 (17:52 -0400)]
SearchKit - Refactor search displays to share more code
Coleman Watts [Fri, 6 Aug 2021 16:26:09 +0000 (12:26 -0400)]
SearchKit - Improve searchDisplay pager with additional options
Adds 'show_count' and 'expose_limit' as options to searchDisplay pagers