invoke only on reports

This commit is contained in:
CiviWare Solutions 2018-08-31 12:49:54 +01:00
parent 08b5349b23
commit 5f91a97931

View File

@ -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';
} }
} }