CRM-15231 Regression Fix for Api Break
authoratif-shaikh <shaikh388@gmail.com>
Thu, 11 Sep 2014 06:34:25 +0000 (12:04 +0530)
committeratif-shaikh <shaikh388@gmail.com>
Thu, 11 Sep 2014 06:34:25 +0000 (12:04 +0530)
----------------------------------------
* CRM-15231: Fatal error on search when ACLs are enabled
  https://issues.civicrm.org/jira/browse/CRM-15231

CRM/Contact/BAO/Query.php

index ea3012835848d39c8480bc5bd8087799d1006435..f7391601a20701c881601f15ba65ab719127954d 100644 (file)
@@ -84,6 +84,7 @@ class CRM_Contact_BAO_Query {
 
   public $_paramLookup;
 
+  public $_sort;
   /**
    * the set of output params
    *
@@ -4698,9 +4699,7 @@ civicrm_relationship.is_permission_a_b = 0
         $this->_fromClause = self::fromClause($this->_tables, NULL, NULL, $this->_primaryLocation, $this->_mode);
         $this->_simpleFromClause = self::fromClause($this->_whereTables, NULL, NULL, $this->_primaryLocation, $this->_mode);
         // note : this modifies _fromClause and _simpleFromClause
-        if (!empty($this->_sort)) {
-          $this->includePseudoFieldsJoin($this->_sort);
-        }
+        $this->includePseudoFieldsJoin($this->_sort);
       }
     }
     else {