<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
class CRM_Mailing_Form_Group extends CRM_Contact_Form_Task {
/**
- * The mailing ID of the mailing if we are resuming a mailing
+ * The mailing ID of the mailing if we are resuming a mailing.
*
* @var integer
*/
protected $_mailingID;
/**
- * Set variables up before form is built
+ * Set variables up before form is built.
*
* @return void
*/
$mailingGroups[$entityTable][$dao->group_type][] = $dao->entity_id;
}
- $defaults['includeGroups'] = CRM_Utils_Array::value('include', $mailingGroups['civicrm_group']);
- $defaults['excludeGroups'] = CRM_Utils_Array::value('exclude', $mailingGroups['civicrm_group']);
+ $defaults['includeGroups'] = CRM_Utils_Array::value('Include', $mailingGroups['civicrm_group']);
+ $defaults['excludeGroups'] = CRM_Utils_Array::value('Exclude', $mailingGroups['civicrm_group']);
if (!empty($mailingGroups['civicrm_mailing'])) {
- $defaults['includeMailings'] = CRM_Utils_Array::value('include', $mailingGroups['civicrm_mailing']);
- $defaults['excludeMailings'] = CRM_Utils_Array::value('exclude', $mailingGroups['civicrm_mailing']);
+ $defaults['includeMailings'] = CRM_Utils_Array::value('Include', $mailingGroups['civicrm_mailing']);
+ $defaults['excludeMailings'] = CRM_Utils_Array::value('Exclude', $mailingGroups['civicrm_mailing']);
}
}
}
/**
- * Build the form object
+ * Build the form object.
*
* @return void
*/
//when the context is search add base group's.
if ($this->_searchBasedMailing) {
- //get the static groups
- $staticGroups = CRM_Core_PseudoConstant::staticGroup(FALSE, 'Mailing');
+ //CRM-16600 Include Smart Groups in Unsubscribe list as that matches
+ //all other practices in CiviMail
$this->add('select', 'baseGroup',
ts('Unsubscription Group'),
array(
'' => ts('- select -'),
- ) + CRM_Contact_BAO_Group::getGroupsHierarchy($staticGroups, NULL, ' ', TRUE),
+ ) + $groups,
TRUE,
array('class' => 'crm-select2 huge')
);
CRM_Mailing_BAO_Mailing::getRecipients(
$mailing->id,
$mailing->id,
- NULL,
- NULL,
TRUE,
$dedupeEmail
);
}
/**
- * Display Name of the form
+ * Display Name of the form.
*
*
* @return string
}
/**
- * Global validation rules for the form
+ * Global validation rules for the form.
*
* @param array $fields
* Posted values of the form.