Tim Otten [Wed, 15 May 2019 08:23:37 +0000 (09:23 +0100)]
CRM_Utils_SQL_* - Properly interpolate NULL values
Overview
--------
The `CRM_Utils_SQL_*` classes are used to generate SQL expressions with
properly escaped data. However, in many cases, the values of `NULL` are
processed in a way which clearly doesn't work, e.g.
Before
------
When passing in a parameter with a `NULL` value, the parameter *is not evaluated at all*.
```
>>> CRM_Utils_SQL_Select::from('civicrm_contact')->where('do_not_email IS @foo', ['foo' => NULL])->toSQL()
=> """
SELECT *\n
FROM civicrm_contact\n
WHERE (do_not_email IS @foo)\n
"""
```
Specifically:
* `CRM_Utils_SQL_Select` - PHP NULL parameters are ignored (as if the value does not exist). No test coverage.
* `CRM_Utils_SQL_Delete` - PHP NULL parameters are ignored (as if the value does not exist). No test coverage.
* `CRM_Utils_SQL_Insert` - PHP NULL inputs are represented as SQL NULLs. No test coverage.
After
-----
When passing in a parameter with a PHP `NULL` value, the parameter is encoded as a SQL `NULL` value.
```
>>> CRM_Utils_SQL_Select::from('civicrm_contact')->where('do_not_email IS @foo', ['foo' => NULL])->toSQL()
=> """
SELECT *\n
FROM civicrm_contact\n
WHERE (do_not_email IS NULL)\n
"""
```
Specifically:
* `CRM_Utils_SQL_Select` - PHP NULL inputs are represented as SQL NULLs. Has test coverage.
* `CRM_Utils_SQL_Delete` - PHP NULL inputs are represented as SQL NULLs. Has test coverage.
* `CRM_Utils_SQL_Insert` - PHP NULL inputs are represented as SQL NULLs. Has test coverage.
Comment
-------
I'm generally hesitant about changing behavior like this. However, given
that the old behavior was clearly non-functional, I'm struggling to figure a
way where this would be problematic. Moreover, I'm a bit encouraged by the
fact that:
* There are unit-tests specifically for these classes,
* When grepping core for references to `CRM_Utils_SQL_ `, there are several
matches involving APIv3 and ActionSchedules -- both of which have a long
practice of unit-testing.
* When grepping my local ext's, there are several matches for things in
`apiv4` and `civicase` - which also some test-coverage.
Seamus Lee [Mon, 13 May 2019 04:37:53 +0000 (14:37 +1000)]
Merge pull request #14239 from colemanw/haveACrack
Remove broken delete from customGroupCreate
Coleman Watts [Mon, 13 May 2019 02:36:42 +0000 (22:36 -0400)]
Remove broken delete from customGroupCreate
colemanw [Sun, 12 May 2019 23:25:27 +0000 (19:25 -0400)]
Merge pull request #14181 from eileenmcnaughton/group_search
dev/core#926 [ref] adds a test & does a preliminary extraction
Eileen McNaughton [Sun, 12 May 2019 23:13:34 +0000 (11:13 +1200)]
Merge pull request #14195 from mlutfy/dev932
dev/core#932 Fix dedupe contacts flip selection
Eileen McNaughton [Sun, 12 May 2019 22:07:52 +0000 (10:07 +1200)]
Merge pull request #14160 from demeritcowboy/fix-change-status-warning
dev/core#896 - fix notice warning on closing a case
Eileen McNaughton [Sun, 12 May 2019 22:03:23 +0000 (10:03 +1200)]
Merge pull request #14206 from mattwire/paymentforms_refactor
REF Refactor to reduce duplication on payment forms
Seamus Lee [Sun, 12 May 2019 05:35:32 +0000 (15:35 +1000)]
Merge pull request #14226 from eileenmcnaughton/master
Update testGetActivityAccessCiviCRMEnough test for clarity
Seamus Lee [Sun, 12 May 2019 02:32:34 +0000 (12:32 +1000)]
Merge pull request #14238 from civicrm/5.14
5.14
Eileen McNaughton [Sat, 11 May 2019 23:49:48 +0000 (11:49 +1200)]
Merge pull request #14118 from eileenmcnaughton/no_fin_item
Fix financial acl permissions to respect check_permissions
Eileen McNaughton [Sat, 11 May 2019 23:48:34 +0000 (11:48 +1200)]
Merge pull request #14236 from seamuslee001/activity_test
Fix Failing Activity Test
Seamus Lee [Sat, 11 May 2019 07:25:11 +0000 (17:25 +1000)]
Fix Failing Activity Test
Seamus Lee [Sat, 11 May 2019 06:40:48 +0000 (16:40 +1000)]
Merge pull request #14223 from eileenmcnaughton/5.14
dev/core#942 fix failure to render names for some activities
eileenmcnaugton [Fri, 10 May 2019 04:13:11 +0000 (16:13 +1200)]
dev/core#942 fix failure to render names for some activities
Overview
----------------------------------------
Set limit for activity_contact retrieval to 0, allowing to retrieve more than 25 activity contacts when rendering the first 25 activities on the activity contact tab
Before
----------------------------------------
![before](https://user-images.githubusercontent.com/336308/
57439801-
e42a0580-729a-11e9-80a1-
45df93d0c5eb.jpg)
After
----------------------------------------
![after](https://user-images.githubusercontent.com/336308/
57439960-
39fead80-729b-11e9-9701-
acd79ff73497.jpg)
Technical Details
----------------------------------------
This moves the logic for retrieving the target contacts back into the getActivities function. We are stil not wanting to bypass the ACLs so still using the
api but strictly limiting the number of contacts we retrieve (at the cost of extra queries, but cheap ones).
Some tests added on the Bulk Mail activity.
Comments
----------------------------------------
Eileen McNaughton [Sat, 11 May 2019 01:33:52 +0000 (13:33 +1200)]
Merge pull request #14233 from seamuslee001/participant_count_search_fix
dev/core#956 Fix hard breakage in find participants form when you do a filter on o…
Seamus Lee [Fri, 10 May 2019 23:31:19 +0000 (09:31 +1000)]
Merge pull request #14220 from pradpnayak/core/issues/923
core/issues/923, Fixed notice error when creating/editing profile
Seamus Lee [Fri, 10 May 2019 23:24:47 +0000 (09:24 +1000)]
dev/core#956 Fix hard breakage in find participants form when you do a filter on one event and n participant statues
Eileen McNaughton [Fri, 10 May 2019 22:18:36 +0000 (10:18 +1200)]
Merge pull request #14216 from alifrumin/dontmunge
When creating relationship types don't munge names
Eileen McNaughton [Fri, 10 May 2019 09:05:50 +0000 (21:05 +1200)]
Merge pull request #14227 from civicrm/5.14
5.14 to master
Eileen McNaughton [Fri, 10 May 2019 09:05:17 +0000 (21:05 +1200)]
Merge pull request #14214 from jitendrapurohit/activity-input
Add select2 to input field of datepicker
Eileen McNaughton [Fri, 10 May 2019 09:02:30 +0000 (21:02 +1200)]
Merge pull request #14221 from seamuslee001/activty_wrapper_date_picker_template
Add in Wrapper template around DatePickerRange template to have bette…
eileenmcnaugton [Fri, 10 May 2019 08:55:47 +0000 (20:55 +1200)]
Update testGetActivityAccessCiviCRMEnough test for clarity
Seamus Lee [Fri, 10 May 2019 00:16:19 +0000 (10:16 +1000)]
Add in Wrapper template around DatePickerRange template to have better layout of Activity Search Form
Allow for colspan and class to be set when adding in wrapper
Update the wrapper to be only one td and not all and fix activity template appropriately
Eileen McNaughton [Thu, 9 May 2019 23:52:24 +0000 (11:52 +1200)]
Merge pull request #14219 from colemanw/hover
dev/core#950 Remove deprecated :hover jQuery selector
Coleman Watts [Thu, 9 May 2019 21:50:53 +0000 (17:50 -0400)]
Remove deprecated :hover jQuery selector
Pradeep Nayak [Thu, 9 May 2019 21:35:00 +0000 (22:35 +0100)]
core/issues/923, Fixed notice error when creating/editing profile
Monish Deb [Thu, 9 May 2019 12:50:54 +0000 (18:20 +0530)]
Merge pull request #14217 from prondubuisi/this-in-static-method
dev/core#945 - fix use of $this error in static method
Matthew Wire [Thu, 9 May 2019 09:55:08 +0000 (10:55 +0100)]
Merge pull request #14004 from mfb/set-utf8
Remove CIVICRM_TEMP_FORCE_UTF8; deprecate TempTable::setUtf8()
Matthew Wire [Thu, 9 May 2019 09:53:16 +0000 (10:53 +0100)]
Merge pull request #14185 from mfb/watchdog
Pass the RFC 3164 severity level thru to drupal watchdog.
Onyemenam Ndubuisi [Thu, 9 May 2019 05:53:30 +0000 (06:53 +0100)]
dev/core#945 - fix use of $this error in static method
Alice Frumin [Wed, 8 May 2019 16:02:54 +0000 (12:02 -0400)]
When creating relationship types thru the api Don't munge names
Jitendra Purohit [Wed, 8 May 2019 04:40:18 +0000 (10:10 +0530)]
Add select2 to input field of datepicker
Eileen McNaughton [Tue, 7 May 2019 20:18:26 +0000 (08:18 +1200)]
Merge pull request #14203 from yashodha/dev_705
(dev/core#705) Disabling Alphabetical Pager is not respected for events
Yashodha Chaku [Tue, 7 May 2019 06:12:31 +0000 (11:42 +0530)]
Merge pull request #14183 from eileenmcnaughton/copy_dao
Fix CRM-21832 - Recurring activities don't carry over custom datas & add test provided by Agileware
Seamus Lee [Tue, 7 May 2019 04:13:00 +0000 (14:13 +1000)]
Merge pull request #14205 from civicrm/5.14
5.14
Seamus Lee [Tue, 7 May 2019 01:35:15 +0000 (11:35 +1000)]
Merge pull request #14210 from seamuslee001/5_13_2_release_notes
Add 5.13.2 release notes
Tim Otten [Mon, 6 May 2019 23:32:12 +0000 (16:32 -0700)]
Update 5.13.2.md
Seamus Lee [Mon, 6 May 2019 22:35:55 +0000 (08:35 +1000)]
Update Release notes for dev/core#940
Include Dave D for review purposes
Tim Otten [Mon, 6 May 2019 19:31:11 +0000 (12:31 -0700)]
Add 5.13.2 release notes
Seamus Lee [Mon, 6 May 2019 23:34:42 +0000 (09:34 +1000)]
Merge pull request #14208 from seamuslee001/dev_core_940_5_14
(dev/core#940) Fix regression involving Email Processor filing and ".unknown" attachments
Seamus Lee [Mon, 6 May 2019 22:29:50 +0000 (08:29 +1000)]
Fix Regression in Email Processor filing all emails as .unknown attachments
Matthew Wire [Mon, 6 May 2019 22:12:58 +0000 (23:12 +0100)]
Merge pull request #14198 from eileenmcnaughton/pay_activity
[REF+ test] start process of cleaning up payment activity handling
Matthew Wire [Mon, 6 May 2019 22:11:53 +0000 (23:11 +0100)]
Merge pull request #14197 from eileenmcnaughton/cont_cancel
dev/core#927 [ref] Extract contribution.cancel function
Matthew Wire (MJW Consulting) [Mon, 6 May 2019 21:58:11 +0000 (22:58 +0100)]
Refactor to reduce duplication on payment forms
Seamus Lee [Mon, 6 May 2019 20:36:27 +0000 (06:36 +1000)]
Merge pull request #14204 from totten/5.14-act-sort
(dev/core#934; followup) Fix escaping on new query code
eileen [Thu, 2 May 2019 02:19:50 +0000 (14:19 +1200)]
Fix failure to copy custom fields & add test provided by Agileware
Per https://github.com/civicrm/civicrm-core/pull/13470 custom fields are
inconsistently copied where copying entities. This makes the code from
BAO_Event called from the genericCopy function.
I did a bit of an audit and the places where this is currently called from don't appear
to call the copyGeneric function with the 'custom' param that would have activated the old
code. I also consistently removed the & when it was being called so I could take it
out of the signature.
The original PR handled tags as well, but not in a generic way. I've left that out of scope
but the test is present, commented out, so it would be easy enough to revist
Tim Otten [Mon, 6 May 2019 19:34:37 +0000 (12:34 -0700)]
(dev/core#934; followup) Fix escaping on new query code
This updates a line which was added in the past day (#14194) to ensure that
the data is escaped.
yashodha [Mon, 6 May 2019 12:55:47 +0000 (18:25 +0530)]
(dev/core#705) Disabling Alphabetical Pager is not respected for events
Eileen McNaughton [Sun, 5 May 2019 21:48:52 +0000 (09:48 +1200)]
Merge pull request #14199 from colemanw/relActive
Stop overriding is_active default when saving new relationship
Coleman Watts [Sun, 5 May 2019 00:11:10 +0000 (20:11 -0400)]
Stop overriding is_active default when saving new relationship
For some obscure reason the relationsip BAO was forcing the is_active field
to default to 0 even though the schema sets a more sensible default of 1.
Seamus Lee [Sun, 5 May 2019 02:39:53 +0000 (12:39 +1000)]
Merge pull request #14202 from civicrm/5.14
5.14
Seamus Lee [Sun, 5 May 2019 02:39:21 +0000 (12:39 +1000)]
Merge pull request #14200 from demeritcowboy/to-be-or-not-to-be
contributor-keys file - jira/lab.c.o username fix
Seamus Lee [Sun, 5 May 2019 02:38:19 +0000 (12:38 +1000)]
Merge pull request #14194 from eileenmcnaughton/activity_sort
dev/core#934 Fix regression on sorting activity tab by 'Added by'
DemeritCowboy [Sun, 5 May 2019 01:07:53 +0000 (21:07 -0400)]
fix change case status warning
Eileen McNaughton [Sat, 4 May 2019 23:30:16 +0000 (11:30 +1200)]
Merge pull request #14177 from eileenmcnaughton/free
IDE re-format of tools directory
eileen [Sat, 4 May 2019 05:16:36 +0000 (17:16 +1200)]
[REF] start process of cleaning up payment activity handling
At the moment activities are created when using the additional payment form but not the UI.
This needs cleaning up & this takes the first step by adding testing & slightly
simplifying where decisions are made about variables (assign title directly rather than component
just to assign title deeper down
Eileen McNaughton [Sat, 4 May 2019 23:18:33 +0000 (11:18 +1200)]
Merge pull request #14180 from eileenmcnaughton/recur_search
Enotice fix on creating a smart group
eileen [Fri, 3 May 2019 02:37:14 +0000 (14:37 +1200)]
dev/core#934 Fix regression on sorting activity tab by 'Added by'
DemeritCowboy [Fri, 3 May 2019 23:49:27 +0000 (19:49 -0400)]
jira
eileen [Fri, 3 May 2019 23:20:35 +0000 (11:20 +1200)]
dev/core#927 Extract contribution.cancel function
Mathieu Lutfy [Fri, 3 May 2019 13:09:25 +0000 (09:09 -0400)]
dev/core#932 Fix dedupe contacts flip selection
Eileen McNaughton [Fri, 3 May 2019 05:29:19 +0000 (17:29 +1200)]
Merge pull request #14193 from seamuslee001/5.14
On PHP 7.2 we cannot start session until it has been configured by Dr…
mark burdett [Tue, 16 Apr 2019 23:29:43 +0000 (16:29 -0700)]
On PHP 7.2 we cannot start session until it has been configured by Drupal.
Eileen McNaughton [Fri, 3 May 2019 01:26:13 +0000 (13:26 +1200)]
Merge pull request #14192 from civicrm/5.14
5.14
Seamus Lee [Fri, 3 May 2019 00:55:29 +0000 (10:55 +1000)]
Merge pull request #14191 from seamuslee001/5_13_release_notes
Add in release notes for 5.13.1 drop
Tim Otten [Thu, 2 May 2019 23:22:01 +0000 (16:22 -0700)]
Merge pull request #14074 from mfb/session-start
Don't call session_start() before CMS bootstrap (PHP 7.2 compat)
Seamus Lee [Thu, 2 May 2019 23:16:12 +0000 (09:16 +1000)]
Merge pull request #14135 from colemanw/menubarVars
Hook to alter menubar css variables & fix breakpoint in WP
Tim Otten [Thu, 2 May 2019 22:48:16 +0000 (15:48 -0700)]
Update 5.13.1.md
Seamus Lee [Thu, 2 May 2019 22:08:02 +0000 (08:08 +1000)]
Merge pull request #14189 from MegaphoneJon/wordpress-26-5.14
wordpress#26 - fix REST
Seamus Lee [Thu, 2 May 2019 21:30:39 +0000 (07:30 +1000)]
Add in release notes for 5.13.1 drop
Jon Goldberg [Thu, 2 May 2019 20:00:19 +0000 (16:00 -0400)]
wordpress#26 - fix REST
Seamus Lee [Thu, 2 May 2019 21:09:40 +0000 (07:09 +1000)]
Merge pull request #14188 from seamuslee001/dev_core_931_5_14
Resolve dev/core#931 by not doing translation on the query if field e…
Seamus Lee [Thu, 2 May 2019 20:22:41 +0000 (06:22 +1000)]
Resolve dev/core#931 by not doing translation on the query if field exists during the upgrade process
mark burdett [Thu, 2 May 2019 13:49:06 +0000 (06:49 -0700)]
Pass the RFC 3164 severity level thru to drupal watchdog.
Matthew Wire [Thu, 2 May 2019 09:32:19 +0000 (10:32 +0100)]
Merge pull request #14171 from eileenmcnaughton/copy_dao
[ref] Move copyCustomFields function from Event to Core_DAO for re-usablibilty
Monish Deb [Thu, 2 May 2019 07:44:17 +0000 (13:14 +0530)]
Merge pull request #14152 from seamuslee001/dev_translation_26
dev/translation#26 Fix Notice errors caused by l10n rewriting of quer…
eileen [Thu, 2 May 2019 02:37:57 +0000 (14:37 +1200)]
IDE re-format of tools directory
We didn't fix array syntax on this one yet
eileen [Thu, 2 May 2019 06:25:31 +0000 (18:25 +1200)]
[REF] premlinary tidy up of code as tested - ready for actual fix
eileen [Thu, 2 May 2019 05:58:04 +0000 (17:58 +1200)]
Add unit test for group_contact_status in search
This currently works for non-smart groups so this will pass.
eileen [Thu, 2 May 2019 05:05:29 +0000 (17:05 +1200)]
Enotice fix
Dates back to https://github.com/civicrm/civicrm-core/commit/
eda34f9b15c494715e8fc54f09b5ea4308d16b17#diff-8041069091a94b730ff8ad60bdd24042R70
(Mar 2018).
To recreate do a first name search & create a smart group from it
Eileen McNaughton [Thu, 2 May 2019 04:48:31 +0000 (16:48 +1200)]
Merge pull request #14178 from eileenmcnaughton/config
[cleanup] Remove deprecated pattern &CRM_Core_Config::singleton()
Eileen McNaughton [Thu, 2 May 2019 04:48:11 +0000 (16:48 +1200)]
Merge pull request #14179 from eileenmcnaughton/free_dao
dev/core#562 [cleanup] remove some more instances of ->free()
CiviCRM [Thu, 2 May 2019 04:40:58 +0000 (04:40 +0000)]
Set version to 5.15.alpha1
CiviCRM [Thu, 2 May 2019 04:35:35 +0000 (04:35 +0000)]
Set version to 5.14.beta1
eileen [Thu, 2 May 2019 02:55:05 +0000 (14:55 +1200)]
dev/core#562 remove some more instances of ->free()
eileen [Thu, 2 May 2019 02:44:35 +0000 (14:44 +1200)]
[cleanup] Remove deprecated pattern &CRM_Core_Config::singleton()
Seamus Lee [Thu, 2 May 2019 02:29:36 +0000 (12:29 +1000)]
Merge pull request #14176 from civicrm/5.13
5.13
Tim Otten [Thu, 2 May 2019 02:23:55 +0000 (19:23 -0700)]
Merge pull request #14056 from agh1/5.13.0-releasenotes
5.13.0 release notes
Tim Otten [Wed, 1 May 2019 23:50:50 +0000 (16:50 -0700)]
Update 5.13.0.md
Eileen McNaughton [Wed, 1 May 2019 23:27:10 +0000 (11:27 +1200)]
Merge pull request #14173 from mlutfy/cart-payment-cid
Event Cart: pass the contactID to fix payment on Stripe
Eileen McNaughton [Wed, 1 May 2019 23:26:27 +0000 (11:26 +1200)]
Merge pull request #14170 from mlutfy/cart-emails
Event Cart: fix sending of email receipts
Eileen McNaughton [Wed, 1 May 2019 23:25:51 +0000 (11:25 +1200)]
Merge pull request #14175 from mlutfy/cart-cc-icons
Event Cart: add support for the Credit Card type icons
Eileen McNaughton [Wed, 1 May 2019 23:25:31 +0000 (11:25 +1200)]
Merge pull request #14174 from mlutfy/cart-allow-same-participant
Event Cart: honor the allow_same_participant_emails setting
Mathieu Lutfy [Wed, 1 May 2019 15:08:06 +0000 (11:08 -0400)]
Event Cart: pass the contactID to fix payment on Stripe
Andrew Hunt [Wed, 1 May 2019 21:23:38 +0000 (17:23 -0400)]
5.13.0 release notes: late changes
Alice Frumin [Thu, 25 Apr 2019 20:12:08 +0000 (16:12 -0400)]
uppercase if work is continued or begun
Alice Frumin [Thu, 25 Apr 2019 20:06:12 +0000 (16:06 -0400)]
moving gitlab issues to the end
Alice Frumin [Tue, 16 Apr 2019 17:21:09 +0000 (13:21 -0400)]
5.13.0 release notes: bulk of edits
Andrew Hunt [Mon, 15 Apr 2019 21:01:28 +0000 (17:01 -0400)]
5.13.0 release notes: added boilerplate
Andrew Hunt [Mon, 15 Apr 2019 19:21:33 +0000 (15:21 -0400)]
5.13.0 release notes: raw from script