From af531fbd4c7e65d0d1acb7cf49cbc05d7fcf8c91 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Wed, 10 Oct 2018 01:50:30 +0530 Subject: [PATCH] Apply on Contact search only for now --- CRM/ConstituentsOnly/BAO/Query.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CRM/ConstituentsOnly/BAO/Query.php b/CRM/ConstituentsOnly/BAO/Query.php index 560049f..f01f2ba 100644 --- a/CRM/ConstituentsOnly/BAO/Query.php +++ b/CRM/ConstituentsOnly/BAO/Query.php @@ -44,6 +44,11 @@ class CRM_ConstituentsOnly_BAO_Query extends CRM_Contact_BAO_Query_Interface { return; } + $url = CRM_Utils_Array::value('q', $_GET); + if (strpos($url, 'civicrm/contact/') === FALSE) { + return; + } + if (CRM_Utils_Array::value('civicrm_contact', $query->_tables) && empty($query->_paramLookup['do_not_trade'])) { $query->_where[0][] = " IF (contact_a.do_not_trade = 1,