From: Nileema Date: Fri, 8 Aug 2014 10:06:47 +0000 (+0530) Subject: --HR-350 Add parameter for extra whereClause to getRows() function X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a2f03f0642e8f69044aafa7d33568bfcb584857e;p=civicrm-core.git --HR-350 Add parameter for extra whereClause to getRows() function --- 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;