Deal with ACL'ed users not getting is_deleted = 0 added on
authorSeamus Lee <seamuslee001@gmail.com>
Tue, 30 Jun 2015 23:47:08 +0000 (23:47 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Tue, 30 Jun 2015 23:47:08 +0000 (23:47 +0000)
CRM/Contact/BAO/Contact/Permission.php
CRM/Contact/Form/Search/Custom/Basic.php
CRM/Contact/Form/Search/Custom/DateAdded.php
CRM/Contact/Form/Search/Custom/MultipleValues.php
CRM/Contact/Form/Search/Custom/ZipCodeRange.php

index 1508c8bb1e4ceed7f04637c1a3e57b2e32a69359..ab361ac03af53db04fb93cb705a6132b520e5cbe 100644 (file)
@@ -230,7 +230,7 @@ AND    $operationClause LIMIT 1";
     }
     else {
       $fromClause = " INNER JOIN civicrm_acl_contact_cache aclContactCache ON {$contactAlias}.id = aclContactCache.contact_id ";
-      $whereClase = " aclContactCache.user_id = $contactID ";
+      $whereClase = " aclContactCache.user_id = $contactID AND $contactAlias.is_deleted = 0";
     }
 
     return array($fromClause, $whereClase);
index 71c7257cceaf12d7a7b738ebb43358133646a561..01a9a077a3c601ef415ed510389b802e49f4809d 100644 (file)
@@ -194,7 +194,7 @@ class CRM_Contact_Form_Search_Custom_Basic extends CRM_Contact_Form_Search_Custo
   public function where($includeContactIDs = FALSE) {
     if ($whereClause = $this->_query->whereClause()) {
       if ($this->_aclWhere) {
-        $whereClause .= " AND {$this->_aclWhere} AND contact_a.is_deleted = 0";
+        $whereClause .= " AND {$this->_aclWhere}";
       }
       return $whereClause;
     }
index 2868318407f0cd09251856ab9b30f9631163e23a..fac3089892694fe37f39aed3665ccd97c4e39ca7 100644 (file)
@@ -400,7 +400,6 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
     $where = '(1)';
     if ($this->_aclWhere) {
       $where .= " AND {$this->_aclWhere} ";
-      $where .= " AND contact_a.is_deleted = 0";
     }
     return $where;
   }
index d9d767c0c42c0714c4de3c156e1fd8ac1eec059f..bac549225ff5bcd0447030e3b4fe3071a2ee1e06 100644 (file)
@@ -274,7 +274,7 @@ contact_a.sort_name    as sort_name,
       $clause[] = "cgc.group_id = {$this->_group}";
     }
     if ($this->_aclWhere) {
-      $clause[] = " {$this->_aclWhere} AND contact_a.is_deleted = 0";
+      $clause[] = " {$this->_aclWhere}";
     }
 
     $where = '( 1 )';
index 1af002dd7735d321b71ae42e28195212c573082f..2b5c7571faa9171e715970ed52fd406f46425c2d 100644 (file)
@@ -173,7 +173,7 @@ LEFT JOIN civicrm_email   email   ON ( email.contact_id = contact_a.id AND
     );
 
     if ($this->_aclWhere) {
-      $where .= " AND {$this->_aclWhere} AND contact_a.is_deleted = 0";
+      $where .= " AND {$this->_aclWhere} ";
     }
     return $this->whereClause($where, $params);
   }