$ignorePermission = FALSE,
$onlyPublicGroups = FALSE,
$excludeHidden = TRUE,
- $groupId = NULL
+ $groupId = NULL,
+ $includeSmartGroups = FALSE
) {
if ($count) {
$select = 'SELECT count(DISTINCT civicrm_group_contact.id)';
civicrm_subscription_history.method as method';
}
- $where = " WHERE contact_a.id = %1 AND civicrm_group.is_active = 1 AND saved_search_id IS NULL";
-
+ $where = " WHERE contact_a.id = %1 AND civicrm_group.is_active = 1";
+ if(!$includeSmartGroups){
+ $where .= " AND saved_search_id IS NULL";
+ }
+
if ($excludeHidden) {
$where .= " AND civicrm_group.is_hidden = 0 ";
}
*/
public function browse() {
- $count = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, NULL, NULL, TRUE);
+ $count = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, NULL, NULL, TRUE, FALSE, FALSE, TRUE, NULL, TRUE);
- $in = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, 'Added');
- $pending = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, 'Pending');
- $out = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, 'Removed');
+ $in = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, 'Added', NULL, FALSE, FALSE, FALSE, TRUE, NULL, TRUE);
+ $pending = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, 'Pending', NULL, FALSE, FALSE, FALSE, TRUE, NULL, TRUE);
+ $out = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, 'Removed', NULL, FALSE, FALSE, FALSE, TRUE, NULL, TRUE);
// keep track of all 'added' contact groups so we can remove them from the smart group
// section