This change means that when we are checking the allow function we do not add the harmful
OR to the query.
The 'view my contact' & 'edit my contact' permissions have already been checked for.
Adding them into the ACL query with an OR causes serious performance issues, as
elsewhere commented. We can & should avoid it here
$tables = array();
$whereTables = array();
- $permission = CRM_ACL_API::whereClause($type, $tables, $whereTables);
+ $permission = CRM_ACL_API::whereClause($type, $tables, $whereTables, NULL, FALSE, FALSE, TRUE);
$from = CRM_Contact_BAO_Query::fromClause($whereTables);
$query = "