civicrm-core.git
3 years agoMerge pull request #20618 from eileenmcnaughton/return2
Seamus Lee [Wed, 16 Jun 2021 23:16:42 +0000 (09:16 +1000)]
Merge pull request #20618 from eileenmcnaughton/return2

dev/core#1191 Try adding a strict return function to getAndCheck

3 years agoMerge pull request #20624 from seamuslee001/query_test_php8
Eileen McNaughton [Wed, 16 Jun 2021 23:10:58 +0000 (11:10 +1200)]
Merge pull request #20624 from seamuslee001/query_test_php8

[php8-compact][NFC] Update testGroupClause unit test to work on php8

3 years agoMerge pull request #20536 from MegaphoneJon/mailing-96
demeritcowboy [Wed, 16 Jun 2021 22:52:13 +0000 (18:52 -0400)]
Merge pull request #20536 from MegaphoneJon/mailing-96

mailing#96: Warn on invalid mailing options

3 years agoUpdate CRM/Mailing/BAO/Mailing.php
Jon [Wed, 16 Jun 2021 14:09:32 +0000 (10:09 -0400)]
Update CRM/Mailing/BAO/Mailing.php

Co-authored-by: demeritcowboy <demeritcowboy@hotmail.com>
3 years ago[php8-compact][NFC] Update testGroupClause unit test to work on php8
Seamus Lee [Wed, 16 Jun 2021 08:36:28 +0000 (08:36 +0000)]
[php8-compact][NFC] Update testGroupClause unit test to work on php8

3 years agoTry adding a strict return function to getAndCheck
Eileen McNaughton [Wed, 16 Jun 2021 03:06:19 +0000 (15:06 +1200)]
Try adding a strict return function to getAndCheck

3 years agoMerge pull request #20615 from colemanw/afformCivix
Seamus Lee [Wed, 16 Jun 2021 02:46:32 +0000 (12:46 +1000)]
Merge pull request #20615 from colemanw/afformCivix

[NFC] Afform - Regenerate civix files

3 years agoMerge pull request #20614 from seamuslee001/fix_test_setup
Seamus Lee [Wed, 16 Jun 2021 02:34:20 +0000 (12:34 +1000)]
Merge pull request #20614 from seamuslee001/fix_test_setup

[NFC] Fix test setup on a couple of tests to make them pass in php8

3 years agoMerge pull request #20608 from seamuslee001/fix_core_form_array_to_string
Eileen McNaughton [Wed, 16 Jun 2021 01:49:10 +0000 (13:49 +1200)]
Merge pull request #20608 from seamuslee001/fix_core_form_array_to_string

[php8-compact] Fix Array to String in formButtons in CRM_Core_FormTest

3 years agoMerge pull request #20613 from seamuslee001/fix_participant_templates
Eileen McNaughton [Wed, 16 Jun 2021 01:48:50 +0000 (13:48 +1200)]
Merge pull request #20613 from seamuslee001/fix_participant_templates

[php8-compact]  Fix issues with participant message templates causing…

3 years agoAfform - Regenerate civix files
Coleman Watts [Wed, 16 Jun 2021 01:00:05 +0000 (21:00 -0400)]
Afform - Regenerate civix files

3 years ago[NFC] Fix test setup on a couple of tests to make them pass in php8
Seamus Lee [Wed, 16 Jun 2021 00:55:22 +0000 (00:55 +0000)]
[NFC] Fix test setup on a couple of tests to make them pass in php8

3 years agoMerge pull request #20570 from eileenmcnaughton/return
Seamus Lee [Wed, 16 Jun 2021 00:21:06 +0000 (10:21 +1000)]
Merge pull request #20570 from eileenmcnaughton/return

Test cleanup - specify return

3 years ago[php8-compact] Fix issues with participant message templates causing Event Tests...
Seamus Lee [Tue, 15 Jun 2021 23:59:14 +0000 (23:59 +0000)]
[php8-compact]  Fix issues with participant message templates causing Event Tests to fail

3 years agoMerge pull request #20612 from civicrm/5.39
Seamus Lee [Tue, 15 Jun 2021 23:37:03 +0000 (09:37 +1000)]
Merge pull request #20612 from civicrm/5.39

5.39

3 years agoMerge pull request #20609 from colemanw/readOnlyApis
Seamus Lee [Tue, 15 Jun 2021 23:36:26 +0000 (09:36 +1000)]
Merge pull request #20609 from colemanw/readOnlyApis

APIv4 - Make LineItem, EntityFinancialTrxn and FinancialTrxn read-only

3 years agoMerge pull request #20611 from eileenmcnaughton/539_o
Seamus Lee [Tue, 15 Jun 2021 23:35:47 +0000 (09:35 +1000)]
Merge pull request #20611 from eileenmcnaughton/539_o

Fix unreleased api change to more logical variant

3 years agoMerge pull request #20573 from colemanw/entityTagFilter
Seamus Lee [Tue, 15 Jun 2021 23:19:18 +0000 (09:19 +1000)]
Merge pull request #20573 from colemanw/entityTagFilter

APIv4 - Add filter for entity tags

3 years ago[php8-compact] Fix Array to String in formButtons in CRM_Core_FormTest
Seamus Lee [Tue, 15 Jun 2021 06:56:25 +0000 (06:56 +0000)]
[php8-compact] Fix Array to String in formButtons in CRM_Core_FormTest

3 years agotest failure fix
Monish Deb [Wed, 9 Jun 2021 03:35:20 +0000 (09:05 +0530)]
test failure fix

3 years agoFix unreleased api change
Eileen McNaughton [Tue, 15 Jun 2021 21:40:57 +0000 (09:40 +1200)]
Fix unreleased api change

An unreleased change adds the entity ids for membership to the return values.

However, on digging into further cleanup I realised that the entity ids are in
the line item array, along with other values which may or may not be useful,
and it's cleaner, more complete and more maintainable to return the line_items.

It requires an extra foreach loop in the calling code but
I don't see that as a downside.

We should change this in the rc so what is released is consistent

Test cover in testSubmitRecur & other tests in CRM_Member_Form_MembershipTest

3 years agoAPIv4 - Make LineItem, EntityFinancialTrxn and FinancialTrxn read-only
Coleman Watts [Tue, 15 Jun 2021 19:04:06 +0000 (15:04 -0400)]
APIv4 - Make LineItem, EntityFinancialTrxn and FinancialTrxn read-only

Adds a new ReadOnly trait which annotates write methods as @internal
and sets write permissions to ALWAYS_DENY.

This effectively hides the write actions from the API Explorer,
and restricts use of the write methods to when `checkPermissions = FALSE`.

3 years agoRegenerate civicrm_generated.mysql
Coleman Watts [Tue, 15 Jun 2021 20:38:12 +0000 (16:38 -0400)]
Regenerate civicrm_generated.mysql

3 years agoAPIv4 - Add filter for entity tags
Coleman Watts [Fri, 11 Jun 2021 01:11:03 +0000 (21:11 -0400)]
APIv4 - Add filter for entity tags

3 years agoMerge pull request #20606 from totten/master-html-types
Tim Otten [Tue, 15 Jun 2021 05:56:43 +0000 (22:56 -0700)]
Merge pull request #20606 from totten/master-html-types

dev/translation#67 - Allow translation of fields which lack an explicit HTML type

3 years agoMerge pull request #20605 from seamuslee001/fix_contact_test_mysql8
Seamus Lee [Tue, 15 Jun 2021 04:32:24 +0000 (14:32 +1000)]
Merge pull request #20605 from seamuslee001/fix_contact_test_mysql8

[NFC] Fix test failure on MySQL8 because of lack of order in API

3 years ago[NFC] Fix test failure on MySQL8 because of lack of order in API
Seamus Lee [Tue, 15 Jun 2021 02:50:50 +0000 (12:50 +1000)]
[NFC] Fix test failure on MySQL8 because of lack of order in API

3 years agodev/translation#67 - Allow translation of fields which lack an explicit HTML type
Tim Otten [Tue, 15 Jun 2021 02:32:49 +0000 (19:32 -0700)]
dev/translation#67 - Allow translation of fields which lack an explicit HTML type

_Overview_: The `Translation` entity can be used to translate certain fields. Currently, the field settings (`data_type`, `html_type`)
must satisfy some requirements before being translated. This change slightly relaxes those requirements.

_Before_: String fields can be flagged as translatable - but only if they a text-style HTML widget.

_After_: String fields can be flagged as translatable - if they have text-style HTML widget or no clear widget.

_Comments_: This is motivated to allow `civicrm_msg_template` (`msg_subject`, `msg_text`, `msg_html`) to marked as translatable.

The `data_type` and `html_type` constraints were introduced during a much earlier draft. At that time, the list of fields was
open-ended. Now, the list is much narrower (default=none) and requires an extra opt-in (`hook_translateFields`). Consequenty,
there's less concern about someone trying to translate an inappropriate field.

This patch seemed simplest/lowest-change, though I am open/ambivalent about any of these approaches:

* Completely remove the HTML-type constraint.
* Change the `html_type` data for `MessageTemplate`. (But I don't know if this will have other side-effects.)

3 years agoMerge pull request #20603 from demeritcowboy/form-opening-tests
Eileen McNaughton [Tue, 15 Jun 2021 02:10:04 +0000 (14:10 +1200)]
Merge pull request #20603 from demeritcowboy/form-opening-tests

[php8-compat] Alternate to the alternate for testOpeningForms

3 years agoimprove flawed test
demeritcowboy [Mon, 14 Jun 2021 16:55:37 +0000 (12:55 -0400)]
improve flawed test

3 years agoMerge pull request #20594 from seamuslee001/api_v4_php8_fix
Eileen McNaughton [Mon, 14 Jun 2021 20:51:58 +0000 (08:51 +1200)]
Merge pull request #20594 from seamuslee001/api_v4_php8_fix

[php8-compact] Fix apiv4 tests in php8 by not incrementing an array

3 years agoMerge pull request #20599 from demeritcowboy/not-deprecated
Eileen McNaughton [Mon, 14 Jun 2021 20:51:05 +0000 (08:51 +1200)]
Merge pull request #20599 from demeritcowboy/not-deprecated

[NFC] - update code comment

3 years agofix comment
demeritcowboy [Mon, 14 Jun 2021 14:50:25 +0000 (10:50 -0400)]
fix comment

3 years agoMerge pull request #20597 from seamuslee001/php8_test_fixes
demeritcowboy [Mon, 14 Jun 2021 14:47:47 +0000 (10:47 -0400)]
Merge pull request #20597 from seamuslee001/php8_test_fixes

[php8-compact] Further test fixes for php8

3 years agoMerge pull request #20523 from eileenmcnaughton/pcp2
Monish Deb [Mon, 14 Jun 2021 12:22:27 +0000 (17:52 +0530)]
Merge pull request #20523 from eileenmcnaughton/pcp2

Send pcp notification only when the contribution is completed

3 years agoMerge pull request #20596 from seamuslee001/fix_authorizenet_test
Eileen McNaughton [Mon, 14 Jun 2021 08:29:07 +0000 (20:29 +1200)]
Merge pull request #20596 from seamuslee001/fix_authorizenet_test

[php8-compact] Fix failing AuthorizeNetIPN tests on php8

3 years ago[php8-compact] Further test fixes for php8
Seamus Lee [Mon, 14 Jun 2021 07:39:02 +0000 (07:39 +0000)]
[php8-compact] Further test fixes for php8

3 years agoMerge pull request #20595 from seamuslee001/fix_invoke_test
Eileen McNaughton [Mon, 14 Jun 2021 07:25:23 +0000 (19:25 +1200)]
Merge pull request #20595 from seamuslee001/fix_invoke_test

[php8-compact] Fix failing CRM_Core_InvokeTest on php8

3 years agoMerge pull request #20593 from seamuslee001/session_test_fix
Eileen McNaughton [Mon, 14 Jun 2021 07:03:26 +0000 (19:03 +1200)]
Merge pull request #20593 from seamuslee001/session_test_fix

[php8-compact] Fix Session Test errors in php8

3 years ago[php8-compact] Fix failing AuthorizeNetIPN tests on php8
Seamus Lee [Mon, 14 Jun 2021 05:34:05 +0000 (05:34 +0000)]
[php8-compact] Fix failing AuthorizeNetIPN tests on php8

3 years ago[php8-compact] Fix failing CRM_Core_InvokeTest on php8
Seamus Lee [Mon, 14 Jun 2021 05:30:45 +0000 (05:30 +0000)]
[php8-compact] Fix failing CRM_Core_InvokeTest on php8

3 years ago[php8-compact] Fix apiv4 tests in php8 by not incrementing an array
Seamus Lee [Mon, 14 Jun 2021 05:05:18 +0000 (05:05 +0000)]
[php8-compact] Fix apiv4 tests in php8 by not incrementing an array

3 years ago[php8-compact] Fix Session Test errors in php8
Seamus Lee [Mon, 14 Jun 2021 04:53:28 +0000 (04:53 +0000)]
[php8-compact] Fix Session Test errors in php8

3 years agoMerge pull request #20577 from eileenmcnaughton/smart
Seamus Lee [Mon, 14 Jun 2021 04:48:15 +0000 (14:48 +1000)]
Merge pull request #20577 from eileenmcnaughton/smart

Fix a few more undefined template vars

3 years agoMerge pull request #20592 from seamuslee001/fix_case_message_template
Seamus Lee [Mon, 14 Jun 2021 02:06:24 +0000 (12:06 +1000)]
Merge pull request #20592 from seamuslee001/fix_case_message_template

[php8-compact] Fix Case Activity Message Template to fix test failure…

3 years agoFix a few more undefined template vars
Eileen McNaughton [Fri, 11 Jun 2021 03:49:42 +0000 (15:49 +1200)]
Fix a few more undefined template vars

3 years agoMerge pull request #20574 from eileenmcnaughton/return2
Eileen McNaughton [Mon, 14 Jun 2021 00:39:47 +0000 (12:39 +1200)]
Merge pull request #20574 from eileenmcnaughton/return2

Reduce test api calls with no 'return'

3 years agoMerge pull request #20591 from seamuslee001/fix_pdf_letter_test
Eileen McNaughton [Mon, 14 Jun 2021 00:39:24 +0000 (12:39 +1200)]
Merge pull request #20591 from seamuslee001/fix_pdf_letter_test

[php8-compact]  Fix PDF Letter Test by ensuring that all actual DB fi…

3 years agoTest cleanup - specify return
Eileen McNaughton [Fri, 11 Jun 2021 00:41:41 +0000 (12:41 +1200)]
Test cleanup - specify return

3 years ago[php8-compact] Fix Case Activity Message Template to fix test failure in php8
Seamus Lee [Sun, 13 Jun 2021 23:58:19 +0000 (23:58 +0000)]
[php8-compact] Fix Case Activity Message Template to fix test failure in php8

3 years agoMerge pull request #20589 from colemanw/pledgeApi
Eileen McNaughton [Mon, 14 Jun 2021 00:00:19 +0000 (12:00 +1200)]
Merge pull request #20589 from colemanw/pledgeApi

SearchKit - Show Pledge as a primary entity

3 years ago[php8-compact] Fix PDF Letter Test by ensuring that all actual DB fields are in...
Seamus Lee [Sun, 13 Jun 2021 22:59:20 +0000 (22:59 +0000)]
[php8-compact]  Fix PDF Letter Test by ensuring that all actual DB fields are in the tokens array and also by resetting the static cache of tokens

Remove uncessary function call

3 years agoReduce test api calls with no 'return'
Eileen McNaughton [Fri, 11 Jun 2021 01:48:12 +0000 (13:48 +1200)]
Reduce test api calls with no 'return'

3 years agoSearchKit - Show Pledge as a primary entity
Coleman Watts [Sun, 13 Jun 2021 20:32:41 +0000 (16:32 -0400)]
SearchKit - Show Pledge as a primary entity

3 years agoMerge pull request #20584 from totten/master-translation-api
colemanw [Sun, 13 Jun 2021 16:23:26 +0000 (12:23 -0400)]
Merge pull request #20584 from totten/master-translation-api

dev/translation#67 - Add APIv4 support for "Translation" entity.

3 years agoMerge pull request #20585 from civicrm/5.39
colemanw [Sun, 13 Jun 2021 04:48:15 +0000 (00:48 -0400)]
Merge pull request #20585 from civicrm/5.39

5.39

3 years agodev/translation#67 - Add APIv4 support for "Translation" entity. Expand tests.
Tim Otten [Wed, 28 Apr 2021 06:03:46 +0000 (23:03 -0700)]
dev/translation#67 - Add APIv4 support for "Translation" entity. Expand tests.

3 years agoMerge pull request #20580 from demeritcowboy/upgrade-table
Seamus Lee [Sat, 12 Jun 2021 00:11:27 +0000 (10:11 +1000)]
Merge pull request #20580 from demeritcowboy/upgrade-table

dev/core#2649 - Make 5.39 upgrade more robust

3 years agoDynamicFKAccessTrait - Emit explicit error-message for invalid table references
Tim Otten [Fri, 11 Jun 2021 23:44:06 +0000 (16:44 -0700)]
DynamicFKAccessTrait - Emit explicit error-message for invalid table references

Use-Case: You create a dynamic FK with a reference to an invalid table.

Before: Returns an API error/exception about type-matching (string vs null)

After: Returns an API error/exception about the invalid reference

3 years agoMerge pull request #20579 from seamuslee001/fix_CRM_Contact_Form_IndividualTest
Seamus Lee [Fri, 11 Jun 2021 23:01:01 +0000 (09:01 +1000)]
Merge pull request #20579 from seamuslee001/fix_CRM_Contact_Form_IndividualTest

[php8-compact] Add in guards into various templates to fix the CRM_Co…

3 years agoMerge pull request #20581 from seamuslee001/fix_contribution_form_tests
Seamus Lee [Fri, 11 Jun 2021 23:00:48 +0000 (09:00 +1000)]
Merge pull request #20581 from seamuslee001/fix_contribution_form_tests

[php8-compact] Fixes test failures in the CRM_Contribute_Form_Contrib…

3 years agobe re-runnable and don't force utf8mb4
demeritcowboy [Fri, 11 Jun 2021 15:18:45 +0000 (11:18 -0400)]
be re-runnable and don't force utf8mb4

3 years ago[php8-compact] Fixes test failures in the CRM_Contribute_Form_ContributionTest class...
Seamus Lee [Fri, 11 Jun 2021 21:22:26 +0000 (21:22 +0000)]
[php8-compact] Fixes test failures in the CRM_Contribute_Form_ContributionTest class due to template issues

3 years ago[php8-compact] Add in guards into various templates to fix the CRM_Contact_Form_Indiv...
Seamus Lee [Fri, 11 Jun 2021 11:54:21 +0000 (11:54 +0000)]
[php8-compact] Add in guards into various templates to fix the CRM_Contact_Form_IndividualTest suite

3 years agoMerge pull request #20575 from seamuslee001/dashboard_test_fix
Seamus Lee [Fri, 11 Jun 2021 05:58:27 +0000 (15:58 +1000)]
Merge pull request #20575 from seamuslee001/dashboard_test_fix

[php8-compact] Fix Dashboard Tests by adding in if guards into smarty…

3 years agoMerge pull request #20544 from seamuslee001/even_more_guards
Seamus Lee [Fri, 11 Jun 2021 05:58:20 +0000 (15:58 +1000)]
Merge pull request #20544 from seamuslee001/even_more_guards

[php8-compact] Add in guards into various templates to fix issues in …

3 years ago[php8-compact] Add in guards into various templates to fix issues in test runs on...
Seamus Lee [Tue, 8 Jun 2021 01:02:08 +0000 (01:02 +0000)]
[php8-compact] Add in guards into various templates to fix issues in test runs on php8

3 years agoMerge pull request #20546 from seamuslee001/even_more_guards2
Eileen McNaughton [Fri, 11 Jun 2021 03:36:28 +0000 (15:36 +1200)]
Merge pull request #20546 from seamuslee001/even_more_guards2

[php8-compact] Add in more protection for unset variables in various …

3 years agoMerge pull request #20547 from seamuslee001/admin_guards
Seamus Lee [Fri, 11 Jun 2021 02:54:06 +0000 (12:54 +1000)]
Merge pull request #20547 from seamuslee001/admin_guards

[php8-compact] Add in protection for unset variables in admin smarty …

3 years ago[php8-compact] Fix Dashboard Tests by adding in if guards into smarty templates
Seamus Lee [Mon, 7 Jun 2021 22:21:45 +0000 (22:21 +0000)]
[php8-compact] Fix Dashboard Tests by adding in if guards into smarty templates

3 years agoMerge pull request #20576 from civicrm/5.39
Eileen McNaughton [Fri, 11 Jun 2021 02:36:49 +0000 (14:36 +1200)]
Merge pull request #20576 from civicrm/5.39

5.39 to master

3 years agoMerge pull request #20571 from demeritcowboy/regen-539
Eileen McNaughton [Fri, 11 Jun 2021 02:36:23 +0000 (14:36 +1200)]
Merge pull request #20571 from demeritcowboy/regen-539

Update civicrm_generated (5.39 version)

3 years agoMerge pull request #20543 from seamuslee001/guards_common
colemanw [Fri, 11 Jun 2021 02:31:19 +0000 (22:31 -0400)]
Merge pull request #20543 from seamuslee001/guards_common

[php8-compact] Add in guards into common templates to assit with fixi…

3 years ago[php8-compact] Add in more protection for unset variables in various smarty templates
Seamus Lee [Tue, 8 Jun 2021 01:08:01 +0000 (01:08 +0000)]
[php8-compact] Add in more protection for unset variables in various smarty templates

3 years ago[php8-compact] Add in protection for unset variables in admin smarty templates
Seamus Lee [Tue, 8 Jun 2021 01:08:07 +0000 (01:08 +0000)]
[php8-compact] Add in protection for unset variables in admin smarty templates

3 years agoupdate civicrm_generated
demeritcowboy [Fri, 11 Jun 2021 00:50:12 +0000 (20:50 -0400)]
update civicrm_generated

3 years agoMerge pull request #20568 from civicrm/5.39
Seamus Lee [Fri, 11 Jun 2021 00:06:21 +0000 (10:06 +1000)]
Merge pull request #20568 from civicrm/5.39

5.39

3 years agoMerge pull request #20567 from seamuslee001/fix_unittest_warning
Seamus Lee [Thu, 10 Jun 2021 22:34:31 +0000 (08:34 +1000)]
Merge pull request #20567 from seamuslee001/fix_unittest_warning

[NFC] Fix phpunit9 deprecation issues on using assertType instead of …

3 years ago[NFC] Fix phpunit9 deprecation issues on using assertType instead of more explicit...
Seamus Lee [Thu, 10 Jun 2021 21:05:45 +0000 (07:05 +1000)]
[NFC] Fix phpunit9 deprecation issues on using assertType instead of more explicit assertIsArray or AssertIsInt

3 years agoMerge pull request #20566 from eileenmcnaughton/role
colemanw [Thu, 10 Jun 2021 11:49:16 +0000 (07:49 -0400)]
Merge pull request #20566 from eileenmcnaughton/role

Add pseudoconstant to acl_entity_role

3 years agoMerge pull request #20565 from eileenmcnaughton/val_err
Monish Deb [Thu, 10 Jun 2021 06:58:59 +0000 (12:28 +0530)]
Merge pull request #20565 from eileenmcnaughton/val_err

Throw exception rather than allow php fail

3 years agoAdd pseudoconstant to acl_entity_role
Eileen McNaughton [Thu, 10 Jun 2021 06:11:27 +0000 (18:11 +1200)]
Add pseudoconstant to acl_entity_role

Not sure this will help with dev/core#2615 but spotted it while trying to see if I can replicate
(still doing that)

3 years agoSet version to 5.40.alpha1
CiviCRM [Thu, 10 Jun 2021 05:59:26 +0000 (05:59 +0000)]
Set version to 5.40.alpha1

3 years agoMerge pull request #20432 from JMAConsulting/core_365_2
Eileen McNaughton [Thu, 10 Jun 2021 05:55:51 +0000 (17:55 +1200)]
Merge pull request #20432 from JMAConsulting/core_365_2

(dev/core#365) Scheduled Reminders - Add effective start and end date to admin UI

3 years agoMerge pull request #19973 from JMAConsulting/core_365_1
Eileen McNaughton [Thu, 10 Jun 2021 05:54:00 +0000 (17:54 +1200)]
Merge pull request #19973 from JMAConsulting/core_365_1

(dev/core#365) Scheduled Reminders - Add effective end and start date, extend unit test

3 years agoext/*/info.xml - Update version
CiviCRM [Thu, 10 Jun 2021 05:46:43 +0000 (05:46 +0000)]
ext/*/info.xml - Update version

3 years agoSet version to 5.39.beta1
CiviCRM [Thu, 10 Jun 2021 04:53:32 +0000 (04:53 +0000)]
Set version to 5.39.beta1

3 years agoThrow exception rather than allow php fail
Eileen McNaughton [Thu, 10 Jun 2021 02:34:36 +0000 (14:34 +1200)]
Throw exception rather than allow php fail

3 years agoMerge pull request #20532 from eileenmcnaughton/f_add
Seamus Lee [Thu, 10 Jun 2021 00:00:47 +0000 (10:00 +1000)]
Merge pull request #20532 from eileenmcnaughton/f_add

Fix Financial item test to validate Financials

3 years agoMerge pull request #20552 from eileenmcnaughton/fin
Seamus Lee [Wed, 9 Jun 2021 23:59:51 +0000 (09:59 +1000)]
Merge pull request #20552 from eileenmcnaughton/fin

Mark DetailTest as having invalid financials

3 years agoMerge pull request #20533 from totten/master-api4-omnivent
Eileen McNaughton [Wed, 9 Jun 2021 23:46:06 +0000 (11:46 +1200)]
Merge pull request #20533 from totten/master-api4-omnivent

Introduce civi.api4.authorizeRecord and civi.api4.validate

3 years agoMerge pull request #20564 from eileenmcnaughton/report
Eileen McNaughton [Wed, 9 Jun 2021 21:14:41 +0000 (09:14 +1200)]
Merge pull request #20564 from eileenmcnaughton/report

dev/core#2646 juice up the error a little

3 years agoMerge pull request #20493 from jaapjansma/dev_membership_37
Eileen McNaughton [Wed, 9 Jun 2021 19:39:04 +0000 (07:39 +1200)]
Merge pull request #20493 from jaapjansma/dev_membership_37

Fix for dev/membership#37

3 years agoMerge pull request #20563 from colemanw/array_key
demeritcowboy [Wed, 9 Jun 2021 19:34:42 +0000 (15:34 -0400)]
Merge pull request #20563 from colemanw/array_key

REF - Cleanup array key checking to use array_key_exists

3 years agodev/core#2646 juice up the error a little
Eileen McNaughton [Wed, 9 Jun 2021 19:34:06 +0000 (07:34 +1200)]
dev/core#2646 juice up the error a little

On explaining the issue in https://lab.civicrm.org/dev/core/-/issues/2646 not
having the name of the failed entity in the error message seemed like a pain point

3 years agoExpand CustomValue::_checkAccess()
Tim Otten [Wed, 9 Jun 2021 10:24:21 +0000 (03:24 -0700)]
Expand CustomValue::_checkAccess()

Before: Reports that access is available based one delegated-check for `Contact.update`

After: Reports that access is available based on multiple checks:

  1. The user must have access to the relevant CustomGroup (by way of ACL or perms)
  2. The user must have acces to the underlying entity (by way of checkAccessDelgated)

Comments: I did a bit of testing with `Custom_*.get`, and it does seem to
give access to single-value CustomGroups. So I removed a comment about
multi-value CustomGroups and expanded to a larger list of entities.

3 years agoMerge pull request #20562 from colemanw/shortArrayContactTask
demeritcowboy [Wed, 9 Jun 2021 14:22:52 +0000 (10:22 -0400)]
Merge pull request #20562 from colemanw/shortArrayContactTask

[REF] CRM_Contact_Task - Use short array syntax

3 years agoMerge pull request #20059 from samuelsov/dev/core#2479
colemanw [Wed, 9 Jun 2021 13:56:21 +0000 (09:56 -0400)]
Merge pull request #20059 from samuelsov/dev/core#2479

dev/core#2479 Adjust generic copy for localizable fields

3 years agoREF - Cleanup array key checking to use array_key_exists
Coleman Watts [Wed, 9 Jun 2021 13:41:52 +0000 (09:41 -0400)]
REF - Cleanup array key checking to use array_key_exists

Before: in_array($foo, array_keys($bar))
After: array_key_exists($foo, $bar)

3 years agoCRM_Contact_Task - Use short array syntax
Coleman Watts [Wed, 9 Jun 2021 12:45:26 +0000 (08:45 -0400)]
CRM_Contact_Task - Use short array syntax