CRM-17123 remove damaging OR from smart group query
authoreileen <emcnaughton@wikimedia.org>
Thu, 30 Jun 2016 08:53:04 +0000 (20:53 +1200)
committereileen <emcnaughton@wikimedia.org>
Thu, 30 Jun 2016 12:22:17 +0000 (00:22 +1200)
commit485a3a1f02a668f7945b45bb40e163ca50e6d3a9
treeb6352cc935c31fcd565efce14c43d0ac6c0cb426
parentc3137c08168665e27a18cd6a5f41ec3b5375b205
CRM-17123 remove damaging OR from smart group query

Note that I added a group refresh to pick up the 'hard-adds'. I think the correct place to deal with this is in fact to alter the GroupContact Add functionality - ie.

IF (CRM_Core_DAO::executeQuery('SELECT id FROM civicrm_group_contact_cache WHERE group_id = 1 LIMIT 1)) {
  // Add the contact just added to the group to the group_contact_cache table.
}

I started that a bit but I think it should be dealt with separately after this is resolved
CRM/Contact/BAO/Group.php
CRM/Contact/BAO/Query.php
tests/phpunit/CRM/Contact/BAO/GroupContactTest.php
tests/phpunit/CRM/Contact/BAO/QueryTest.php