From a2f03f0642e8f69044aafa7d33568bfcb584857e Mon Sep 17 00:00:00 2001 From: Nileema Date: Fri, 8 Aug 2014 15:36:47 +0530 Subject: [PATCH] --HR-350 Add parameter for extra whereClause to getRows() function --- CRM/Profile/Selector/Listings.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CRM/Profile/Selector/Listings.php b/CRM/Profile/Selector/Listings.php index 2e3e558a10..493925d3f0 100644 --- a/CRM/Profile/Selector/Listings.php +++ b/CRM/Profile/Selector/Listings.php @@ -446,7 +446,7 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR * * @return int the total number of rows for this action */ - function &getRows($action, $offset, $rowCount, $sort, $output = NULL) { + function &getRows($action, $offset, $rowCount, $sort, $output = NULL, $extraWhereClause = NULL) { $multipleFields = array('url'); //$sort object processing for location fields @@ -479,6 +479,11 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR } $additionalWhereClause = 'contact_a.is_deleted = 0'; + + if ($extraWhereClause) { + $additionalWhereClause .= " AND {$extraWhereClause}"; + } + $returnQuery = NULL; if ($this->_multiRecordTableName) { $returnQuery = TRUE; -- 2.25.1