civicrm-core.git
4 years agoCRM_Core_ClassLoader - Fix loading with alternate packages path
Tim Otten [Wed, 15 Jan 2020 21:40:32 +0000 (13:40 -0800)]
CRM_Core_ClassLoader - Fix loading with alternate packages path

4 years agoCRM_Core_IDS - Fix loading with alternate packages path
Tim Otten [Wed, 15 Jan 2020 21:41:09 +0000 (13:41 -0800)]
CRM_Core_IDS - Fix loading with alternate packages path

4 years agoCRM_Core_Smarty - Fix loading with alternate packages path
Tim Otten [Wed, 15 Jan 2020 21:41:54 +0000 (13:41 -0800)]
CRM_Core_Smarty - Fix loading with alternate packages path

4 years agoCRM_Core_Resources - Fix loading with alternate packages path
Tim Otten [Wed, 15 Jan 2020 22:37:27 +0000 (14:37 -0800)]
CRM_Core_Resources - Fix loading with alternate packages path

4 years agoApi4 - add more debug output
Coleman Watts [Tue, 28 Jan 2020 22:12:29 +0000 (17:12 -0500)]
Api4 - add more debug output

4 years agoCRM_Core_Menu - Fix warnings during local test run (dev/core#742)
Tim Otten [Sat, 18 Jan 2020 07:44:18 +0000 (23:44 -0800)]
CRM_Core_Menu - Fix warnings during local test run (dev/core#742)

Before
------

In certain local OSX+D8 test environments, when running the full suite, I got a large number of warnings like this:

```
Warning: simplexml_load_file(): I/O warning : failed to load external entity "/Users/totten/bknix/build/drupal8-clean/web/vendor/civicrm/civicrm-core//CRM/Campaign/xml/Menu/Campaign.xml" in /Users/totten/bknix/build/drupal8-clean/web/vendor/civicrm/civicrm-core/CRM/Core/Menu.php on line 99
    ```

After
-----

Those warnings seem to have gone away.

The menu still seems to populate correctly.

Comments
--------

This smells a lot like dev/core#742 -- e.g.  it's the same warning and
(after adjusting for changes in line-numbering over the months) same line of
code.

4 years agoE2E_Core_LocalizedDataTest - Adaptation for composer/D8/git-style deployments
Tim Otten [Tue, 28 Jan 2020 01:13:10 +0000 (17:13 -0800)]
E2E_Core_LocalizedDataTest - Adaptation for composer/D8/git-style deployments

4 years agoCivi\Test - Allow `headless()->apply()` (etc) to execute without setup.sh
Tim Otten [Mon, 27 Jan 2020 23:59:41 +0000 (15:59 -0800)]
Civi\Test - Allow `headless()->apply()` (etc) to execute without setup.sh

Before
------

If you have a copy of the `git` codebase and wish to run any of the headless
test suites, you *must* run `setup.sh` aka `GenCode` beforehand.

This is because certain files - `sql/civicrm.mysql` and
`sql/civicrm_data.mysql` - are used in the headless suite.  As large
auto-generated files, they are not provided in git.

After
-----

The files `sql/civicrm.mysql` and `sql/civicrm_data.mysql` are no longer
required by the test suite -- the headless tests will directly use the
`GenCode` classes to produce the needful.

Comments
--------

The general thrust of this commit is to find spots which read an SQL file, e.g.

```php
\Civi\Test::execute(file_get_contents("foobar.mysql"));
```

and instead call the generator for that file, e.g.:

```php
$schema = new \CRM_Core_CodeGen_Schema(\Civi\Test::codeGen());
$result = $schema->generateFooBar();
\Civi\Test::execute($result['foobar.mysql']);
});
```

In doing so, we incorporate a couple tricks:

* The SQL content is cached for the duration of the test-run (`Civi\Test::$statics`).
  Generating the SQL is not super expensive... but `Civi\Test::headless()->...apply()`
  may be called thousands of times, so it could add-up. Just cache it.
* Most of the `generateFooBar()` functions depend in some fashion on `ts()`. This
  commit depends on a preceding commit to make `ts()` more amenable to execution
  during early stages of the test.
    * Related discussion: https://chat.civicrm.org/civicrm/pl/ehohytqkf7bd5prg9w75dq4qqw

4 years ago(REF) Civi\Test - Use de-minimis ts() while runnning installation
Tim Otten [Mon, 27 Jan 2020 23:50:52 +0000 (15:50 -0800)]
(REF) Civi\Test - Use de-minimis ts() while runnning installation

When running early-stage installation helpers like
`Civi\Test::headless()->...->apply()` or `Civi\Test:data()->...->populate()`
it can be hard to call `CRM_CodeGen_*` functionality - because that relies
on `ts()` which relies on other system services.

This change basically suspends/swaps some of the default `ts()` behavior
while the test system performs installation.

The change is in two sub-parts:

* Implement `asPreInstall()` (Files: `Civi/Test.php` and `CRM/Core/I18n.php`)
    * Add the helper `\Civi\Test::asPreInstall()`
    * Skip the use of "word replacements" during the pre-install phase
* Use `asPreInstall()` (Files: `Civi/Test/Data.php` and `Civi/Test/CiviEnvBuilder.php`)
    * Wrap existing code with the helper `\Civi\Test::asPreInstall(). These changes look big, but that's
      just whitespace -- inserting `asPreInstall()` changes the indentation.

This lays groundwork for another commit which will replace some references to `sql/civicrm*.mysql`
with references to `CRM_CodeGen_*`.

4 years ago(REF) CRM_Core_CodeGen_Schema - Allow generating SQL without making files
Tim Otten [Wed, 22 Jan 2020 22:46:55 +0000 (14:46 -0800)]
(REF) CRM_Core_CodeGen_Schema - Allow generating SQL without making files

Overview
--------

This is a refactoring to allow consumers of `CRM_Core_CodeGen_Schema` to
request the SQL without creating files.

Before
------

Calls to `CRM_Core_CodeGen_Schema::generateDropSql` (ad nauseum) create SQL files.

After
-----

Calls to `CRM_Core_CodeGen_Schema::generateDropSql` (ad nauseum) return SQL strings.

Comments
--------

To ensure that files are still generated consistently, you can use this procedure:

```
git checkout MY_BASE_BRANCH
./bin/setup.sh -g
cp -r sql sql.orig

git checkout MY_MODIFIED_BRANCH

rm sql/civicrm.mysql sql/civicrm_acl*mysql sql/civicrm_data*mysql sql/civicrm_drop.mysql sql/civicrm_navigation.mysql -f
./bin/setup.sh -g

colordiff -ru sql.orig sql
```

4 years agoMake $civicrm_paths less sensitive to trailing slashes. Add tests.
Tim Otten [Wed, 22 Jan 2020 05:14:28 +0000 (21:14 -0800)]
Make $civicrm_paths less sensitive to trailing slashes. Add tests.

Overview
--------

Recall that the default value of `imageUploadURL` is `[civicrm.files]/persist/contribute/`. Now, suppose you have one of these two configurations in `civicrm.settings.php`:

```php
// (1) Trailing slash configuration
$civicrm_paths['civicrm.files']['url'] = 'http://tmpd8-clean.bknix:8001/sites/default/files/civicrm/';
$civicrm_paths['civicrm.files']['path'] = '/Users/totten/bknix/build/tmpd8-clean/web/sites/default/files/civicrm/';

// (2) Trimmed slash configuration
$civicrm_paths['civicrm.files']['url'] = 'http://tmpd8-clean.bknix:8001/sites/default/files/civicrm';
$civicrm_paths['civicrm.files']['path'] = '/Users/totten/bknix/build/tmpd8-clean/web/sites/default/files/civicrm';
```

You could inspect to see if the URL is generated correctly by running these commands:

```
$ cv api setting.get return=imageUploadURL
$ cv url -c imageUploadURL
$ cv url -d "[civicrm.files]/persist/contribute/"
$ cv path -c imageUploadDir
$ cv path -d "[civicrm.files]/persist/contribute/"
```

Before
------

Under either configuration (trailing-slash or trimmed-slash), you'll find that paths are generated properly (`cv path ...` or `Civi::paths()->getPath(...)`).

For generating URLs (`cv url ...` or `Civi::paths()->getUrl(...)`), only the trailing-slash cfg works.  The trimmed-slash cfg leads to a bad URL with a missing slash.

```
[bknix-max:~/bknix/build/tmpd8prj-clean/web] cv api setting.get return=imageUploadURL
{
    "is_error": 0,
    "version": 3,
    "count": 1,
    "id": 1,
    "values": {
        "1": {
            "imageUploadURL": "[civicrm.files]/persist/contribute/"
        }
    }
}

[bknix-max:~/bknix/build/tmpd8prj-clean/web] cv url -c imageUploadURL
"http://tmpd8prj-clean.bknix:8001/sites/default/files/civicrmpersist/contribute"

[bknix-max:~/bknix/build/tmpd8prj-clean/web] cv url -d "[civicrm.files]/persist/contribute/"
"http://tmpd8prj-clean.bknix:8001/sites/default/files/civicrmpersist/contribute/"
```

This is surprising because the path expression (`[civicrm.files]/persist/contribute`) includes a slash...  but it disappears in the final computation.

After
-----

Both configurations work, for paths and for URLs.

4 years agoAdd E2E_Core_PathUrlTest to ensure that various path/URL lookups work
Tim Otten [Sat, 18 Jan 2020 02:10:22 +0000 (18:10 -0800)]
Add E2E_Core_PathUrlTest to ensure that various path/URL lookups work

This will allow E2E matrix to send a signal about whether the default
configurations produce valid URLs.

4 years agoThemesTest - Use more realistic expected-values
Tim Otten [Sat, 18 Jan 2020 06:00:06 +0000 (22:00 -0800)]
ThemesTest - Use more realistic expected-values

1. The expected value of `$civicrmBaseUrl` should not be blank. The old value was a fiction of
   the unit-test environment. Be more realistic.
2. The expected values for extension-generated URLs should abide the same `$civicrmBaseUrl` as others.

4 years agoAllow most values of $civicrm_paths['XXX']['url'] to be relative
Tim Otten [Thu, 16 Jan 2020 08:42:55 +0000 (00:42 -0800)]
Allow most values of $civicrm_paths['XXX']['url'] to be relative

Overview
--------

The `$civicrm_paths` variable allows a sysadmin to override various path and
URL computations.

```php
$civicrm_paths['civicrm.packages']['url'] = 'https://example.com/libraries/civicrm/packages';
```

The variable was originally tested with absolute URLs, and the subsequent
examples/docs use absolute URLs (https://docs.civicrm.org/dev/en/latest/framework/filesystem/).

These values are used to generate addresses, as in:

```php
$abs = Civi::paths()->getUrl('[civicrm.packages]/foo.js', 'absolute');
$rel = Civi::paths()->getUrl('[civicrm.packages]/foo.js', 'relative');
```

The patch allows more values in `$civicrm_paths` while ensuring that
`getUrl()` works as expected.

Before
------

The `getUrl()` requests only behave correctly if the override is an absolute URL - not if it's relative.

After
-----

The `getUrl()` requests behave correctly if the override is either an absolute URL or a relative URL.

```php
$civicrm_paths['civicrm.packages']['url'] = 'https://example.com/libraries/civicrm/packages';
$civicrm_paths['civicrm.packages']['url'] = '/libraries/civicrm/packages';
```

Comments
--------

* `toAbsoluteUrl()` needs a base to prepend. I initially used `HTTP_HOST`
  but switched to `cms.root`, but correctly inferring scheme and host and port
  and httpd prefixes would be more complex - esp for background/CLI jobs.
  Using `cms.root` as the base is simpler.
* It's tempting to allow recursive variables. But it's not actually needed for
  my purposes, and it would add complexity/maintenance. If it's really needed,
  one could update `toAbsoluteUrl()` to quickly check for variables
  (`$url[0] === '['`) and then evaluate them. But for now... I think the
  simpler format is fine.

4 years agoMerge pull request #16388 from eileenmcnaughton/event_ref
Eileen McNaughton [Tue, 28 Jan 2020 20:10:06 +0000 (09:10 +1300)]
Merge pull request #16388 from eileenmcnaughton/event_ref

[REF] Extract & share code to determine revenue recognition date.

4 years agofatal error when using pager
demeritcowboy [Tue, 28 Jan 2020 19:14:31 +0000 (14:14 -0500)]
fatal error when using pager

4 years agoApi4 - Improve docblocks and their display in the Explorer
Coleman Watts [Tue, 28 Jan 2020 17:35:14 +0000 (12:35 -0500)]
Api4 - Improve docblocks and their display in the Explorer

4 years agoImprove code docs for Api4 Entity entity
Coleman Watts [Sat, 25 Jan 2020 15:49:28 +0000 (10:49 -0500)]
Improve code docs for Api4 Entity entity

4 years agoAPIv4 - Accept multiple fieldNames in Get helper fn
Coleman Watts [Tue, 28 Jan 2020 00:47:21 +0000 (19:47 -0500)]
APIv4 - Accept multiple fieldNames in Get helper fn

4 years agoMerge pull request #16390 from artfulrobot/tame-propbag-deprecation-logs
Matthew Wire [Tue, 28 Jan 2020 18:17:00 +0000 (18:17 +0000)]
Merge pull request #16390 from artfulrobot/tame-propbag-deprecation-logs

Prevent PropertBag from being so noisy about deprecation warnings

4 years ago[REF] Extract & share code to determine revenue recognition date.
eileen [Sun, 26 Jan 2020 22:05:22 +0000 (11:05 +1300)]
[REF] Extract & share code to determine revenue recognition date.

This also starts the process of consolidating building the 'contribution params' array

4 years agoMerge pull request #16395 from eileenmcnaughton/cont_setting
Seamus Lee [Tue, 28 Jan 2020 06:14:38 +0000 (17:14 +1100)]
Merge pull request #16395 from eileenmcnaughton/cont_setting

Finish removal of deferred_revenue_enabled from non-standard setting

4 years agoMerge pull request #16271 from mattwire/pcp_extractsupportertext
Eileen McNaughton [Tue, 28 Jan 2020 04:37:47 +0000 (17:37 +1300)]
Merge pull request #16271 from mattwire/pcp_extractsupportertext

REF Extract code to build pcp_supporter_text and enable translation

4 years agoMerge pull request #16396 from eileenmcnaughton/cont_setting2
Seamus Lee [Tue, 28 Jan 2020 04:13:22 +0000 (15:13 +1100)]
Merge pull request #16396 from eileenmcnaughton/cont_setting2

[REF] Remove unused variables

4 years agoMerge pull request #16394 from demeritcowboy/extdir-links
Eileen McNaughton [Tue, 28 Jan 2020 03:15:36 +0000 (16:15 +1300)]
Merge pull request #16394 from demeritcowboy/extdir-links

dev/core#1550 Invalid links to extension directory in popup help text

4 years ago[REF] Remove deprecated code from CRM_Admin_Form_Preferences
eileen [Tue, 28 Jan 2020 02:44:06 +0000 (15:44 +1300)]
[REF] Remove deprecated code from CRM_Admin_Form_Preferences

This form was cleaned up back in 2018 but all the stuff to handle ->_varNames was deprecated rather than
removed in case extensions were leveraging it in some way. I'm removing it now although I commented rather
than removed a few lines that I suspect can also go

4 years ago[REF] Remove unused variables
eileen [Tue, 28 Jan 2020 01:03:47 +0000 (14:03 +1300)]
[REF] Remove unused variables

4 years agoFinish removal of deferred_revenue_enabled from non-standard setting
eileen [Tue, 28 Jan 2020 00:54:24 +0000 (13:54 +1300)]
Finish removal of deferred_revenue_enabled from non-standard setting

4 years agoMerge pull request #16372 from colemanw/api4Magic
Eileen McNaughton [Mon, 27 Jan 2020 23:17:20 +0000 (12:17 +1300)]
Merge pull request #16372 from colemanw/api4Magic

Api4 - Use explicit adder functions rather than magicMethod

4 years agoinvalid links
demeritcowboy [Mon, 27 Jan 2020 22:14:53 +0000 (17:14 -0500)]
invalid links

4 years agodev/core#1319 UI - question mark on the same line as the checkbox
Samuel Vanhove [Mon, 27 Jan 2020 16:10:09 +0000 (11:10 -0500)]
dev/core#1319 UI - question mark on the same line as the checkbox

4 years agodev/core#1319 obvious mistakes after testing
Samuel Vanhove [Mon, 27 Jan 2020 16:05:31 +0000 (11:05 -0500)]
dev/core#1319 obvious mistakes after testing

4 years agodev/core#1319 generalize the creation of relationship when creating an shared address...
Samuel Vanhove [Mon, 27 Jan 2020 15:33:30 +0000 (10:33 -0500)]
dev/core#1319 generalize the creation of relationship when creating an shared address to make it work with household

4 years agoissue 1522
Jaap Jansma [Mon, 27 Jan 2020 15:19:48 +0000 (16:19 +0100)]
issue 1522

4 years agoPrevent PropertBag from being so noisy about deprecation warnings for #16390
Rich Lott / Artful Robot [Mon, 27 Jan 2020 12:06:34 +0000 (12:06 +0000)]
Prevent PropertBag from being so noisy about deprecation warnings for #16390

4 years agoMerge pull request #16389 from eileenmcnaughton/ev_static
Seamus Lee [Mon, 27 Jan 2020 06:28:32 +0000 (17:28 +1100)]
Merge pull request #16389 from eileenmcnaughton/ev_static

Fix tests to use buildFeeFn

4 years agoMerge pull request #15408 from ejegg/l10n
Seamus Lee [Mon, 27 Jan 2020 06:28:06 +0000 (17:28 +1100)]
Merge pull request #15408 from ejegg/l10n

dev/translation#30 Move l10n resource dir under private files

4 years ago(dev/translation#30) Undo new MagicMerge::$l10nDir property
Tim Otten [Mon, 27 Jan 2020 03:15:03 +0000 (19:15 -0800)]
(dev/translation#30) Undo new MagicMerge::$l10nDir property

The previous commit added a new property `l10nDir` to `MagicMerge`.

The property doesn't seem to be needed, so omit it.

4 years agoMerge pull request #16352 from mlutfy/translation34
Eileen McNaughton [Mon, 27 Jan 2020 01:19:35 +0000 (14:19 +1300)]
Merge pull request #16352 from mlutfy/translation34

dev/translation#34 Fix Contact Reference option for Postal Code

4 years agoMerge pull request #16367 from MegaphoneJon/event-32
Seamus Lee [Mon, 27 Jan 2020 00:46:46 +0000 (11:46 +1100)]
Merge pull request #16367 from MegaphoneJon/event-32

event#32: Fix bad variable in message template

4 years agodev/translation#30 Move l10n resource dir under private files
Elliott Eggleston [Sun, 6 Oct 2019 16:24:18 +0000 (18:24 +0200)]
dev/translation#30 Move l10n resource dir under private files

Looks under [civicrm.private]/l10n if that exists, falling back to
[civicrm.root]/l10n.

Since I18n::getResourceDirectory needs to be called from GenCode,
where we don't have the base directory defined, we make the l10n
path factory function consult new #define CIVICRM_L10N_BASEDIR first.

In GenCode itself, keep using the old location for now, but make
it possible to change the location with an env var as soon as we
update buildkit.

4 years agoAssert on fail
eileen [Mon, 20 Jan 2020 21:17:05 +0000 (10:17 +1300)]
Assert on fail

4 years agoFix tests to use buildFeeFn
eileen [Mon, 20 Jan 2020 21:16:39 +0000 (10:16 +1300)]
Fix tests to use buildFeeFn

4 years agoMerge pull request #16348 from eileenmcnaughton/ev_online
Eileen McNaughton [Mon, 27 Jan 2020 00:33:10 +0000 (13:33 +1300)]
Merge pull request #16348 from eileenmcnaughton/ev_online

Remove irrelevant code.

4 years agoMerge pull request #16375 from seamuslee001/dev_core_1538
Eileen McNaughton [Sun, 26 Jan 2020 21:31:51 +0000 (10:31 +1300)]
Merge pull request #16375 from seamuslee001/dev_core_1538

Update Export unit test to pass on MySQL 8

4 years agoMerge pull request #16387 from demeritcowboy/blank-google-recaptcha
Mathieu Lu [Sun, 26 Jan 2020 17:49:10 +0000 (12:49 -0500)]
Merge pull request #16387 from demeritcowboy/blank-google-recaptcha

dev/translation#33 Fix incorrect quoting in a link and an incorrect link

4 years agoMerge pull request #15912 from mydropwizard/d8-language-empty-prefix
Mathieu Lu [Sun, 26 Jan 2020 17:00:08 +0000 (12:00 -0500)]
Merge pull request #15912 from mydropwizard/d8-language-empty-prefix

dev/drupal#85 Drupal8: Fix bug with empty language prefix mangling https:// to http:/

4 years agofix invalid quoting and incorrect link
demeritcowboy [Sun, 26 Jan 2020 05:45:41 +0000 (00:45 -0500)]
fix invalid quoting and incorrect link

4 years agoMerge pull request #16386 from civicrm/5.22
Seamus Lee [Sun, 26 Jan 2020 04:58:56 +0000 (15:58 +1100)]
Merge pull request #16386 from civicrm/5.22

5.22

4 years agoMerge pull request #16377 from ejegg/serviceFileFinder-5.22
Seamus Lee [Sun, 26 Jan 2020 03:24:15 +0000 (14:24 +1100)]
Merge pull request #16377 from ejegg/serviceFileFinder-5.22

loadServices: tighten up file match regex

4 years agoMerge pull request #16385 from civicrm/5.22
Seamus Lee [Sun, 26 Jan 2020 02:54:35 +0000 (13:54 +1100)]
Merge pull request #16385 from civicrm/5.22

5.22

4 years agoMerge pull request #16384 from totten/5.22-nfc
Seamus Lee [Sun, 26 Jan 2020 02:53:40 +0000 (13:53 +1100)]
Merge pull request #16384 from totten/5.22-nfc

(NFC) Civi, CRM, tests - Update for Drupal.Commenting.VariableComment.IncorrectVarType

4 years ago[NFC] Fix var declarations in the test folder
Seamus Lee [Sun, 26 Jan 2020 00:13:38 +0000 (11:13 +1100)]
[NFC] Fix var declarations in the test folder

4 years agoUpdate Var delcartion to be standard in CRM folder
Seamus Lee [Sat, 25 Jan 2020 20:39:27 +0000 (07:39 +1100)]
Update Var delcartion to be standard in CRM folder

4 years ago(NFC) Civi/API - Update for Drupal.Commenting.VariableComment.IncorrectVarType
Tim Otten [Sat, 25 Jan 2020 00:17:30 +0000 (16:17 -0800)]
(NFC) Civi/API - Update for Drupal.Commenting.VariableComment.IncorrectVarType

4 years ago(NFC) Civi/CCase - Update for Drupal.Commenting.VariableComment.IncorrectVarType
Tim Otten [Sat, 25 Jan 2020 00:17:21 +0000 (16:17 -0800)]
(NFC) Civi/CCase - Update for Drupal.Commenting.VariableComment.IncorrectVarType

4 years ago(NFC) Civi/Core - Update for Drupal.Commenting.VariableComment.IncorrectVarType
Tim Otten [Sat, 25 Jan 2020 00:17:14 +0000 (16:17 -0800)]
(NFC) Civi/Core - Update for Drupal.Commenting.VariableComment.IncorrectVarType

4 years ago(NFC) Civi/Payment - Update for Drupal.Commenting.VariableComment.IncorrectVarType
Tim Otten [Sat, 25 Jan 2020 00:17:04 +0000 (16:17 -0800)]
(NFC) Civi/Payment - Update for Drupal.Commenting.VariableComment.IncorrectVarType

4 years ago(NFC) Civi/Test - Update for Drupal.Commenting.VariableComment.IncorrectVarType
Tim Otten [Sat, 25 Jan 2020 00:16:56 +0000 (16:16 -0800)]
(NFC) Civi/Test - Update for Drupal.Commenting.VariableComment.IncorrectVarType

4 years agoMerge pull request #16382 from seamuslee001/crm_var_update
Tim Otten [Sun, 26 Jan 2020 00:12:08 +0000 (16:12 -0800)]
Merge pull request #16382 from seamuslee001/crm_var_update

(NFC) Update Var declaration to be standard in CRM folder

4 years agoUpdate Var delcartion to be standard in CRM folder
Seamus Lee [Sat, 25 Jan 2020 20:39:27 +0000 (07:39 +1100)]
Update Var delcartion to be standard in CRM folder

4 years agoMerge pull request #16355 from eileenmcnaughton/ev_part
colemanw [Sat, 25 Jan 2020 16:12:39 +0000 (11:12 -0500)]
Merge pull request #16355 from eileenmcnaughton/ev_part

Add helper for getting participantValues

4 years agoMerge pull request #16379 from totten/master-coder-ivt
colemanw [Sat, 25 Jan 2020 16:10:35 +0000 (11:10 -0500)]
Merge pull request #16379 from totten/master-coder-ivt

(NFC) Civi/*.php - Update for Drupal.Commenting.VariableComment.IncorrectVarType

4 years ago(NFC) Civi/API - Update for Drupal.Commenting.VariableComment.IncorrectVarType
Tim Otten [Sat, 25 Jan 2020 00:17:30 +0000 (16:17 -0800)]
(NFC) Civi/API - Update for Drupal.Commenting.VariableComment.IncorrectVarType

4 years ago(NFC) Civi/CCase - Update for Drupal.Commenting.VariableComment.IncorrectVarType
Tim Otten [Sat, 25 Jan 2020 00:17:21 +0000 (16:17 -0800)]
(NFC) Civi/CCase - Update for Drupal.Commenting.VariableComment.IncorrectVarType

4 years ago(NFC) Civi/Core - Update for Drupal.Commenting.VariableComment.IncorrectVarType
Tim Otten [Sat, 25 Jan 2020 00:17:14 +0000 (16:17 -0800)]
(NFC) Civi/Core - Update for Drupal.Commenting.VariableComment.IncorrectVarType

4 years ago(NFC) Civi/Payment - Update for Drupal.Commenting.VariableComment.IncorrectVarType
Tim Otten [Sat, 25 Jan 2020 00:17:04 +0000 (16:17 -0800)]
(NFC) Civi/Payment - Update for Drupal.Commenting.VariableComment.IncorrectVarType

4 years ago(NFC) Civi/Test - Update for Drupal.Commenting.VariableComment.IncorrectVarType
Tim Otten [Sat, 25 Jan 2020 00:16:56 +0000 (16:16 -0800)]
(NFC) Civi/Test - Update for Drupal.Commenting.VariableComment.IncorrectVarType

4 years agoMerge pull request #16373 from colemanw/api4Stuff
Seamus Lee [Fri, 24 Jan 2020 22:46:01 +0000 (09:46 +1100)]
Merge pull request #16373 from colemanw/api4Stuff

Api4 - improve docblocks & display links in explorer

4 years agoloadServices: tighten up file match regex
Elliott Eggleston [Fri, 24 Jan 2020 21:28:57 +0000 (16:28 -0500)]
loadServices: tighten up file match regex

Before: Civi code living under a path containing the characters php
(such as ~/src/php/civicrm) will crash trying to load services with
a message like the following:
   ReflectionException: Class Civi\Api4\Service\Spec\Provider\src
   does not exist in ReflectionClass->__construct()

After: Civi loads services normally no matter what the enclosing path

4 years agoUpdate Export unit test to pass on MySQL 8
Seamus Lee [Fri, 24 Jan 2020 21:32:43 +0000 (08:32 +1100)]
Update Export unit test to pass on MySQL 8

4 years agoMerge remote-tracking branch 'origin/5.22' into 5.22-master-2020-01-24-13-18-00
Tim Otten [Fri, 24 Jan 2020 21:18:07 +0000 (13:18 -0800)]
Merge remote-tracking branch 'origin/5.22' into 5.22-master-2020-01-24-13-18-00

4 years agoMerge pull request #16370 from mattwire/membershipstatuscalc_params
colemanw [Fri, 24 Jan 2020 21:08:32 +0000 (16:08 -0500)]
Merge pull request #16370 from mattwire/membershipstatuscalc_params

NFC Add parameter definition to membershipstatus.calc

4 years agoMerge pull request #16335 from colemanw/exportui
Mathieu Lu [Fri, 24 Jan 2020 18:56:47 +0000 (13:56 -0500)]
Merge pull request #16335 from colemanw/exportui

Move exportui extension into core

4 years agoMerge pull request #16371 from yashodha/typo
Mathieu Lu [Fri, 24 Jan 2020 18:38:38 +0000 (13:38 -0500)]
Merge pull request #16371 from yashodha/typo

Remove unused code

4 years agodev/translation#34 Fix Contact Reference option for Postal Code
Mathieu Lutfy [Wed, 22 Jan 2020 20:31:05 +0000 (15:31 -0500)]
dev/translation#34 Fix Contact Reference option for Postal Code

4 years agoAdd @see annoations to api4 docblocks and show as links in api explorer
Coleman Watts [Fri, 24 Jan 2020 18:09:41 +0000 (13:09 -0500)]
Add @see annoations to api4 docblocks and show as links in api explorer

4 years agoevent#32: Fix bad URL in message template
Jon Goldberg [Fri, 24 Jan 2020 01:34:17 +0000 (20:34 -0500)]
event#32: Fix bad URL in message template

4 years agoApi4 - Use explicit adder functions rather than magicMethod
Coleman Watts [Fri, 24 Jan 2020 14:16:08 +0000 (09:16 -0500)]
Api4 - Use explicit adder functions rather than magicMethod

Api Actions had been relying on a magic method to provide getter/setter functions for params.
That works fine for simple get/set operations but it was also attempting to provide adder functions.
Those are more nuanced and the magic method didn't do a good job of understanding whether the param
was an indexed or unindexed array, and didn't do strict type checking.
Making our own adder functions gives better documentation, stricter checking of inputs and also
the convenience of variadic functions for adding several values at once.

4 years agoBetter looking checkboxes in api explorer
Coleman Watts [Wed, 22 Jan 2020 16:11:37 +0000 (11:11 -0500)]
Better looking checkboxes in api explorer

4 years agoMerge pull request #16363 from eileenmcnaughton/deextract
colemanw [Fri, 24 Jan 2020 13:40:53 +0000 (08:40 -0500)]
Merge pull request #16363 from eileenmcnaughton/deextract

Duplicate code (for real)

4 years agoremove unused code
yashodha [Fri, 24 Jan 2020 13:20:33 +0000 (18:50 +0530)]
remove unused code

4 years agoAdd parameter definition to membershipstatus.calc
Matthew Wire [Wed, 15 Jan 2020 14:42:38 +0000 (14:42 +0000)]
Add parameter definition to membershipstatus.calc

4 years agoMerge pull request #16369 from eileenmcnaughton/export_house
Monish Deb [Fri, 24 Jan 2020 09:26:55 +0000 (14:56 +0530)]
Merge pull request #16369 from eileenmcnaughton/export_house

dev/core#1364 Merge all addresses on export should INCLUDE merging households

4 years agoMerge pull request #16129 from mattwire/gettotalamount_0
Seamus Lee [Fri, 24 Jan 2020 07:54:03 +0000 (18:54 +1100)]
Merge pull request #16129 from mattwire/gettotalamount_0

Make getTotalPayments return 0 instead of NULL

4 years agoMerge pull request #16364 from eileenmcnaughton/export
Seamus Lee [Fri, 24 Jan 2020 07:51:12 +0000 (18:51 +1100)]
Merge pull request #16364 from eileenmcnaughton/export

[REF] Extract function to export header row

4 years agoMerge pull request #16368 from yashodha/typo
Eileen McNaughton [Fri, 24 Jan 2020 07:14:34 +0000 (20:14 +1300)]
Merge pull request #16368 from yashodha/typo

fix more typo's in the text

4 years agodev/core#1364 Merge all addresses on export should INCLUDE merging households
eileen [Fri, 24 Jan 2020 05:25:14 +0000 (18:25 +1300)]
dev/core#1364 Merge all addresses on export should INCLUDE merging households

This is an alternate to https://github.com/civicrm/civicrm-core/pull/15725 that still achieves the goal in
https://github.com/civicrm/civicrm-core/pull/15725#issuecomment-572408173 of making is so that the
mergeSharedAddress option mergesHouseholds first & then merges sharedAddresses.

In #15725 @monishdeb was fixing the code that differentiated between how master_id was treated
versus otherwise merged addresses. However that code 'broke' a long time ago and the arguably
broken behaviour is locked in by unit tests. Fixing it has not been requested - in this
issue or any other in the past year or 2 when it has been broken so I opted to remove the broken
code entirely & to open up the next query such that it does not exclude household addresses.
This didn't break any tests (woot) and also allowed me to enable the test rows @monishdeb wrote
to test this issue

4 years agofix more typo's in the text
yashodha [Fri, 24 Jan 2020 04:28:41 +0000 (09:58 +0530)]
fix more typo's in the text

4 years agoMerge pull request #16358 from MegaphoneJon/event-30
Yashodha Chaku [Fri, 24 Jan 2020 04:27:15 +0000 (09:57 +0530)]
Merge pull request #16358 from MegaphoneJon/event-30

event#30 - don't allow multiple waitlist registrations

4 years agoevent#30 - don't allow multiple waitlist registrations
Jon Goldberg [Wed, 22 Jan 2020 23:13:21 +0000 (18:13 -0500)]
event#30 - don't allow multiple waitlist registrations

4 years agoExtract function to export header row
eileen [Mon, 25 Nov 2019 04:46:21 +0000 (17:46 +1300)]
Extract function to export header row

4 years agoMerge pull request #16356 from totten/5.22-gencode-ts
Tim Otten [Thu, 23 Jan 2020 23:05:11 +0000 (15:05 -0800)]
Merge pull request #16356 from totten/5.22-gencode-ts

(dev/core#1546) Fix translation of seed data

4 years agoDuplicate code (for real)
eileen [Thu, 23 Jan 2020 21:33:54 +0000 (10:33 +1300)]
Duplicate code (for real)

This is going to seem unintuitive but I'm sure the path to cleaning up the participant form starts with
increasing code duplication.

Currently the code is sharing 2 functions with the front end form. The functions don't do a lot of actual processing
but they do do a lot of preparing parameters. The calling functions do a lot of pre-work to call them - so
we are not getting much benefit from the sharing. On the other hand having this code tied up with another form makes
it hard for us to do the 'right' sharing - ie. currently the code to create a contribution paid by credit card & participant record is totally different to another payment method & we should work to share these bits of functionality

4 years agoReturn 0 if total amount is 0 instead of NULL.
Matthew Wire (MJW Consulting) [Fri, 20 Dec 2019 19:20:28 +0000 (19:20 +0000)]
Return 0 if total amount is 0 instead of NULL.

4 years agoMerge pull request #16353 from pradpnayak/functionFix
Eileen McNaughton [Thu, 23 Jan 2020 21:15:22 +0000 (10:15 +1300)]
Merge pull request #16353 from pradpnayak/functionFix

Wrong parameter passed to executeQuery function

4 years agoMerge pull request #16311 from MegaphoneJon/event-template-reminders
Eileen McNaughton [Thu, 23 Jan 2020 21:11:39 +0000 (10:11 +1300)]
Merge pull request #16311 from MegaphoneJon/event-template-reminders

event#28: Don't send scheduled reminders for event templates

4 years agoDon't send scheduled reminders for event templates
Jon Goldberg [Fri, 17 Jan 2020 00:50:24 +0000 (19:50 -0500)]
Don't send scheduled reminders for event templates

4 years agoMerge pull request #16361 from yashodha/typo
Eileen McNaughton [Thu, 23 Jan 2020 19:42:28 +0000 (08:42 +1300)]
Merge pull request #16361 from yashodha/typo

fix typo's in the text

4 years agoMerge pull request #16189 from eileenmcnaughton/acl
Eileen McNaughton [Thu, 23 Jan 2020 19:32:48 +0000 (08:32 +1300)]
Merge pull request #16189 from eileenmcnaughton/acl

Update BAO_Acl internal functions to protected & unused to deprecated