civicrm-core.git
21 months ago[NFC] doc block fix
Eileen McNaughton [Sat, 18 Feb 2023 00:50:11 +0000 (13:50 +1300)]
[NFC] doc block fix

21 months agoMerge pull request #25586 from herbdool/core-4127-6
demeritcowboy [Sat, 18 Feb 2023 14:39:16 +0000 (09:39 -0500)]
Merge pull request #25586 from herbdool/core-4127-6

dev/core#4127 move mailing workflow check to userSystem

21 months agoMerge pull request #25615 from eileenmcnaughton/matt_dep
Matthew Wire [Sat, 18 Feb 2023 09:51:32 +0000 (09:51 +0000)]
Merge pull request #25615 from eileenmcnaughton/matt_dep

Remove function deprecated a year ago

21 months agoRemove function deprecated a year ago
Eileen McNaughton [Sat, 18 Feb 2023 06:04:06 +0000 (19:04 +1300)]
Remove function deprecated a year ago

21 months agoMerge pull request #25608 from eileenmcnaughton/test_fix
Eileen McNaughton [Sat, 18 Feb 2023 00:54:44 +0000 (13:54 +1300)]
Merge pull request #25608 from eileenmcnaughton/test_fix

Fix test to test the thing it was written to test

21 months agoMerge pull request #25607 from eileenmcnaughton/prop
Eileen McNaughton [Sat, 18 Feb 2023 00:54:23 +0000 (13:54 +1300)]
Merge pull request #25607 from eileenmcnaughton/prop

[NFC] php8.2 support in test class `ActivitySearchTest`

21 months agoMerge pull request #25599 from totten/5.59-patchset-wp
Tim Otten [Sat, 18 Feb 2023 00:05:41 +0000 (16:05 -0800)]
Merge pull request #25599 from totten/5.59-patchset-wp

distmaker - Fix export of WordPress patches

21 months agoFix test to test the thing it was written to test
Eileen McNaughton [Fri, 17 Feb 2023 23:41:40 +0000 (12:41 +1300)]
Fix test to test the thing it was written to test

Per https://github.com/civicrm/civicrm-core/pull/23929 the point of the test was
to check that any override coming from parameters or the recurring contribution
record would be respected.

Also see
https://issues.civicrm.org/jira/browse/CRM-16397

However, the test did not explicity change the recurring contribution record amount
field, having been written after a hook was added that was changing the recurring amount
based on the received payment. So it was not testing it's goal - that where they differed
then, for single line item contributions, the recurring record took precedence.

This fixes to specifically alter them to be different, thus testing the override works
and does not rely on the hook (which is likely to change it's behaviour)

21 months agoMerge pull request #25604 from eileenmcnaughton/parse_private
Tim Otten [Fri, 17 Feb 2023 23:33:31 +0000 (15:33 -0800)]
Merge pull request #25604 from eileenmcnaughton/parse_private

Make private function private

21 months agophp8.2 support in test class ActivitySearchTest
Eileen McNaughton [Fri, 17 Feb 2023 23:10:06 +0000 (12:10 +1300)]
php8.2 support in test class ActivitySearchTest

21 months agoMerge pull request #25550 from totten/master-abbr2
Eileen McNaughton [Fri, 17 Feb 2023 22:42:16 +0000 (11:42 +1300)]
Merge pull request #25550 from totten/master-abbr2

Disambiguate `Address.state_province_id:abbr`

21 months agoMake private function private
Eileen McNaughton [Fri, 17 Feb 2023 21:56:35 +0000 (10:56 +1300)]
Make private function private

21 months agoMerge pull request #25570 from kurund/profile-api-fixes
Yashodha Chaku [Fri, 17 Feb 2023 10:41:25 +0000 (16:11 +0530)]
Merge pull request #25570 from kurund/profile-api-fixes

update entity mapping logic for profile fields to include contact subtypes

21 months agoMerge pull request #25445 from lemniscus/oauth-allow-client-to-set-redirect-uri
Tim Otten [Fri, 17 Feb 2023 07:59:22 +0000 (23:59 -0800)]
Merge pull request #25445 from lemniscus/oauth-allow-client-to-set-redirect-uri

Allow OAuth redirect URI to be overridden in client or provider config

21 months agoMerge pull request #25322 from braders/unused-params-contribution-soft-test
Eileen McNaughton [Fri, 17 Feb 2023 07:53:17 +0000 (20:53 +1300)]
Merge pull request #25322 from braders/unused-params-contribution-soft-test

(REF) Tidy up unused params in api_v3_ContributionSoftTest

21 months agoDisambiguate `Address.state_province_id:abbr` (MySQL; simpler version)
Tim Otten [Fri, 10 Feb 2023 22:40:55 +0000 (14:40 -0800)]
Disambiguate `Address.state_province_id:abbr` (MySQL; simpler version)

Consider `ContactJoinTest::testCreateWithPrimaryAndBilling` which writes the value:

  'address_billing.state_province_id:abbr' => 'AK',

The symbol 'AK' can map to three places: Akwa Ibom (Nigeria), Atakora
(Benin), and Alaska (USA).  This is an ambiguous choice.  It should be
resolved in a consistent way.

One flavor of ambiguity comes from MySQL.  When loading abbreviations, Civi
queries with `ORDER BY abbreviation`.  This is a *typically* stable, but it
has no *guaranteed* resolution.  Adding a secondary sort key makes the
outcome clear/unambiguous.

21 months agoMerge pull request #25595 from totten/master-api4-cast
Tim Otten [Fri, 17 Feb 2023 06:44:19 +0000 (22:44 -0800)]
Merge pull request #25595 from totten/master-api4-cast

APIv4 - Limited support for casting

21 months agoMerge pull request #25601 from eileenmcnaughton/import_constants
Tim Otten [Fri, 17 Feb 2023 06:43:04 +0000 (22:43 -0800)]
Merge pull request #25601 from eileenmcnaughton/import_constants

Remove unused constants left over from import cleanup

21 months agoMerge pull request #25589 from lemniscus/api4-explorer-cv-syntax-short-boolean
Tim Otten [Fri, 17 Feb 2023 03:57:30 +0000 (19:57 -0800)]
Merge pull request #25589 from lemniscus/api4-explorer-cv-syntax-short-boolean

api4 explorer: make boolean params work in cv (short syntax)

21 months agocastTypeSoftly() - Support magic floats and magic ints
Tim Otten [Fri, 17 Feb 2023 00:43:46 +0000 (16:43 -0800)]
castTypeSoftly() - Support magic floats and magic ints

21 months agoMerge pull request #25552 from totten/master-abbr-php
Eileen McNaughton [Fri, 17 Feb 2023 02:56:20 +0000 (15:56 +1300)]
Merge pull request #25552 from totten/master-abbr-php

Disambiguate `Address.state_province_id:abbr` (PHP asort)

21 months agoRemove unused constants left over from import cleanup
Eileen McNaughton [Fri, 17 Feb 2023 02:09:27 +0000 (15:09 +1300)]
Remove unused constants left over from import cleanup

21 months agodistmaker - Fix generation of WordPress patches
Tim Otten [Fri, 17 Feb 2023 01:18:15 +0000 (17:18 -0800)]
distmaker - Fix generation of WordPress patches

In `cividist`, the conventional name of the civicrm-wordpress folder is `$SRC/WordPress` not `$SRC/wordpress`.

21 months ago(REF) Move test for APIv4 casting. Make it easier to mock different types.
Tim Otten [Thu, 16 Feb 2023 23:51:23 +0000 (15:51 -0800)]
(REF) Move test for APIv4 casting. Make it easier to mock different types.

21 months agoMerge pull request #25568 from eileenmcnaughton/search_display_expires
colemanw [Thu, 16 Feb 2023 22:50:24 +0000 (17:50 -0500)]
Merge pull request #25568 from eileenmcnaughton/search_display_expires

Filter expired searches from search kit results

21 months agodev/core#4127 move mailing workflow check to userSystem
Herb v/d Dool [Wed, 15 Feb 2023 17:46:41 +0000 (12:46 -0500)]
dev/core#4127 move mailing workflow check to userSystem

21 months agoMerge pull request #25569 from masetto/master
demeritcowboy [Thu, 16 Feb 2023 15:07:11 +0000 (10:07 -0500)]
Merge pull request #25569 from masetto/master

Fix empty values of Note on Import contribution

21 months agoMerge pull request #25594 from eileenmcnaughton/dep
demeritcowboy [Thu, 16 Feb 2023 14:47:03 +0000 (09:47 -0500)]
Merge pull request #25594 from eileenmcnaughton/dep

Deprecate unused `CRM_Core_BAO_UFField::copy()` function

21 months agoAPIv4 - Limited support for casting
Tim Otten [Thu, 16 Feb 2023 06:58:19 +0000 (22:58 -0800)]
APIv4 - Limited support for casting

Before
------

* `setCheckPermissions(0)` casts the `0` to `false`.
     * This is because it's a concrete setter with explict typing.
* `setUseTrash(0)` does not.
     * This is because it's a magic setter with no typing.

After
-----

* Both `setCheckPermissions(0)` and `setUseTrash(0)` cast the `0` to `false`

Technical Details
-----------------

I initially drafted in a way where `setUseTrash()` performed exactly the same casting
as `setCheckPermissions()`, but there was a countervailing test to assert that
`setDebug('debug')` is invalid, and that seemed fair.

21 months agoMerge pull request #25572 from herbdool/core-4127-2
Eileen McNaughton [Thu, 16 Feb 2023 05:38:29 +0000 (18:38 +1300)]
Merge pull request #25572 from herbdool/core-4127-2

dev/core#4127 move ipAddress to userSystem

21 months agoDeprecate unused CRM_Core_BAO_UFField::copy() function
Eileen McNaughton [Thu, 16 Feb 2023 05:36:11 +0000 (18:36 +1300)]
Deprecate unused CRM_Core_BAO_UFField::copy() function

21 months agoMerge pull request #25593 from eileenmcnaughton/dao
Eileen McNaughton [Thu, 16 Feb 2023 05:04:55 +0000 (18:04 +1300)]
Merge pull request #25593 from eileenmcnaughton/dao

Fix more schema checks to use mysql DATABASE() function, deprecate php function

21 months agodev/core#4127 move ipAddress to userSystem
Herb v/d Dool [Tue, 14 Feb 2023 19:43:13 +0000 (14:43 -0500)]
dev/core#4127 move ipAddress to userSystem

21 months agoMerge pull request #25592 from eileenmcnaughton/import_empty
Tim Otten [Thu, 16 Feb 2023 04:37:07 +0000 (20:37 -0800)]
Merge pull request #25592 from eileenmcnaughton/import_empty

Remove empty function

21 months agoMerge pull request #25302 from eileenmcnaughton/smarty-notice
Tim Otten [Thu, 16 Feb 2023 04:32:17 +0000 (20:32 -0800)]
Merge pull request #25302 from eileenmcnaughton/smarty-notice

Fix Contact import e-notice on preview screen

21 months agoFix more schema checks to use mysql DATABASE() function, deprecate php function
Eileen McNaughton [Thu, 16 Feb 2023 03:50:40 +0000 (16:50 +1300)]
Fix more schema checks to use mysql DATABASE() function, deprecate php function

21 months agoMerge pull request #25571 from herbdool/core-4127-1
Eileen McNaughton [Thu, 16 Feb 2023 03:23:39 +0000 (16:23 +1300)]
Merge pull request #25571 from herbdool/core-4127-1

dev/core#4127 use userSystem method to check for Views

21 months agoRemove empty function
Eileen McNaughton [Wed, 10 Aug 2022 03:28:11 +0000 (15:28 +1200)]
Remove empty function

21 months agoMerge pull request #25591 from seamuslee001/master
Eileen McNaughton [Thu, 16 Feb 2023 01:34:29 +0000 (14:34 +1300)]
Merge pull request #25591 from seamuslee001/master

[REF] Fix undefined variable notice in WordPress tests

21 months ago[REF] Fix undefined variable notice in WordPress tests
Seamus Lee [Wed, 15 Feb 2023 23:15:34 +0000 (10:15 +1100)]
[REF] Fix undefined variable notice in WordPress tests

Remove reference to  as not need

21 months agoMerge pull request #25590 from civicrm/5.59
Seamus Lee [Thu, 16 Feb 2023 00:09:14 +0000 (11:09 +1100)]
Merge pull request #25590 from civicrm/5.59

5.59

21 months agoMerge branch '5.59' of github.com:civicrm/civicrm-core into 5.59
CiviCRM [Wed, 15 Feb 2023 22:48:33 +0000 (22:48 +0000)]
Merge branch '5.59' of github.com:civicrm/civicrm-core into 5.59

21 months agoapi4 explorer: make boolean params work in cv (short syntax)
Noah Miller [Wed, 15 Feb 2023 22:03:40 +0000 (17:03 -0500)]
api4 explorer: make boolean params work in cv (short syntax)

21 months agoMerge pull request #25584 from civicrm/5.59
demeritcowboy [Wed, 15 Feb 2023 15:53:57 +0000 (10:53 -0500)]
Merge pull request #25584 from civicrm/5.59

5.59

21 months agoMerge pull request #25583 from totten/5.59-tz-severity
demeritcowboy [Wed, 15 Feb 2023 14:25:37 +0000 (09:25 -0500)]
Merge pull request #25583 from totten/5.59-tz-severity

Status Check - Tweak severity of timezone warning

21 months agoStatus Check - Tweak severity of timezone warning
Tim Otten [Wed, 15 Feb 2023 10:29:09 +0000 (02:29 -0800)]
Status Check - Tweak severity of timezone warning

21 months agoMerge pull request #25582 from civicrm/5.59
Seamus Lee [Wed, 15 Feb 2023 07:12:42 +0000 (18:12 +1100)]
Merge pull request #25582 from civicrm/5.59

5.59

21 months agoMerge pull request #25578 from seamuslee001/dev_core_4119
Seamus Lee [Wed, 15 Feb 2023 06:25:05 +0000 (17:25 +1100)]
Merge pull request #25578 from seamuslee001/dev_core_4119

dev/core#4119 Only generate error on blank confirm_title if confirmat…

21 months agoMerge pull request #25581 from seamuslee001/master
Seamus Lee [Wed, 15 Feb 2023 06:23:13 +0000 (17:23 +1100)]
Merge pull request #25581 from seamuslee001/master

5.59

21 months agoMerge branch '5.59'
Seamus Lee [Wed, 15 Feb 2023 06:21:52 +0000 (17:21 +1100)]
Merge branch '5.59'

21 months agosecurity/core#121 Add in hard coded list of file extensions that should be prohibited...
Seamus Lee [Thu, 2 Feb 2023 02:14:04 +0000 (13:14 +1100)]
security/core#121 Add in hard coded list of file extensions that should be prohibited form being treated as safe no matter what

Expand the list of extensions as per Tim and allow for users to define their own list via a constant

21 months agodev/core#4119 Only generate error on blank confirm_title if confirmation page is...
Seamus Lee [Wed, 15 Feb 2023 05:43:58 +0000 (16:43 +1100)]
dev/core#4119 Only generate error on blank confirm_title if confirmation page is enabled or the event is monetary

21 months agoMerge pull request #25576 from totten/master-suppressed
Eileen McNaughton [Wed, 15 Feb 2023 05:25:46 +0000 (18:25 +1300)]
Merge pull request #25576 from totten/master-suppressed

CiviContribute - Fix warning about 'suppressedEmails' when generating PDF

21 months agoMerge pull request #25547 from eileenmcnaughton/559
Tim Otten [Wed, 15 Feb 2023 04:30:57 +0000 (20:30 -0800)]
Merge pull request #25547 from eileenmcnaughton/559

dev/core#4080 Fix wrong pdf format selection for invoice, when configured

21 months agoCiviContribute - Fix warning about 'suppressedEmails' when generating PDF
Tim Otten [Wed, 15 Feb 2023 03:12:14 +0000 (19:12 -0800)]
CiviContribute - Fix warning about 'suppressedEmails' when generating PDF

Use-case:

* Open and execute "Find Contributions"
* Next to a contribution, choose "more > Send receipt"
* Make a PDF
* Open another tab and view any other page.
* There is warning:
    Notice: Undefined index: suppressedEmails in CRM_Contribute_Form_Task_PDF->postProcess()
    (line 139 of ..../web/sites/all/modules/civicrm/CRM/Contribute/Form/Task/PDF.php)."

Before:

* `$pdfElements['suppressedEmails']` is not always returned
*  $pdfElements['excludeContactIds'] is alsways returned

After:

* Both are always returned, even if empty

21 months agoMerge pull request #25548 from eileenmcnaughton/559_token
Tim Otten [Wed, 15 Feb 2023 02:00:20 +0000 (18:00 -0800)]
Merge pull request #25548 from eileenmcnaughton/559_token

(dev/core#4109) Fix tokens like `{contact.email_primary.email}`

21 months agodev/core#4127 use userSystem method to check for Views
Herb v/d Dool [Tue, 14 Feb 2023 19:38:03 +0000 (14:38 -0500)]
dev/core#4127 use userSystem method to check for Views

21 months agoupdate entity mapping logic for profile fields to include contact subtypes
Kurund Jalmi [Tue, 14 Feb 2023 18:46:43 +0000 (18:46 +0000)]
update entity mapping logic for profile fields to include contact subtypes

21 months agoMerge pull request #25383 from totten/master-ts-smarty
Mathieu Lu [Tue, 14 Feb 2023 14:37:43 +0000 (09:37 -0500)]
Merge pull request #25383 from totten/master-ts-smarty

Smarty {ts} - For extensions, use fallback similar to E::ts() and JS ts()

21 months agofix empty values of Note on Import contribution
Samuele Masetto [Tue, 14 Feb 2023 08:10:40 +0000 (09:10 +0100)]
fix empty values of Note on Import contribution

21 months agoMerge pull request #25565 from eileenmcnaughton/act_links
Yashodha Chaku [Tue, 14 Feb 2023 07:43:18 +0000 (13:13 +0530)]
Merge pull request #25565 from eileenmcnaughton/act_links

Make `activity_type_id` available to `links` hook, test

21 months agoMerge pull request #25517 from eileenmcnaughton/gettree
Yashodha Chaku [Tue, 14 Feb 2023 05:06:38 +0000 (10:36 +0530)]
Merge pull request #25517 from eileenmcnaughton/gettree

Make unshared `getTree` function private, remove never passed params

21 months agoFilter expired searches from search kit results
Eileen McNaughton [Tue, 14 Feb 2023 04:02:58 +0000 (17:02 +1300)]
Filter expired searches from search kit results

21 months agoMerge pull request #25567 from civicrm/5.59
Eileen McNaughton [Tue, 14 Feb 2023 03:33:00 +0000 (16:33 +1300)]
Merge pull request #25567 from civicrm/5.59

5.59 to master

21 months agoMake activity_type_id available to links, test
Eileen McNaughton [Tue, 14 Feb 2023 02:35:19 +0000 (15:35 +1300)]
Make activity_type_id available to links, test

21 months agoAdd test to is_current on SavedSearch, fix
Eileen McNaughton [Tue, 14 Feb 2023 03:28:11 +0000 (16:28 +1300)]
Add test to is_current on SavedSearch, fix

21 months agoMerge pull request #25564 from eileenmcnaughton/activity_links
demeritcowboy [Tue, 14 Feb 2023 03:19:57 +0000 (22:19 -0500)]
Merge pull request #25564 from eileenmcnaughton/activity_links

Preliminary cleanup, comments, type hints

21 months agoMerge pull request #25555 from seamuslee001/dev_core_4116
Eileen McNaughton [Tue, 14 Feb 2023 03:16:53 +0000 (16:16 +1300)]
Merge pull request #25555 from seamuslee001/dev_core_4116

dev/core#4116 Add in rebuilding log table schema when modifying schema

21 months agoPreliminary cleanup, comments, type hints
Eileen McNaughton [Tue, 14 Feb 2023 02:00:48 +0000 (15:00 +1300)]
Preliminary cleanup, comments, type hints

21 months agoMerge pull request #25329 from herbdool/core-4076
demeritcowboy [Mon, 13 Feb 2023 21:33:16 +0000 (16:33 -0500)]
Merge pull request #25329 from herbdool/core-4076

dev/core#4076 split up the theme method

21 months agoMerge pull request #25554 from demeritcowboy/upgrade-crash
Eileen McNaughton [Mon, 13 Feb 2023 20:25:46 +0000 (09:25 +1300)]
Merge pull request #25554 from demeritcowboy/upgrade-crash

Fix fatal error on upgrade success screen

21 months agodev/core#4076 split up the theme method
Herb v/d Dool [Wed, 11 Jan 2023 21:55:20 +0000 (16:55 -0500)]
dev/core#4076 split up the theme method

21 months agoMerge pull request #25560 from mlutfy/mailingSummaryPseudo
Yashodha Chaku [Mon, 13 Feb 2023 12:17:42 +0000 (17:47 +0530)]
Merge pull request #25560 from mlutfy/mailingSummaryPseudo

Mailing Summary Report: support pseudofields

21 months agoMerge pull request #25562 from braders/properties-emailtest
Seamus Lee [Sun, 12 Feb 2023 23:43:46 +0000 (10:43 +1100)]
Merge pull request #25562 from braders/properties-emailtest

[REF][PHP8.2] Remove use of dynamic properties in CRM_Contact_Form_Task_EmailTest

21 months ago[REF][PHP8.2] Remove use of dynamic properties in CRM_Contact_Form_Task_EmailTest
Bradley Taylor [Sun, 12 Feb 2023 13:32:53 +0000 (13:32 +0000)]
[REF][PHP8.2] Remove use of dynamic properties in CRM_Contact_Form_Task_EmailTest

21 months agoMerge pull request #25561 from braders/dynamic-properties-authorize-net-test
demeritcowboy [Sat, 11 Feb 2023 23:10:21 +0000 (18:10 -0500)]
Merge pull request #25561 from braders/dynamic-properties-authorize-net-test

[REF][PHP8.2] Get rid of dynamic properties in CRM_Core_Payment_AuthorizeNetTest

21 months ago[REF][PHP8.2] Get rid of dynamic properties in CRM_Core_Payment_AuthorizeNetTest
Bradley Taylor [Sat, 11 Feb 2023 19:14:18 +0000 (19:14 +0000)]
[REF][PHP8.2] Get rid of dynamic properties in CRM_Core_Payment_AuthorizeNetTest

21 months agoMailing Summary Report: support pseudofields
Mathieu Lutfy [Sat, 11 Feb 2023 17:52:09 +0000 (12:52 -0500)]
Mailing Summary Report: support pseudofields

21 months agoMerge pull request #25559 from braders/dynamic-property-additionalpaymenttest
demeritcowboy [Sat, 11 Feb 2023 17:06:12 +0000 (12:06 -0500)]
Merge pull request #25559 from braders/dynamic-property-additionalpaymenttest

[REF][PHP8.2] Stop use of dynamic property in AdditionalPaymentTest

21 months agoMerge pull request #25558 from braders/dynmaic-property-ajaxtest
demeritcowboy [Sat, 11 Feb 2023 17:05:40 +0000 (12:05 -0500)]
Merge pull request #25558 from braders/dynmaic-property-ajaxtest

[REF][PHP8.2] Use variable instead of dynmaic property (CRM_Group_Page_AjaxTest)

21 months agoMerge pull request #25557 from braders/pledge-block-test-property
demeritcowboy [Sat, 11 Feb 2023 17:05:28 +0000 (12:05 -0500)]
Merge pull request #25557 from braders/pledge-block-test-property

[REF][PHP8.2] Declare property in CRM_Pledge_BAO_PledgeBlockTest

21 months agoMerge pull request #25556 from braders/fake-object-php8.2
demeritcowboy [Sat, 11 Feb 2023 17:05:18 +0000 (12:05 -0500)]
Merge pull request #25556 from braders/fake-object-php8.2

[REF][PHP8.2] Declare property in CRM_Utils_FakeObject

21 months ago[REF][PHP8.2] Stop use of dynamic property in AdditionalPaymentTest
Bradley Taylor [Sat, 11 Feb 2023 15:43:09 +0000 (15:43 +0000)]
[REF][PHP8.2] Stop use of dynamic property in AdditionalPaymentTest

21 months ago[REF][PHP8.2] Use variable instead of dynmaic property (CRM_Group_Page_AjaxTest)
Bradley Taylor [Sat, 11 Feb 2023 15:36:00 +0000 (15:36 +0000)]
[REF][PHP8.2] Use variable instead of dynmaic property (CRM_Group_Page_AjaxTest)

21 months ago[REF][PHP8.2] Declare property in CRM_Pledge_BAO_PledgeBlockTest
Bradley Taylor [Sat, 11 Feb 2023 15:26:04 +0000 (15:26 +0000)]
[REF][PHP8.2] Declare property in CRM_Pledge_BAO_PledgeBlockTest

21 months agoMerge pull request #25514 from eileenmcnaughton/smarty-search
demeritcowboy [Sat, 11 Feb 2023 13:53:42 +0000 (08:53 -0500)]
Merge pull request #25514 from eileenmcnaughton/smarty-search

A couple of minor smarty notice fixes

21 months ago[REF][PHP8.2] Declare property in CRM_Utils_FakeObject
Bradley Taylor [Sat, 11 Feb 2023 13:36:22 +0000 (13:36 +0000)]
[REF][PHP8.2] Declare property in CRM_Utils_FakeObject

21 months agodev/core#4116 Add in rebuilding log table schema when modifying schema
Seamus Lee [Sat, 11 Feb 2023 05:14:19 +0000 (16:14 +1100)]
dev/core#4116 Add in rebuilding log table schema when modifying schema

Only rebuild if logging is enabled

21 months agoMerge pull request #25551 from eileenmcnaughton/tokens
demeritcowboy [Sat, 11 Feb 2023 04:52:07 +0000 (23:52 -0500)]
Merge pull request #25551 from eileenmcnaughton/tokens

Upgrade test to use more recent methodology for testing forms

21 months agofix fatal error
demeritcowboy [Sat, 11 Feb 2023 04:45:10 +0000 (23:45 -0500)]
fix fatal error

21 months agoMerge pull request #25544 from eileenmcnaughton/smarty_tpl
Tim Otten [Sat, 11 Feb 2023 01:19:36 +0000 (17:19 -0800)]
Merge pull request #25544 from eileenmcnaughton/smarty_tpl

Smarty notice fix

21 months ago(NFC) ContactJoinTest - Ensure that ambiguous state is matched to country
Tim Otten [Fri, 10 Feb 2023 06:52:27 +0000 (22:52 -0800)]
(NFC) ContactJoinTest - Ensure that ambiguous state is matched to country

Before: There is one test using 'AK' -- in the US.

After: There are two tests using 'AK -- in the US and in Nigeria.

21 months agoDisambiguate `Address.state_province_id:abbr` (PHP asort)
Tim Otten [Fri, 10 Feb 2023 06:18:49 +0000 (22:18 -0800)]
Disambiguate `Address.state_province_id:abbr` (PHP asort)

Consider `ContactJoinTest::testCreateWithPrimaryAndBilling` which writes the value:

  'address_billing.state_province_id:abbr' => 'AK',

The symbol 'AK' can map to three places: Akwa Ibom (Nigeria), Atakora
(Benin), and Alaska (USA).  This is an ambiguous choice.  It should be
resolved in a consistent way.

One flavor of ambiguity comes from PHP.  After fetching from MySQL, there is
a secondary sorting (via `CRM_Utils_Array::asort()` => `asort()`).  Per
https://www.php.net/asort, the outcome is quirky:

> If two members compare as equal, they retain their original order.  Prior
> to PHP 8.0.0, their relative order in the sorted array was undefined.

On PHP 7, you cannot resolve this with any of the standard sort methods
(`asort`, `usort`, `ksort`, etc). They all have the same issue.

However...  the docs for `\Collator::asort()` indicate no such issue.
Switching to `\Collator::asort()` causes the tests to pass on PHP 7.3.  And
we already use `\Collator::asort()`.

21 months agoUpgrade test to use more recent methodology for testing forms
Eileen McNaughton [Fri, 10 Feb 2023 21:57:48 +0000 (10:57 +1300)]
Upgrade test to use more recent methodology for testing forms

The tested class had been hacked to accept parameters to postProcess,
but we can now avoid that & it will likely be rejected in a later php
version / muddy the waters

21 months agodev/core#4109 Fix advertised tokens to work
Eileen McNaughton [Fri, 10 Feb 2023 03:36:58 +0000 (16:36 +1300)]
dev/core#4109 Fix advertised tokens to work

21 months agoA couple of minor smarty notice fixes
Eileen McNaughton [Mon, 6 Feb 2023 21:33:13 +0000 (10:33 +1300)]
A couple of minor smarty notice fixes

21 months agodev/core#4080 Fix wrong pdf format selection for invoice, when configured
Eileen McNaughton [Fri, 10 Feb 2023 01:44:32 +0000 (14:44 +1300)]
dev/core#4080 Fix wrong pdf format selection for invoice, when configured

To replicate this I

1) created a new pdf format at civicrm/admin/pdfFormats?reset=1 with a top margin
of about 6 metres
2) edited the invoice MessageTemplate to use this pdf format
3) enabled invoicing
4) generated a pdf from the user dashboard
5) lots of white space.....
6) reset the invoice MessageTemplate not to have a selected pdf
7) it looked ... normal

21 months agoMerge pull request #25519 from eileenmcnaughton/gettree2
Yashodha Chaku [Fri, 10 Feb 2023 03:07:52 +0000 (08:37 +0530)]
Merge pull request #25519 from eileenmcnaughton/gettree2

Remove always-NULL `$singleRecord` variable

21 months agoMerge pull request #25546 from eileenmcnaughton/smarty_pledge
Eileen McNaughton [Fri, 10 Feb 2023 02:51:07 +0000 (15:51 +1300)]
Merge pull request #25546 from eileenmcnaughton/smarty_pledge

Enotice fix, pledge block on UserDashboard

21 months agoEnotice fix, pledge block on UserDashboard
Eileen McNaughton [Fri, 10 Feb 2023 00:17:51 +0000 (13:17 +1300)]
Enotice fix, pledge block on UserDashboard