CRM-15231 - Fatal error on search when ACLs are enabled
authoratif-shaikh <shaikh388@gmail.com>
Wed, 10 Sep 2014 09:32:14 +0000 (15:02 +0530)
committeratif-shaikh <shaikh388@gmail.com>
Wed, 10 Sep 2014 09:32:14 +0000 (15:02 +0530)
https://issues.civicrm.org/jira/browse/CRM-15231

CRM/Contact/BAO/Query.php

index c4431c9ec11ed0eb4cb474ca2421748b160ddab7..716cf0b914c94c5a9b453f323eafad918b970549 100644 (file)
@@ -4598,7 +4598,6 @@ civicrm_relationship.is_permission_a_b = 0
 
     // note : this modifies _fromClause and _simpleFromClause
     $this->_sort = $sort;
-    $this->includePseudoFieldsJoin($sort);
 
     list($select, $from, $where, $having) = $this->query($count, $sortByChar, $groupContacts, $onlyDeleted);
 
@@ -4698,9 +4697,7 @@ civicrm_relationship.is_permission_a_b = 0
         //CRM-15231
         $this->_fromClause = self::fromClause($this->_tables, NULL, NULL, $this->_primaryLocation, $this->_mode);
         $this->_simpleFromClause = self::fromClause($this->_whereTables, NULL, NULL, $this->_primaryLocation, $this->_mode);
-        if (!empty($_GET['crmSID'])) {
-          $this->includePseudoFieldsJoin($this->_sort);
-        }
+        $this->includePseudoFieldsJoin($this->_sort);
       }
     }
     else {