forked from CiviWare/com.dpci.constituentsonly
		
	invoke only on reports
This commit is contained in:
		@@ -151,6 +151,10 @@ function constituentsonly_civicrm_contactListQuery(&$query, $queryText, $context
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
function constituentsonly_civicrm_selectWhereClause($entity, &$clauses) {
 | 
					function constituentsonly_civicrm_selectWhereClause($entity, &$clauses) {
 | 
				
			||||||
  if ($entity == 'Contact') {
 | 
					  if ($entity == 'Contact') {
 | 
				
			||||||
 | 
					    $url = CRM_Utils_Array::value('q', $_GET);
 | 
				
			||||||
 | 
					    if (strpos($url, 'civicrm/report') === FALSE) {
 | 
				
			||||||
 | 
					      return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    $clauses['do_not_trade'] = ' = 0';
 | 
					    $clauses['do_not_trade'] = ' = 0';
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user