forked from CiviWare/com.dpci.constituentsonly
		
	added search fix
This commit is contained in:
		@@ -18,14 +18,12 @@ class CRM_ConstituentsOnly_BAO_Query extends CRM_Contact_BAO_Query_Interface {
 | 
				
			|||||||
   * @access public
 | 
					   * @access public
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
  public function where(&$query) {
 | 
					  public function where(&$query) {
 | 
				
			||||||
    $grouping = 0;
 | 
					    if (CRM_Utils_Array::value('civicrm_contact', $query->_tables)) {
 | 
				
			||||||
    $statement = "NOT (contact_a.do_not_trade <=> 1)";
 | 
					      $query->_where[0][] = "( contact_a.do_not_trade IS NULL OR contact_a.do_not_trade = 0)";
 | 
				
			||||||
    $query->_where[$grouping][] = $statement;
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  public function from($name, $mode, $side) {
 | 
					  public function from($name, $mode, $side) {
 | 
				
			||||||
    $from = NULL;
 | 
					 | 
				
			||||||
    return $from;
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  public function setTableDependency(&$tables) {
 | 
					  public function setTableDependency(&$tables) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user