CRM-18482 import - don't fill acl_contact_cache immediately before emptying it
authoreileenmcnaugton <eileen@fuzion.co.nz>
Fri, 29 Apr 2016 07:42:44 +0000 (19:42 +1200)
committereileenmcnaugton <eileen@fuzion.co.nz>
Fri, 29 Apr 2016 07:42:44 +0000 (19:42 +1200)
CRM/Contact/Import/Form/Preview.php

index e979cbc9a0b75ab412d133db328e6d7573b6c529..0a4f1b27d994208b741616dcc352b7fecec82b53 100644 (file)
@@ -285,12 +285,8 @@ class CRM_Contact_Import_Form_Preview extends CRM_Import_Form_Preview {
     // run the import
     $importJob->runImport($this);
 
-    // update cache after we done with runImport
-    if (!CRM_Core_Permission::check('view all contacts')) {
-      CRM_ACL_BAO_Cache::updateEntry($userID);
-    }
-
-    // clear all caches
+    // Clear all caches, forcing any searches to recheck the ACLs or group membership as the import
+    // may have changed it.
     CRM_Contact_BAO_Contact_Utils::clearContactCaches();
 
     // add all the necessary variables to the form