civicrm-core.git
5 years agoMerge pull request #14070 from eileenmcnaughton/bee_free
Seamus Lee [Wed, 17 Apr 2019 01:00:15 +0000 (11:00 +1000)]
Merge pull request #14070 from eileenmcnaughton/bee_free

dev/core#562 Remove remaining free() instances from tests

5 years agoMerge pull request #14072 from eileenmcnaughton/dao
Seamus Lee [Wed, 17 Apr 2019 00:59:40 +0000 (10:59 +1000)]
Merge pull request #14072 from eileenmcnaughton/dao

Make DAO fields more consistent

5 years agoMerge pull request #14071 from eileenmcnaughton/bee_freeer
Seamus Lee [Tue, 16 Apr 2019 22:43:54 +0000 (08:43 +1000)]
Merge pull request #14071 from eileenmcnaughton/bee_freeer

dev/core#562 Remove more DAO->free() calls

5 years agoMerge pull request #14068 from eileenmcnaughton/search_test
Eileen McNaughton [Tue, 16 Apr 2019 21:48:15 +0000 (07:48 +1000)]
Merge pull request #14068 from eileenmcnaughton/search_test

[REF] Clean up CRM_Contribute_Form_SearchTest

5 years agoRegenerate DAO files to have 'where' fields defined
eileen [Mon, 15 Apr 2019 03:27:41 +0000 (13:27 +1000)]
Regenerate DAO files to have 'where' fields defined

5 years agoUpdate dao.tpl to not make presence of import or export required to add 'where' param
eileen [Mon, 15 Apr 2019 03:25:52 +0000 (13:25 +1000)]
Update dao.tpl to not make presence of import or export required to add 'where' param

Import & export have been hopelessly overloaded & misued in the code. One reason is that without them
'where' is not present. Logically import & export should have a narrow usage and should not
be a pre-requisite for being available as a search field, in reality not so much.

This simply makes the 'where' field available regardless of the presence of these fields

By doing this we can make the metadata in the Query object able to handle more fields
without special handling (e.g Contribution Recur fields)

5 years agodev/core#562 Remove more DAO->free() calls
eileen [Tue, 16 Apr 2019 21:12:22 +0000 (07:12 +1000)]
dev/core#562 Remove more DAO->free() calls

We have been removing a few of these each release. They no longer provide any benefit
as the resources are released in the deconstructor. OTOH they can in rare circumstances cause bugs.

Previous removals have not caused any issues so the slow approach is starting to
look overly cautious now

5 years agoRemove remaining free() instances from tests
eileen [Tue, 16 Apr 2019 20:57:56 +0000 (06:57 +1000)]
Remove remaining free() instances from tests

5 years agoMerge pull request #14065 from colemanw/summaryBlock
Eileen McNaughton [Tue, 16 Apr 2019 20:48:57 +0000 (06:48 +1000)]
Merge pull request #14065 from colemanw/summaryBlock

Ensure edit tooltip is always initially hidden in contact summary block

5 years agoClean up CRM_Contribute_Form_SearchTest
eileen [Mon, 15 Apr 2019 03:05:46 +0000 (13:05 +1000)]
Clean up CRM_Contribute_Form_SearchTest

This is mostly about switching to a data provider to include flexibility & re-usability
of the test

5 years agoEnsure edit tooltip is always initially hidden in contact summary block
Coleman Watts [Tue, 16 Apr 2019 13:46:52 +0000 (09:46 -0400)]
Ensure edit tooltip is always initially hidden in contact summary block

5 years agoMerge pull request #14057 from civicrm/5.13
Seamus Lee [Tue, 16 Apr 2019 00:14:07 +0000 (10:14 +1000)]
Merge pull request #14057 from civicrm/5.13

5.13

5 years agoMerge pull request #14051 from eileenmcnaughton/inv
Seamus Lee [Mon, 15 Apr 2019 21:16:25 +0000 (07:16 +1000)]
Merge pull request #14051 from eileenmcnaughton/inv

dev/core#534 Re-instate pay-now button

5 years agodev/core#534 Re-instate pay-now button
eileen [Mon, 15 Apr 2019 02:01:21 +0000 (12:01 +1000)]
dev/core#534 Re-instate pay-now button

This is regression - likely for a few months? Fix adds a unit test & does some additional tidy up

We should consider for 5.12

5 years agoMerge pull request #14011 from colemanw/typeValidateCleanup
Eileen McNaughton [Mon, 15 Apr 2019 00:11:30 +0000 (10:11 +1000)]
Merge pull request #14011 from colemanw/typeValidateCleanup

(REF) Reduce redundant code in CRM_Utils_Type::validate

5 years agoMerge pull request #14010 from colemanw/assetCheck
Matthew Wire [Sun, 14 Apr 2019 20:12:05 +0000 (21:12 +0100)]
Merge pull request #14010 from colemanw/assetCheck

Skip adding core resources when building assets

5 years agoMerge pull request #14033 from eileenmcnaughton/recur_cancel_api
Matthew Wire [Sun, 14 Apr 2019 20:07:52 +0000 (21:07 +0100)]
Merge pull request #14033 from eileenmcnaughton/recur_cancel_api

Switch to using ContributionRecur.cancel api from CancelSubscription form

5 years agoMerge pull request #14030 from aydun/casecontact_hooks
Matthew Wire [Sun, 14 Apr 2019 19:59:38 +0000 (20:59 +0100)]
Merge pull request #14030 from aydun/casecontact_hooks

Make hook_civicrm_pre() and hook_civicrm_post() fire on CaseContacts

5 years agoMerge pull request #13993 from eileenmcnaughton/recur_fixes
Matthew Wire [Sun, 14 Apr 2019 19:47:16 +0000 (20:47 +0100)]
Merge pull request #13993 from eileenmcnaughton/recur_fixes

dev/core#846 Rationalise loading of payment processor across the 3 update forms

5 years agoMerge pull request #14040 from eileenmcnaughton/import
Matthew Wire [Sun, 14 Apr 2019 19:39:21 +0000 (20:39 +0100)]
Merge pull request #14040 from eileenmcnaughton/import

[REF] Extract formatLocationBlock from import parsing

5 years agoMerge pull request #13837 from eileenmcnaughton/event_conf
Matthew Wire [Sun, 14 Apr 2019 19:37:43 +0000 (20:37 +0100)]
Merge pull request #13837 from eileenmcnaughton/event_conf

Create contribution before taking payment, per contribution page workflow

5 years agoMerge pull request #14047 from totten/master-api-wrap
Eileen McNaughton [Sun, 14 Apr 2019 00:31:33 +0000 (10:31 +1000)]
Merge pull request #14047 from totten/master-api-wrap

(dev/core#873) civi.api.prepare - Allow dynamic wrappers

5 years agoMerge pull request #14048 from civicrm/5.13
Eileen McNaughton [Sun, 14 Apr 2019 00:28:39 +0000 (10:28 +1000)]
Merge pull request #14048 from civicrm/5.13

5.13

5 years agoMerge pull request #14046 from totten/5.13-schema-fmt
Seamus Lee [Sun, 14 Apr 2019 00:03:22 +0000 (10:03 +1000)]
Merge pull request #14046 from totten/5.13-schema-fmt

(NFC) SchemaStructure.php - Fix up mismatch between stored+generated code

5 years ago(dev/core#873) civi.api.prepare - Allow dynamic wrappers
Tim Otten [Wed, 10 Apr 2019 02:16:47 +0000 (19:16 -0700)]
(dev/core#873) civi.api.prepare - Allow dynamic wrappers

Overview
--------

Allow extensions to dynamically wrap an API. There are some existing mechanisms which sort-of allow wrapping, but
this enables additional use-cases.

Before
------

There are a few techniques for wrapping or overriding an API, but none is suitable to my current use-case. Limitations:

* `hook_civicrm_apiWrappers` - This allows registering things before and after the API call, but it does not allow
   changing the underlying API call.
* `civi.api.{authorize,prepare,respond}` events - Same as above. These are a bit more nuanced/fine-grained, but still does not allow changing
* `civi.api.resolve` event with `AdhocProvider` - This allows you to swap an API completely, but it doesn't allow you
  to delegate back to the original API call (if you've got nothing to add).

After
------

One may subscribe to `civi.api.prepare` and then call the `wrapApi()` helper:

```php
function onPrepare($event) {
  if ($event->getApiRequestSig() === '3.widget.frobnicate') {
    $event->wrapApi(function($apiRequest, $continue){
      echo "Hello\n";
      $r = $continue($apiRequest);
      echo "Goodbye\n";
      return $r;
    });
  }
}
```

Key characteristics:

* The wrapper only applies if you register it specifically for the given API call.
* The wrapper allows you to defer to the original implementation (`$continue`).
* The wrapper allows you to perform logic before and after.
* The wrapper allows you to *conditionally* replace -- you might call `$continue` or something entirely different.

The style here is more event-oriented, but you can see the same concept in OOP systems, such as PHP's function-override notation.
This would be analogous:

```php
class MyChild extends MyParent {
  function frobnicate($arg1) {
    echo "Hello\n";
    $r = parent::frobnicate($arg1);
    echo "Goodbye\n";
    return $r;
  }
}
```

5 years agoMerge pull request #14044 from totten/master-test-trait-2
Seamus Lee [Sat, 13 Apr 2019 21:12:11 +0000 (07:12 +1000)]
Merge pull request #14044 from totten/master-test-trait-2

(REF; dev/core#873) CiviUnitTestCase - Extract traits to facilitate extension testing

5 years ago(NFC) SchemaStructure.php - Fix up mismatch between stored+generated code
Tim Otten [Sat, 13 Apr 2019 20:19:09 +0000 (13:19 -0700)]
(NFC) SchemaStructure.php - Fix up mismatch between stored+generated code

Overview
--------

The class `CRM_Core_I18n_SchemaStructure` is autogenerated via GenCode, and it is also commited to git.
The two forms don't match because of the recent code-style cleanup.

Before
------

After running GenCode, there appears to be uncommitted changes in `CRM_Core_I18n_SchemaStructure`.
The changes indicate a reversion in code-style (e.g. `null` vs `NULL`; some whitespace).

After
-----

GenCode produces output which matches the recent cleanup.

Comments
--------

Fixing `null` / `NULL` was easy. However, the whitespace mismatch was more subtle -- because the
`PHP_Beautifier` was messing it up. To resolve, I disabled `PHP_Beautifier` for this file, and fixed
the underlying templates to generate well-formed code.

The output of the process matches the existing code; therefore, the change
have no functional impact (NFC).  You can see this by running `setup.sh` and
checking the `git status`.

5 years agoContactTestTrait::createLoggedInUser() - Fix domain_id error when running from extension
Tim Otten [Sat, 13 Apr 2019 00:42:40 +0000 (17:42 -0700)]
ContactTestTrait::createLoggedInUser() - Fix domain_id error when running from extension

5 years agoMove helpers from CiviUnitTestCase to MailingTestTrait
Tim Otten [Sat, 13 Apr 2019 00:41:12 +0000 (17:41 -0700)]
Move helpers from CiviUnitTestCase to MailingTestTrait

* `createMailing(...)`
* `deleteMailing(...)`

5 years agoMove helpers from CiviUnitTestCase to DbTestTrait
Tim Otten [Sat, 13 Apr 2019 00:34:56 +0000 (17:34 -0700)]
Move helpers from CiviUnitTestCase to DbTestTrait

* `assertDBState(...)`
* `assertDBNotNull(...)`
* `assertDBNull(...)`
* `assertDBRowNotExist(...)`
* `assertDBRowExist(...)`
* `assertDBCompareValue(...)`
* `assertDBCompareValues(...)`
* `assertDBQuery(...)`

5 years agoMove helpers from CiviUnitTestCase to GenericAssertionsTrait
Tim Otten [Sat, 13 Apr 2019 00:32:15 +0000 (17:32 -0700)]
Move helpers from CiviUnitTestCase to GenericAssertionsTrait

* `assertType(...)`
* `assertTreeEquals(...)`
* `assertApproxEquals(...)`
* `assertAttributesEquals(...)`
* `assertArrayKeyExists(...)`
* `assertArrayValueNotNull(...)`
* `assertArrayValuesEqual(...)`

5 years agoMove helpers from CiviUnitTestCase to ContactTestTrait
Tim Otten [Sat, 13 Apr 2019 00:20:44 +0000 (17:20 -0700)]
Move helpers from CiviUnitTestCase to ContactTestTrait

* `createLoggedInUser(...)`
* `organizationCreate(...)`
* `individualCreate(...)`
* `householdCreate(...)`
* `sampleContact(...)`
* `_contactCreate(...)`
* `contactDelete(...)`
* `groupContactCreate(...)`
* `groupCreate(...)`
* `groupDelete(...)`

5 years agoMerge pull request #14041 from colemanw/fieldTitles
Eileen McNaughton [Sat, 13 Apr 2019 01:22:38 +0000 (11:22 +1000)]
Merge pull request #14041 from colemanw/fieldTitles

Add pseudoconstant to UFField dao

5 years agoMerge pull request #14028 from yashodha/dev-865
Eileen McNaughton [Fri, 12 Apr 2019 22:10:04 +0000 (08:10 +1000)]
Merge pull request #14028 from yashodha/dev-865

(dev/core#865) Result filter criteria doesn't show IS NULL/IS NOT NUL…

5 years agoMerge pull request #14039 from eileenmcnaughton/cont_recur
Eileen McNaughton [Fri, 12 Apr 2019 21:54:48 +0000 (07:54 +1000)]
Merge pull request #14039 from eileenmcnaughton/cont_recur

Remove deprecated function

5 years agoAdd pseudoconstant to UFField dao
Coleman Watts [Fri, 12 Apr 2019 18:28:23 +0000 (14:28 -0400)]
Add pseudoconstant to UFField dao

5 years agoadd missing assignment
yashodha [Fri, 12 Apr 2019 12:05:37 +0000 (17:35 +0530)]
add missing assignment

5 years agoExtract formatLocationBlock from import parsing
eileen [Fri, 12 Apr 2019 02:23:36 +0000 (12:23 +1000)]
Extract formatLocationBlock from import parsing

Next steps here are to remove the markIncomplete in testImportPrimaryAddress
and get Primary importing working on Phone & then email and to
call this extracted function instead of ->formatContactParameters(, );
when we are formatting a location (for code simplification as formatContactParameters
effectively just calls this but from much lower down

5 years agoMerge pull request #14037 from colemanw/dev/core#562
Seamus Lee [Fri, 12 Apr 2019 01:29:06 +0000 (11:29 +1000)]
Merge pull request #14037 from colemanw/dev/core#562

dev/core#562 - Remove dao->free from api

5 years agoRemove deprecated function
eileen [Fri, 12 Apr 2019 00:15:07 +0000 (10:15 +1000)]
Remove deprecated function

This was deprecated in May 2018 as not called from within core  - this removes

5 years agodev/core#562 - Remove dao->free from api
Coleman Watts [Thu, 11 Apr 2019 23:50:09 +0000 (19:50 -0400)]
dev/core#562 - Remove dao->free from api

5 years agoMerge pull request #14036 from eileenmcnaughton/5.13
Eileen McNaughton [Thu, 11 Apr 2019 23:49:43 +0000 (11:49 +1200)]
Merge pull request #14036 from eileenmcnaughton/5.13

Arg I put these fixes in 5.12 & master while trying for 5.13

5 years agoMerge pull request #14035 from civicrm/5.13
Eileen McNaughton [Thu, 11 Apr 2019 23:46:34 +0000 (11:46 +1200)]
Merge pull request #14035 from civicrm/5.13

5.13 to master

5 years agoMerge pull request #14034 from eileenmcnaughton/5.13
Eileen McNaughton [Thu, 11 Apr 2019 23:46:00 +0000 (11:46 +1200)]
Merge pull request #14034 from eileenmcnaughton/5.13

dev/core#859 - Dedupe fails on address field in 5.12

5 years agoMerge pull request #14031 from seamuslee001/phpcs_disable_mcrypt
Eileen McNaughton [Thu, 11 Apr 2019 23:30:35 +0000 (11:30 +1200)]
Merge pull request #14031 from seamuslee001/phpcs_disable_mcrypt

Disable phpcs checking in the Crypt files where mcrypt functions are

5 years agoMerge pull request #14032 from seamuslee001/ingore_eval
Eileen McNaughton [Thu, 11 Apr 2019 23:30:17 +0000 (11:30 +1200)]
Merge pull request #14032 from seamuslee001/ingore_eval

(NFC) Ensure phpcs ignores eval notice in these files as it is required

5 years agoadd test
DemeritCowboy [Wed, 10 Apr 2019 00:59:15 +0000 (20:59 -0400)]
add test

5 years agofix array and notice
DemeritCowboy [Wed, 10 Apr 2019 00:42:18 +0000 (20:42 -0400)]
fix array and notice

5 years agoSwitch to using ContributionRecur.cancel api from CancelSubscription form
eileen [Thu, 11 Apr 2019 22:09:43 +0000 (08:09 +1000)]
Switch to using ContributionRecur.cancel api from CancelSubscription form

The function cancelRecurContribution is only called from the form ant from the api.

This makes it so the form uses the api, which we have started to add unit testing to. Follow
ing this we can use the api for transaction handling and move more of the form logic into
the api, making it available to others & allowing us to better move to a new form layer later
without as much logic in the forms

5 years ago(NFC) Ensure phpcs ignores eval notice in these files as it is required
Seamus Lee [Thu, 11 Apr 2019 22:06:43 +0000 (08:06 +1000)]
(NFC) Ensure phpcs ignores eval notice in these files as it is required

5 years agoDisable phpcs checking in the Crypt files where mcrypt functions are
Seamus Lee [Thu, 11 Apr 2019 21:59:12 +0000 (07:59 +1000)]
Disable phpcs checking in the Crypt files where mcrypt functions are

5 years agoMake hook_civicrm_pre() and hook_civicrm_post() fire on CaseContacts
Aidan Saunders [Thu, 11 Apr 2019 17:00:34 +0000 (18:00 +0100)]
Make hook_civicrm_pre() and hook_civicrm_post() fire on CaseContacts

5 years ago(dev/core#865) Result filter criteria doesn't show IS NULL/IS NOT NULL for operations
yashodha [Thu, 11 Apr 2019 08:33:36 +0000 (14:03 +0530)]
(dev/core#865) Result filter criteria doesn't show IS NULL/IS NOT NULL for operations

5 years agoMerge pull request #14027 from civicrm/5.13
Seamus Lee [Thu, 11 Apr 2019 03:41:40 +0000 (13:41 +1000)]
Merge pull request #14027 from civicrm/5.13

5.13

5 years agoMerge pull request #14025 from seamuslee001/coder_lint_alt_php
Seamus Lee [Thu, 11 Apr 2019 03:40:34 +0000 (13:40 +1000)]
Merge pull request #14025 from seamuslee001/coder_lint_alt_php

(NFC) Lint additional php files up to the new coder standard

5 years ago(NFC) Lint additional php files up to the new coder standard
Seamus Lee [Thu, 11 Apr 2019 01:10:56 +0000 (11:10 +1000)]
(NFC) Lint additional php files up to the new coder standard

5 years agoMerge pull request #14026 from seamuslee001/5.13
Tim Otten [Thu, 11 Apr 2019 02:28:40 +0000 (19:28 -0700)]
Merge pull request #14026 from seamuslee001/5.13

Port Code Style Fixes to 5.13 from master

5 years ago(NFC) Minor code style fixes
Seamus Lee [Tue, 9 Apr 2019 23:39:27 +0000 (09:39 +1000)]
(NFC) Minor code style fixes

5 years ago(NFC) Update CRM/Contact to match new coder style
Seamus Lee [Wed, 10 Apr 2019 21:11:37 +0000 (07:11 +1000)]
(NFC) Update CRM/Contact to match new coder style

5 years agoMerge pull request #14024 from civicrm/5.13
Seamus Lee [Thu, 11 Apr 2019 00:21:17 +0000 (10:21 +1000)]
Merge pull request #14024 from civicrm/5.13

5.13

5 years agoMerge pull request #14023 from seamuslee001/core_dedupe_custom
colemanw [Wed, 10 Apr 2019 23:01:06 +0000 (19:01 -0400)]
Merge pull request #14023 from seamuslee001/core_dedupe_custom

(NFC) Update CRM/Core CRM/Custom CRM/Dedupe to match the new coder style

5 years agoMerge pull request #14022 from seamuslee001/contact_new_coder
Seamus Lee [Wed, 10 Apr 2019 22:52:13 +0000 (08:52 +1000)]
Merge pull request #14022 from seamuslee001/contact_new_coder

(NFC) Update CRM/Contact to match new coder style

5 years agoMerge pull request #14019 from seamuslee001/event_new_style
Seamus Lee [Wed, 10 Apr 2019 22:49:43 +0000 (08:49 +1000)]
Merge pull request #14019 from seamuslee001/event_new_style

(NFC) Update CRM/Event folder for the new coder style

5 years agoMerge pull request #14021 from seamuslee001/contribute_new_coder
Seamus Lee [Wed, 10 Apr 2019 21:55:24 +0000 (07:55 +1000)]
Merge pull request #14021 from seamuslee001/contribute_new_coder

(NFC) update CRM/Contribute to be the new coder standard

5 years ago(NFC) Update CRM/Core CRM/Custom CRM/Dedupe to match the new coder style
Seamus Lee [Wed, 10 Apr 2019 21:36:06 +0000 (07:36 +1000)]
(NFC) Update CRM/Core CRM/Custom CRM/Dedupe to match the new coder style

5 years ago(NFC) Update CRM/Contact to match new coder style
Seamus Lee [Wed, 10 Apr 2019 21:11:37 +0000 (07:11 +1000)]
(NFC) Update CRM/Contact to match new coder style

5 years agoMerge pull request #14016 from seamuslee001/mailing_group_grant_friend_new_style
colemanw [Wed, 10 Apr 2019 21:27:25 +0000 (17:27 -0400)]
Merge pull request #14016 from seamuslee001/mailing_group_grant_friend_new_style

(NFC) Update CRM/Friend CRM/Grant CRM/Group CRM/Mailing to be up to d…

5 years agoMerge pull request #14017 from seamuslee001/batch_campaign_case_new_style
colemanw [Wed, 10 Apr 2019 21:26:04 +0000 (17:26 -0400)]
Merge pull request #14017 from seamuslee001/batch_campaign_case_new_style

(NFC) Update CRM/Badge CRM/Campaign CRM/Case to be up to date with a …

5 years agoMerge pull request #14018 from seamuslee001/financial_extension_export_cxn_dashlet
colemanw [Wed, 10 Apr 2019 21:25:07 +0000 (17:25 -0400)]
Merge pull request #14018 from seamuslee001/financial_extension_export_cxn_dashlet

(NFC) Update CRM/Cxn CRM/Dashlet CRM/Export CRM/Extension and CRM/Fin…

5 years ago(NFC) update CRM/Contribute to be the new coder standard
Seamus Lee [Wed, 10 Apr 2019 20:33:50 +0000 (06:33 +1000)]
(NFC) update CRM/Contribute to be the new coder standard

5 years ago(NFC) Update CRM/Friend CRM/Grant CRM/Group CRM/Mailing to be up to date to a future...
Seamus Lee [Wed, 10 Apr 2019 00:25:23 +0000 (10:25 +1000)]
(NFC) Update CRM/Friend CRM/Grant CRM/Group CRM/Mailing to be up to date to a future coder version

5 years ago(NFC) Update CRM/Cxn CRM/Dashlet CRM/Export CRM/Extension and CRM/Financial files...
Seamus Lee [Wed, 10 Apr 2019 01:21:31 +0000 (11:21 +1000)]
(NFC) Update CRM/Cxn CRM/Dashlet CRM/Export CRM/Extension and CRM/Financial files to new coder style

5 years ago(NFC) Update CRM/Event folder for the new coder style
Seamus Lee [Wed, 10 Apr 2019 02:49:09 +0000 (12:49 +1000)]
(NFC) Update CRM/Event folder for the new coder style

5 years ago(NFC) Update CRM/Badge CRM/Campaign CRM/Case to be up to date with a newer coder
Seamus Lee [Wed, 10 Apr 2019 00:48:27 +0000 (10:48 +1000)]
(NFC) Update CRM/Badge CRM/Campaign CRM/Case to be up to date with a newer coder

5 years agoMerge pull request #14015 from seamuslee001/nfc_code_style_fixes
Seamus Lee [Wed, 10 Apr 2019 01:33:45 +0000 (11:33 +1000)]
Merge pull request #14015 from seamuslee001/nfc_code_style_fixes

(NFC) Minor code style fixes

5 years ago(NFC) Minor code style fixes
Seamus Lee [Tue, 9 Apr 2019 23:39:27 +0000 (09:39 +1000)]
(NFC) Minor code style fixes

5 years agoSet version to 5.14.alpha1
CiviCRM [Tue, 9 Apr 2019 18:01:36 +0000 (18:01 +0000)]
Set version to 5.14.alpha1

5 years agoSet version to 5.13.beta1
CiviCRM [Tue, 9 Apr 2019 17:55:28 +0000 (17:55 +0000)]
Set version to 5.13.beta1

5 years agoMerge pull request #13551 from eileenmcnaughton/ext_up
Tim Otten [Tue, 9 Apr 2019 17:46:18 +0000 (10:46 -0700)]
Merge pull request #13551 from eileenmcnaughton/ext_up

Load hooks during upgrade mode

5 years agoAdded myself
Joe Murray [Tue, 9 Apr 2019 15:22:26 +0000 (11:22 -0400)]
Added myself

5 years agoReduce redundant code in CRM_Utils_Type::validate
Coleman Watts [Tue, 9 Apr 2019 11:04:19 +0000 (07:04 -0400)]
Reduce redundant code in CRM_Utils_Type::validate

5 years agoLoad hooks during upgrade mode
eileen [Wed, 6 Feb 2019 21:48:02 +0000 (10:48 +1300)]
Load hooks during upgrade mode

For unknown, svn, reasons extension hooks are not loaded during upgrade
(this doesn't apply to drupal modules) - this causes some fairly serious problems
1) settings are re-loaded & cached with settings from extensions being lost
2) trigger alter hooks are lost this means
 - the summary fields triggers are frequently lost on upgrade
 - hooks that unset various tables to prevent them from being logged can fail, resulting in those log tables being created
 - hooks that specify the table should be innodb can fail to run, resulting in archive format.

I can't think WHY we do this? Presumably there was some problem that would have been better solved another
way but which was solved this way?

Fix "Load hooks during upgrade mode" (45312e1e64dd6af0281fe5fb7f96dbd8be39e524)

In my testing, the commit doesn't do what it says because the symbols are wrong.

5 years agoMerge pull request #14005 from colemanw/shortSettings
Eileen McNaughton [Tue, 9 Apr 2019 03:47:53 +0000 (15:47 +1200)]
Merge pull request #14005 from colemanw/shortSettings

[NFC] Short array syntax - auto convert settings dir

5 years agoMerge pull request #13995 from eileenmcnaughton/loc_title
Eileen McNaughton [Tue, 9 Apr 2019 03:47:35 +0000 (15:47 +1200)]
Merge pull request #13995 from eileenmcnaughton/loc_title

dev/financial#2 Update new payment_processor.title field to be localisable

5 years agoMerge pull request #14007 from colemanw/colorTest
Eileen McNaughton [Tue, 9 Apr 2019 03:46:39 +0000 (15:46 +1200)]
Merge pull request #14007 from colemanw/colorTest

Improve test coverage for CRM_Utils_Color::getRgb()

5 years agoMerge pull request #14009 from eileenmcnaughton/recur_flush
Eileen McNaughton [Tue, 9 Apr 2019 03:07:24 +0000 (15:07 +1200)]
Merge pull request #14009 from eileenmcnaughton/recur_flush

Improve flushing after creating a processor so it can be used for a recurring in the same run

5 years agoMerge pull request #14008 from totten/master-hook
Eileen McNaughton [Tue, 9 Apr 2019 03:06:58 +0000 (15:06 +1200)]
Merge pull request #14008 from totten/master-hook

(REF) CRM_Core_Resources - Move hook declaration from addCoreResources() to Container.php

5 years agoMerge pull request #14006 from eileenmcnaughton/payment_pay
Eileen McNaughton [Tue, 9 Apr 2019 02:23:21 +0000 (14:23 +1200)]
Merge pull request #14006 from eileenmcnaughton/payment_pay

Include lower level data when throwing an exception on payment processor.pay

5 years agoMerge pull request #14002 from colemanw/menuConfig
Eileen McNaughton [Tue, 9 Apr 2019 02:09:22 +0000 (14:09 +1200)]
Merge pull request #14002 from colemanw/menuConfig

Menu config screen improvements

5 years agoSkip adding core resources when building assets
Coleman Watts [Tue, 9 Apr 2019 02:01:59 +0000 (22:01 -0400)]
Skip adding core resources when building assets

Adds asset builder url to the whitelist of ajax paths in which we skip adding core resources.

5 years agoImprove flushing after creating a processor so it can be used for a recurring in...
eileen [Tue, 9 Apr 2019 01:56:09 +0000 (13:56 +1200)]
Improve flushing after creating a processor so it can be used for a recurring in the same run

Mostly affects tests....

5 years agoMerge pull request #14000 from eileenmcnaughton/recur_fn
Seamus Lee [Tue, 9 Apr 2019 01:48:18 +0000 (11:48 +1000)]
Merge pull request #14000 from eileenmcnaughton/recur_fn

Add unit testing for activity creation when cancelling a recurring, related cleanup

5 years agoShort array syntax - auto convert settings dir
Coleman Watts [Tue, 9 Apr 2019 00:29:07 +0000 (20:29 -0400)]
Short array syntax - auto convert settings dir

5 years agoUpdate new payment_processor.title field to be localisable
eileen [Sun, 7 Apr 2019 22:16:10 +0000 (10:16 +1200)]
Update new payment_processor.title field to be localisable

Re-order upgrade to fix upgrade process and ensure there is the runSql step

5 years agocolorTest
Coleman Watts [Tue, 9 Apr 2019 01:08:59 +0000 (21:08 -0400)]
colorTest

5 years ago(REF) CRM_Core_Resources - Move hook declaration from addCoreResources() to Container.php
Tim Otten [Mon, 8 Apr 2019 23:13:48 +0000 (16:13 -0700)]
(REF) CRM_Core_Resources - Move hook declaration from addCoreResources() to Container.php

tldr: It's easier to declare `hook_civicrm_buildAsset` listeners at a high-level.

Asset building can use two modes -- production mode writes a static file to
disk when it's being reference.  Debug mode just generates a URL for a
web-service (which in turn dynamically renders the content in a separate
page-view).

If the only mode were production mode, then the code would be on pretty
solid ground.  We could even simplify things a lot by changing the
AssetBuilder contract to replace the hooks with callbacks, as in:

```php
Civi::service('asset_builder')->getUrl('crm-menu.css', function() {
  return '...the css code...';
});
```

Why have a hook?  Because hooks are generally context-free and
always-available.  If we use debug-mode (or if we add a feature to warm-up
the caches during deployment), then we'll want to fire that hook from a
different context (e.g.  web-service or CLI), and the hook-listener needs to
be available in those other contexts.

It would be nice if we could declare hooks generally without needing to edit
the `Container.php` mega-file (e.g.  maybe some kind of annotation).  But,
for the moment, I think this is the best spot that we have in `civicrm-core`
for ensuring that hook listeners are fully/consistently registered.

5 years agoMerge pull request #13996 from colemanw/menuColor
Tim Otten [Tue, 9 Apr 2019 01:05:16 +0000 (18:05 -0700)]
Merge pull request #13996 from colemanw/menuColor

Configurable menubar color

5 years agoInclude lower level data when throwing an exception on payment processor.pay
eileen [Tue, 9 Apr 2019 00:51:57 +0000 (12:51 +1200)]
Include lower level data when throwing an exception on payment processor.pay

5 years agoPass menubar preference as a param. Simplify cache mechanics. (#8)
Tim Otten [Mon, 8 Apr 2019 23:20:36 +0000 (16:20 -0700)]
Pass menubar preference as a param. Simplify cache mechanics. (#8)

Ex: If an admin uses an API call (CLI/REST) to change the menubar color,
then they don't need to follow-up with a cache-clear.  The new setting just
goes live.

Ex: If a customization (via `civicrm.settings.php` or via extension) decides
on the color scheme programmatically (e.g.  per-domain or per-role or
per-user-preference), then they don't need to clear cache.  Multiple color
schemes can coexist.

5 years agoMerge pull request #14003 from seamuslee001/sl_fix_4_7_31_upgrade
Seamus Lee [Mon, 8 Apr 2019 23:19:39 +0000 (09:19 +1000)]
Merge pull request #14003 from seamuslee001/sl_fix_4_7_31_upgrade

Fix 4.7.31 Upgrade in multilingual mode