civicrm-core.git
6 years agoMerge pull request #11653 from eileenmcnaughton/evil
Eileen McNaughton [Thu, 8 Feb 2018 02:49:36 +0000 (15:49 +1300)]
Merge pull request #11653 from eileenmcnaughton/evil

CRM-21749 fix obscure regression :Mailing api no longer respecting '_skip_evil_bao_auto_schedule_'

6 years agoCRM-21749 fix obscure regression :Mailing api no longer respecting '_skip_evil_bao_au...
eileen [Thu, 8 Feb 2018 01:07:07 +0000 (14:07 +1300)]
CRM-21749 fix obscure regression :Mailing api no longer respecting '_skip_evil_bao_auto_schedule_'

6 years agoMerge pull request #11645 from eileenmcnaughton/prox_smart_group
Eileen McNaughton [Thu, 8 Feb 2018 00:33:30 +0000 (13:33 +1300)]
Merge pull request #11645 from eileenmcnaughton/prox_smart_group

CRM-21744 fix proximity search to work with smart groups

6 years agoCRM-21744 fix proximity search to work with smart groups
eileen [Wed, 7 Feb 2018 07:22:00 +0000 (20:22 +1300)]
CRM-21744 fix proximity search to work with smart groups

6 years agoMerge pull request #11631 from mattwire/CRM-20625_payproc_extension_dont_kill_civi
Eileen McNaughton [Wed, 7 Feb 2018 22:42:46 +0000 (11:42 +1300)]
Merge pull request #11631 from mattwire/CRM-20625_payproc_extension_dont_kill_civi

CRM-20625 Don't crash if we can't find the payment processor class.

6 years agoMerge pull request #11621 from eileenmcnaughton/trait
colemanw [Wed, 7 Feb 2018 22:22:46 +0000 (17:22 -0500)]
Merge pull request #11621 from eileenmcnaughton/trait

CRM-19752 Improve performance for non-ACL users on summaryQuery

6 years agoDon't crash if we can't find the payment processor class. Add warning when editing...
Matthew Wire [Mon, 5 Feb 2018 15:38:29 +0000 (15:38 +0000)]
Don't crash if we can't find the payment processor class. Add warning when editing a payment processor that doesn't exist.

6 years agoMerge pull request #11651 from civicrm/4.7.30-rc
Eileen McNaughton [Wed, 7 Feb 2018 20:03:06 +0000 (09:03 +1300)]
Merge pull request #11651 from civicrm/4.7.30-rc

4.7.30 rc merge to master

6 years agoMerge pull request #11648 from eileenmcnaughton/xml
Eileen McNaughton [Wed, 7 Feb 2018 20:01:57 +0000 (09:01 +1300)]
Merge pull request #11648 from eileenmcnaughton/xml

CRM-21707 follow up fix on xml

6 years agoMerge pull request #11640 from tttp/fix-contrib-search
Eileen McNaughton [Wed, 7 Feb 2018 19:56:22 +0000 (08:56 +1300)]
Merge pull request #11640 from tttp/fix-contrib-search

fix dev/core#1: allow to search contributions that are in progress

6 years agoMerge pull request #11531 from agh1/4.7.30-releasenotes
Tim Otten [Wed, 7 Feb 2018 19:05:59 +0000 (20:05 +0100)]
Merge pull request #11531 from agh1/4.7.30-releasenotes

4.7.30 release notes

6 years agoMerge pull request #11115 from pbatroff/co_deception_test
Tim Otten [Wed, 7 Feb 2018 18:51:09 +0000 (19:51 +0100)]
Merge pull request #11115 from pbatroff/co_deception_test

Added trait to support Codeception tests

6 years ago4.7.30 release notes: incorporated late RC changes
Andrew Hunt [Wed, 7 Feb 2018 17:19:23 +0000 (12:19 -0500)]
4.7.30 release notes: incorporated late RC changes

6 years ago4.7.30 release notes: finished text
Andrew Hunt [Wed, 7 Feb 2018 04:26:34 +0000 (23:26 -0500)]
4.7.30 release notes: finished text

6 years ago4.7.30 release notes: finished contributors
Andrew Hunt [Wed, 7 Feb 2018 01:13:07 +0000 (20:13 -0500)]
4.7.30 release notes: finished contributors

6 years ago4.7.30 release notes: done with features
Andrew Hunt [Tue, 6 Feb 2018 22:11:40 +0000 (17:11 -0500)]
4.7.30 release notes: done with features

6 years ago4.7.30 release notes: boilerplate and initial work
Andrew Hunt [Tue, 16 Jan 2018 16:13:21 +0000 (11:13 -0500)]
4.7.30 release notes: boilerplate and initial work

6 years ago4.7.30 release notes - raw from script
Andrew Hunt [Tue, 16 Jan 2018 16:10:06 +0000 (11:10 -0500)]
4.7.30 release notes - raw from script

6 years agoMerge pull request #11639 from aydun/CRM-21741-crmEditable-params
colemanw [Wed, 7 Feb 2018 16:15:59 +0000 (11:15 -0500)]
Merge pull request #11639 from aydun/CRM-21741-crmEditable-params

Allow data-params to be specified as an item property and passed to CRM.api3 call

6 years agoFixed typo, return value in amOnRoute
Philipp Batroff [Wed, 7 Feb 2018 16:04:44 +0000 (17:04 +0100)]
Fixed typo, return value in amOnRoute

6 years agoMerge pull request #11643 from eileenmcnaughton/prox_search
colemanw [Wed, 7 Feb 2018 14:59:40 +0000 (09:59 -0500)]
Merge pull request #11643 from eileenmcnaughton/prox_search

CRM-21742 Proximity search validation improvement

6 years agoAdded Trait for Codeception Integration
Philipp Batroff [Wed, 11 Oct 2017 22:41:03 +0000 (00:41 +0200)]
Added Trait for Codeception Integration

6 years agoMerge pull request #11542 from eileenmcnaughton/prox
Monish Deb [Wed, 7 Feb 2018 13:19:14 +0000 (18:49 +0530)]
Merge pull request #11542 from eileenmcnaughton/prox

CRM-21674 allow lat & long to be pre-calculated for proximity query / search

6 years agoCRM-21707 follow up fix on xml
eileen [Wed, 7 Feb 2018 11:12:42 +0000 (00:12 +1300)]
CRM-21707 follow up fix on xml

I altered the DAO to test the change in callback & then committed that without fixing the xml. This brings the xml into line

6 years agoUpdated as per Coleman's comment
Aidan Saunders [Wed, 7 Feb 2018 08:51:00 +0000 (08:51 +0000)]
Updated as per Coleman's comment

6 years agoCRM-21674 allow lat & long to be pre-calculated for proximity query or search
eileen [Thu, 18 Jan 2018 03:28:39 +0000 (16:28 +1300)]
CRM-21674 allow lat & long to be pre-calculated for proximity query or search

6 years agoCRM-21742 use validation rather than error when geocoding not possible
eileen [Wed, 7 Feb 2018 00:45:16 +0000 (13:45 +1300)]
CRM-21742 use validation rather than error when geocoding not possible

6 years agoMerge pull request #11540 from eileenmcnaughton/yahoo
Monish Deb [Wed, 7 Feb 2018 01:55:37 +0000 (07:25 +0530)]
Merge pull request #11540 from eileenmcnaughton/yahoo

CRM-19784 remove yahoo geocoder & clean up geocoding code

6 years agoMerge pull request #11606 from eileenmcnaughton/pcp
Monish Deb [Wed, 7 Feb 2018 01:44:59 +0000 (07:14 +0530)]
Merge pull request #11606 from eileenmcnaughton/pcp

CRM-21728 Prevent intermittant fail on pcp api calls.

6 years agoMerge pull request #11633 from eileenmcnaughton/option_value
Monish Deb [Wed, 7 Feb 2018 01:42:21 +0000 (07:12 +0530)]
Merge pull request #11633 from eileenmcnaughton/option_value

CRM-21737 loosen option value validation to support language option group

6 years agoMerge pull request #11593 from mfb/db-error-data-too-long-for-column-subject
Eileen McNaughton [Tue, 6 Feb 2018 23:18:17 +0000 (12:18 +1300)]
Merge pull request #11593 from mfb/db-error-data-too-long-for-column-subject

Amount and source could exceed max length of subject column

6 years agofix dev/core#1
xavier.dutoit [Tue, 6 Feb 2018 17:45:38 +0000 (18:45 +0100)]
fix dev/core#1

6 years agoAllow data-params to be specified as an item property and passed to
Aidan Saunders [Tue, 6 Feb 2018 15:00:32 +0000 (15:00 +0000)]
Allow data-params to be specified as an item property and passed to
CRM.api3 call

6 years agoMerge pull request #11607 from eileenmcnaughton/serialize
colemanw [Tue, 6 Feb 2018 15:33:57 +0000 (10:33 -0500)]
Merge pull request #11607 from eileenmcnaughton/serialize

CRM-21707 increase api testing / use of serialization metadata. Add depre…

6 years agoMerge pull request #11476 from eileenmcnaughton/report
Monish Deb [Tue, 6 Feb 2018 13:52:02 +0000 (19:22 +0530)]
Merge pull request #11476 from eileenmcnaughton/report

CRM-21616 ensure sql metadata is available from api

6 years agoMerge pull request #11623 from mattwire/CRM-21721_unit_test
Eileen McNaughton [Tue, 6 Feb 2018 10:04:05 +0000 (23:04 +1300)]
Merge pull request #11623 from mattwire/CRM-21721_unit_test

CRM-21721 Add unit test for createProportionalEntry with zero amount

6 years agoMerge pull request #11558 from JMAConsulting/CRM-21260
Eileen McNaughton [Tue, 6 Feb 2018 10:01:10 +0000 (23:01 +1300)]
Merge pull request #11558 from JMAConsulting/CRM-21260

CRM-21316: Add missing code to handle smart group on sms mode

6 years agoMerge pull request #11575 from eileenmcnaughton/currency_contribution_update
Monish Deb [Tue, 6 Feb 2018 09:38:51 +0000 (15:08 +0530)]
Merge pull request #11575 from eileenmcnaughton/currency_contribution_update

CRM-17647 fix ContributionForm to use skipCleanMoney on update & upda…

6 years agoadditional fixes and optimisation
deb.monish [Fri, 2 Feb 2018 15:55:31 +0000 (21:25 +0530)]
additional fixes and optimisation

6 years agoMerge pull request #11635 from civicrm/4.7.30-rc
Eileen McNaughton [Tue, 6 Feb 2018 04:38:27 +0000 (17:38 +1300)]
Merge pull request #11635 from civicrm/4.7.30-rc

4.7.30 rc merge to master

6 years agoMerge pull request #11634 from agh1/CRM-21735
Eileen McNaughton [Tue, 6 Feb 2018 04:11:26 +0000 (17:11 +1300)]
Merge pull request #11634 from agh1/CRM-21735

CRM-21735: Revert CRM-21575 changes pending fix

6 years agoRevert "CRM-21575 - Websites of same type are over-written"
Andrew Hunt [Tue, 6 Feb 2018 02:00:08 +0000 (21:00 -0500)]
Revert "CRM-21575 - Websites of same type are over-written"

This reverts commit dddcec4545602395fc865273175eb7227947cf74.

6 years agoCRM-19752 Improve performance for non-ACL users on summaryQuery
eileen [Fri, 2 Feb 2018 00:25:58 +0000 (13:25 +1300)]
CRM-19752 Improve performance for non-ACL users on summaryQuery

6 years agoCRM-20685: Fix a bug on repeatTransaction in specific circumstance and his unitTest...
Elennio [Tue, 6 Feb 2018 00:55:43 +0000 (18:55 -0600)]
CRM-20685: Fix a bug on repeatTransaction in specific circumstance and his unitTest on ContributionRecurTest, cal… (#11493)

* CRM-20685: Fix a bug on repeatTransaction in specific circumstance

6 years agoCRM-21737 loosen option value validation to support language option group
eileen [Mon, 5 Feb 2018 20:22:29 +0000 (09:22 +1300)]
CRM-21737 loosen option value validation to support language option group

6 years agoCRM-21320 Test for mass SMS recipients
JKingsnorth [Wed, 18 Oct 2017 14:36:16 +0000 (15:36 +0100)]
CRM-21320 Test for mass SMS recipients

6 years agofix select SMS recipients query
Michael McAndrew [Fri, 26 Jan 2018 12:16:43 +0000 (12:16 +0000)]
fix select SMS recipients query

6 years agoCRM-21316: Add missing code to handle smart group on sms mode
deb.monish [Fri, 19 Jan 2018 17:46:20 +0000 (23:16 +0530)]
CRM-21316: Add missing code to handle smart group on sms mode

6 years agoCRM-19784: Fixed test by creating a method for disabling the geocoder.
Frank J. Gómez [Fri, 2 Feb 2018 21:45:41 +0000 (16:45 -0500)]
CRM-19784: Fixed test by creating a method for disabling the geocoder.

6 years agoMerge pull request #11625 from colemanw/Website
Eileen McNaughton [Sun, 4 Feb 2018 22:45:49 +0000 (11:45 +1300)]
Merge pull request #11625 from colemanw/Website

Website api - fix nonstandard BAO delete method

6 years agoMerge pull request #11626 from seamuslee001/multilingual_log_test_fix
Eileen McNaughton [Sun, 4 Feb 2018 21:20:54 +0000 (10:20 +1300)]
Merge pull request #11626 from seamuslee001/multilingual_log_test_fix

(NFC) Fix logging test for multilingual on MySQL5.7

6 years agoMerge pull request #11581 from tunbola/CRM-21704
colemanw [Sun, 4 Feb 2018 16:27:53 +0000 (11:27 -0500)]
Merge pull request #11581 from tunbola/CRM-21704

CRM-21704: Do not allow Reserved Case Types to be Disabled/Deleted

6 years agoMerge pull request #11564 from eileenmcnaughton/member
colemanw [Sun, 4 Feb 2018 16:21:24 +0000 (11:21 -0500)]
Merge pull request #11564 from eileenmcnaughton/member

CRM-19920 - membership processing enhancements

6 years ago(NFC) Fix logging test for multilingual on MySQL5.7
Seamus Lee [Sun, 4 Feb 2018 03:42:26 +0000 (14:42 +1100)]
(NFC) Fix logging test for multilingual on MySQL5.7

6 years agoRemove use of deprecated variable
Coleman Watts [Sat, 3 Feb 2018 23:43:53 +0000 (18:43 -0500)]
Remove use of deprecated variable

6 years agoWebsite api - fix nonstandard BAO delete method
Coleman Watts [Sat, 3 Feb 2018 23:39:19 +0000 (18:39 -0500)]
Website api - fix nonstandard BAO delete method

6 years agoMerge pull request #11618 from jitendrapurohit/CRM-21730
colemanw [Sat, 3 Feb 2018 20:52:20 +0000 (15:52 -0500)]
Merge pull request #11618 from jitendrapurohit/CRM-21730

CRM-21730: postProcess() hook don't receive case id after submitting …

6 years agoCRM-19784: Deprecated $config->geocoderMethod.
Frank J. Gómez [Fri, 2 Feb 2018 20:43:19 +0000 (15:43 -0500)]
CRM-19784: Deprecated $config->geocoderMethod.

6 years agoCRM-19784: Removed Yahoo geocoder.
Frank J. Gómez [Fri, 2 Feb 2018 13:46:19 +0000 (08:46 -0500)]
CRM-19784: Removed Yahoo geocoder.

6 years agoCRM-19784: Deprecated CRM_Utils_Geocode::getProviderClass().
Frank J. Gómez [Fri, 2 Feb 2018 13:42:24 +0000 (08:42 -0500)]
CRM-19784: Deprecated CRM_Utils_Geocode::getProviderClass().

6 years agoCRM-19784: Updated direct usages of the geocoding provider to use the
Frank J. Gómez [Fri, 2 Feb 2018 14:02:21 +0000 (09:02 -0500)]
CRM-19784: Updated direct usages of the geocoding provider to use the
new methods instead.

6 years agoCRM-19784: Encapsulated interactions with geocoding providers. Adopts an
Frank J. Gómez [Fri, 2 Feb 2018 13:53:10 +0000 (08:53 -0500)]
CRM-19784: Encapsulated interactions with geocoding providers. Adopts an
approach like the factory pattern PHP developers will find familiar, with
plenty of deprecation notices re the changing approach. A specific goal
was to avoid fatal errors in which a geocoder that no longer exists is called.
This applies specifically to the Yahoo class but also generally, e.g., if an
extension that provides a geocoder goes missing due to deletion, changed paths,
etc.

6 years agoMerge pull request #11601 from pradpnayak/CRM-21721
Eileen McNaughton [Fri, 2 Feb 2018 21:41:22 +0000 (10:41 +1300)]
Merge pull request #11601 from pradpnayak/CRM-21721

CRM-21721, fixed notice error for Division by zero

6 years agoAdd unit test for createProportionalEntry with zero amount
Matthew Wire [Fri, 2 Feb 2018 16:57:56 +0000 (16:57 +0000)]
Add unit test for createProportionalEntry with zero amount

6 years agoMerge pull request #9746 from vedantrathore/master
Eileen McNaughton [Thu, 1 Feb 2018 21:41:53 +0000 (10:41 +1300)]
Merge pull request #9746 from vedantrathore/master

CRM-19752 - Unit Test for issue CRM-19752

6 years agoCRM-21707 increase testing / use of serialization metadata. Add deprecated when bypassed
eileen [Mon, 29 Jan 2018 22:11:53 +0000 (11:11 +1300)]
CRM-21707 increase testing / use of serialization metadata. Add deprecated when bypassed

6 years agoCRM-21730: postProcess() hook don't receive case id after submitting New Case Form
Jitendra Purohit [Thu, 1 Feb 2018 09:22:15 +0000 (14:52 +0530)]
CRM-21730: postProcess() hook don't receive case id after submitting New Case Form

6 years agoMerge pull request #11617 from eileenmcnaughton/test_fix
Monish Deb [Thu, 1 Feb 2018 05:18:10 +0000 (10:48 +0530)]
Merge pull request #11617 from eileenmcnaughton/test_fix

[nfc] Fix intermittantly failing test.

6 years agoFix intermittantly failing test.
eileen [Thu, 1 Feb 2018 03:26:06 +0000 (16:26 +1300)]
Fix intermittantly failing test.

The date calcs for this test are way too complex, split in 2

6 years agoMerge pull request #11613 from eileenmcnaughton/dist
Tim Otten [Wed, 31 Jan 2018 02:34:59 +0000 (18:34 -0800)]
Merge pull request #11613 from eileenmcnaughton/dist

 CRM-21729 exclude vendor .idea, test-cases, unit-test from deployment

6 years agoMerge pull request #11612 from seamuslee001/crm-21719-civi
Eileen McNaughton [Wed, 31 Jan 2018 00:27:41 +0000 (13:27 +1300)]
Merge pull request #11612 from seamuslee001/crm-21719-civi

CRM-21719 Add a check in Civi/Install/Requirements to ensure that PHP…

6 years ago CRM-21729 exclude vendor .idea, test-cases, unit-test from deployment
eileen [Wed, 31 Jan 2018 00:21:25 +0000 (13:21 +1300)]
 CRM-21729 exclude vendor .idea, test-cases, unit-test from deployment

6 years agoCRM-21719 Add a check in Civi/Install/Requirements to ensure that PHP Multibyte funct...
Seamus Lee [Tue, 30 Jan 2018 22:08:43 +0000 (09:08 +1100)]
CRM-21719 Add a check in Civi/Install/Requirements to ensure that PHP Multibyte functions are enabled on install

6 years agoMerge pull request #11611 from cividesk/CRM-21665-NEW
Eileen McNaughton [Tue, 30 Jan 2018 22:02:22 +0000 (11:02 +1300)]
Merge pull request #11611 from cividesk/CRM-21665-NEW

CRM-21665 Fix check number toggle on Edit form when context is search

6 years agoMerge pull request #11604 from mattwire/CRM-21722_payproc_checkconfig
Eileen McNaughton [Tue, 30 Jan 2018 20:50:17 +0000 (09:50 +1300)]
Merge pull request #11604 from mattwire/CRM-21722_payproc_checkconfig

CRM-21722 Check configuration of payment processors when saving config

6 years agoCRM-21665 Fix check number toggle on Edit form when context is search
Sunil Pawar [Tue, 30 Jan 2018 09:07:28 +0000 (14:37 +0530)]
CRM-21665 Fix check number toggle on Edit form when context is search

6 years agoCheck configuration of payment processors when saving config
Matthew Wire [Mon, 29 Jan 2018 13:40:53 +0000 (20:40 +0700)]
Check configuration of payment processors when saving config

6 years agoMerge pull request #11304 from JMAConsulting/CRM-21461
colemanw [Tue, 30 Jan 2018 02:30:18 +0000 (21:30 -0500)]
Merge pull request #11304 from JMAConsulting/CRM-21461

CRM-21461: Case Dashlet enhancement

6 years agoMerge pull request #11599 from seamuslee001/CRM-21719
colemanw [Tue, 30 Jan 2018 01:43:19 +0000 (20:43 -0500)]
Merge pull request #11599 from seamuslee001/CRM-21719

CRM-21719 Require Multibyte PHP extension

6 years agoPrevent intermittant fail on pcp api calls.
eileen [Mon, 29 Jan 2018 21:53:13 +0000 (10:53 +1300)]
Prevent intermittant fail on pcp api calls.

When I run the SyntaxConformance tests locally I get a fatal error because it tries
to include api_v3_pcp.php after having included api_v3_PCP.php & thinks they are 2 files.
This is a Mac so obviously the handling is different to the jenkins method. Not overwriting the
 param if passed in works locally

6 years agoMerge pull request #11605 from alifrumin/crm21724
Eileen McNaughton [Mon, 29 Jan 2018 20:47:55 +0000 (09:47 +1300)]
Merge pull request #11605 from alifrumin/crm21724

CRM-21724 sending membership id when looking up custom field values

6 years agoMerge pull request #11583 from eileenmcnaughton/api_metadata
colemanw [Mon, 29 Jan 2018 19:26:11 +0000 (14:26 -0500)]
Merge pull request #11583 from eileenmcnaughton/api_metadata

CRM-21707 use serialisation metadata from api basic_create_fallback.

6 years agoMerge pull request #11567 from eileenmcnaughton/api_custom
colemanw [Mon, 29 Jan 2018 19:14:40 +0000 (14:14 -0500)]
Merge pull request #11567 from eileenmcnaughton/api_custom

Towards CRM-21140, support at api level for custom data on any entity.

6 years agoCRM-21724 sending membership id when looking up custom field values
Alice Frumin [Mon, 29 Jan 2018 17:17:27 +0000 (12:17 -0500)]
CRM-21724 sending membership id when looking up custom field values

6 years agoCRM-21721, fixed notice error for Division by zero
Pradeep Nayak [Mon, 29 Jan 2018 05:13:03 +0000 (10:43 +0530)]
CRM-21721, fixed notice error for Division by zero

----------------------------------------
* CRM-21721: Notice : Division by zero
  https://issues.civicrm.org/jira/browse/CRM-21721

6 years agoMerge pull request #11594 from mfb/ellipsify-mb_strlen
Eileen McNaughton [Sun, 28 Jan 2018 21:55:58 +0000 (10:55 +1300)]
Merge pull request #11594 from mfb/ellipsify-mb_strlen

Use mb_strlen() in ellipsify() to avoid excessive multibyte truncation

6 years agoMerge pull request #11595 from seamuslee001/multiple_relationship_type
colemanw [Sun, 28 Jan 2018 21:52:22 +0000 (16:52 -0500)]
Merge pull request #11595 from seamuslee001/multiple_relationship_type

CRM-21717 Allow for selecting multiple relationship types in Advanced Search

6 years agoMerge pull request #11598 from seamuslee001/CRM-20769-js
Eileen McNaughton [Sun, 28 Jan 2018 21:31:21 +0000 (10:31 +1300)]
Merge pull request #11598 from seamuslee001/CRM-20769-js

CRM-20769 Add in cancel_button_text and submit_button_text fields to the civicr…

6 years agoMerge pull request #11584 from mlutfy/report-act-nfc
Eileen McNaughton [Sun, 28 Jan 2018 21:06:51 +0000 (10:06 +1300)]
Merge pull request #11584 from mlutfy/report-act-nfc

CRM-21715 Activity Report: move SQL creation in a buildQuery function.

6 years agoCRM-21719 Require Multibyte PHP extension
Seamus Lee [Sun, 28 Jan 2018 05:34:06 +0000 (16:34 +1100)]
CRM-21719 Require Multibyte PHP extension

6 years agoAdd in cancel_button_text and submit_button_text fields to the civicrm_uf schema...
Seamus Lee [Sun, 28 Jan 2018 04:14:24 +0000 (15:14 +1100)]
Add in cancel_button_text and submit_button_text fields to the civicrm_uf schema in crm.uf.js

6 years agoMinor fixes and add unit tests
Seamus Lee [Sat, 27 Jan 2018 23:54:13 +0000 (10:54 +1100)]
Minor fixes and add unit tests

6 years agoCRM-21715: Activity Report: move SQL creation in a buildQuery function.
Mathieu Lutfy [Thu, 25 Jan 2018 03:53:42 +0000 (22:53 -0500)]
CRM-21715: Activity Report: move SQL creation in a buildQuery function.

6 years agoUse mb_strlen() in ellipsify() to avoid excessive multibyte truncation
mark burdett [Fri, 26 Jan 2018 20:48:25 +0000 (12:48 -0800)]
Use mb_strlen() in ellipsify() to avoid excessive multibyte truncation

6 years agoAmount and source could exceed max length of subject column
mark burdett [Fri, 26 Jan 2018 20:28:56 +0000 (12:28 -0800)]
Amount and source could exceed max length of subject column

6 years agoAllow for selecting multiple relationship types in Advanced Search
Seamus Lee [Fri, 26 Jan 2018 06:48:58 +0000 (17:48 +1100)]
Allow for selecting multiple relationship types in Advanced Search

6 years agoCRM-21707 follow up fix - check keys as well as values for xss if we are going to...
eileen [Thu, 25 Jan 2018 23:02:26 +0000 (12:02 +1300)]
CRM-21707 follow up fix - check keys as well as values for xss if we are going to encode json.

6 years agoCRM-21707 use metadata to validate 'parents' field on group.parents
eileen [Thu, 25 Jan 2018 22:59:23 +0000 (11:59 +1300)]
CRM-21707 use metadata to validate 'parents' field on group.parents

There was a test attempting to pass

[1 => 'Test Group'] which was getting through to the BAO but I feel should
have been blocked at the api level as Test Group did not exist. We have existing code to validate against pseudoconstants but this was not kicking in
because
a) there was no pseudoconstant defined for the field
b) we were giving TEXT fields less validation than STRING fields
(the assumption looks like it was that they were html fields but that is
not consistent & IMHO non of the additional checks are harmful.)
c) the getoptions was failing because it was passing 'validate' in
as a param to the pseudoconstant once set up, I handled that in
the pseudoconstant function.

I also altered the test to see [1 => 'non existent group'] as a fail
(rather than converting it to group = 1 & succeed.

There are a couple of follow on thoughts I have
1) I think we should xss check keys as well as values - will add that as a commit
2) there may be a very very hypothetical hole in _civicrm_api3_api_match_pseudoconstant_value - if  is empty it returns early. I think that used
to be valid as some psuedoconstants were not resolveable but now
I think if options is empty it means there are no valid options &
it should be rejected. Note that these strings are still xss checked.

6 years agoCRM-21707 use serialisation metadata from api basic_create_fallback.
eileen [Thu, 25 Jan 2018 03:09:23 +0000 (16:09 +1300)]
CRM-21707 use serialisation metadata from api basic_create_fallback.

In order to add a unit test I enabled the same in-DAO handling on the Group BAO create
(since core api don't use the fallback). It allowed me to remove cruft and
to remove comments about removing cruft.

With this in place a custom entity (in an extension) could define

    <pseudoconstant>
      <optionGroupName>group_type</optionGroupName>
    </pseudoconstant>
    <serialize>SEPARATOR_BOOKEND</serialize>

and that field would accept an array of valid names that map to group_types
and the api would handle the serialisation. api v4 supports this so good prep

6 years agoMerge pull request #11527 from lemacarl/CRM-21524
Eileen McNaughton [Thu, 25 Jan 2018 20:46:09 +0000 (09:46 +1300)]
Merge pull request #11527 from lemacarl/CRM-21524

CRM-21524 - Fix merge contacts when one is deceased