API/DAO - Improve permissioning sql clauses: support field names and OR
authorcolemanw <coleman@civicrm.org>
Sun, 17 Sep 2023 22:11:03 +0000 (18:11 -0400)
committercolemanw <coleman@civicrm.org>
Wed, 20 Sep 2023 11:30:24 +0000 (07:30 -0400)
commit918e583a146876fb42932a1d959796fd710b7b74
treebc5fb72ef0457b0297b1f8099292a48a13b97897
parenta4e950520862b7d830264a8a9f2946e1efeade91
API/DAO - Improve permissioning sql clauses: support field names and OR

Before: selectWhereClause was limited to returning arrays of clauses which would be
joined with AND. They could not reference any other fields on the entity.

After: selectWhereClause can return sub-arrays which are joined with OR,
and can reference any field on the entity using {curly_brace} syntax.

Stricter type checking emits noisy deprecations if arrays are expected and strings are given.
CRM/Contact/BAO/Query.php
CRM/Core/BAO/Note.php
CRM/Core/DAO.php
CRM/Utils/SQL.php
ext/financialacls/financialacls.php
ext/oauth-client/CRM/OAuth/BAO/OAuthContactToken.php
tests/phpunit/CRM/Utils/SQLTest.php