From 5f91a979312395a595a7b2b41d106cac871fc260 Mon Sep 17 00:00:00 2001 From: Civiware Solutions Date: Fri, 31 Aug 2018 12:49:54 +0100 Subject: [PATCH] invoke only on reports --- constituentsonly.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/constituentsonly.php b/constituentsonly.php index cf3d251..fd2723a 100644 --- a/constituentsonly.php +++ b/constituentsonly.php @@ -151,6 +151,10 @@ function constituentsonly_civicrm_contactListQuery(&$query, $queryText, $context */ function constituentsonly_civicrm_selectWhereClause($entity, &$clauses) { if ($entity == 'Contact') { + $url = CRM_Utils_Array::value('q', $_GET); + if (strpos($url, 'civicrm/report') === FALSE) { + return; + } $clauses['do_not_trade'] = ' = 0'; } }