static function addContactsToGroup(
$contactIds,
$groupId,
- $method = 'Admin',
- $status = 'Added',
+ $method = 'Admin',
+ $status = 'Added',
$tracking = NULL
) {
static function removeContactsFromGroup(
&$contactIds,
$groupId,
- $method = 'Admin',
- $status = 'Removed',
+ $method = 'Admin',
+ $status = 'Removed',
$tracking = NULL
) {
if (!is_array($contactIds)) {
foreach ($contactIds as $contactId) {
if ($status == 'Deleted') {
- $query = "DELETE FROM civicrm_group_contact WHERE contact_id=$contactId AND group_id=$groupId";
- $dao = CRM_Core_DAO::executeQuery($query);
+ $query = "DELETE FROM civicrm_group_contact WHERE contact_id=$contactId AND group_id=$groupId";
+ $dao = CRM_Core_DAO::executeQuery($query);
$historyParams = array(
'group_id' => $groupId,
'contact_id' => $contactId,
$select = $from = $where = '';
$select = 'SELECT DISTINCT civicrm_group.id, civicrm_group.title ';
- $from = ' FROM civicrm_group ';
- $where = " WHERE civicrm_group.is_active = 1 ";
+ $from = ' FROM civicrm_group ';
+ $where = " WHERE civicrm_group.is_active = 1 ";
if ($contactId) {
$from .= ' , civicrm_group_contact ';
$where .= " AND civicrm_group.id = civicrm_group_contact.group_id
*/
static function &getContactGroup(
$contactId,
- $status = NULL,
- $numGroupContact = NULL,
- $count = FALSE,
+ $status = NULL,
+ $numGroupContact = NULL,
+ $count = FALSE,
$ignorePermission = FALSE,
$onlyPublicGroups = FALSE,
- $excludeHidden = TRUE,
- $groupId = NULL
+ $excludeHidden = TRUE,
+ $groupId = NULL
) {
if ($count) {
$select = 'SELECT count(DISTINCT civicrm_group_contact.id)';
static function bulkAddContactsToGroup(
$contactIDs,
$groupID,
- $method = 'Admin',
- $status = 'Added',
+ $method = 'Admin',
+ $status = 'Added',
$tracking = NULL
) {
$group,
$name,
$componentID = NULL,
- $contactID = NULL,
- $load = FALSE,
+ $contactID = NULL,
+ $load = FALSE,
$domainID = NULL,
$force = FALSE
) {
*/
static function dao(
$group,
- $name = NULL,
+ $name = NULL,
$componentID = NULL,
- $contactID = NULL,
+ $contactID = NULL,
$domainID = NULL
) {
if (self::isUpgradeFromPreFourOneAlpha1()) {
}
$dao = new CRM_Core_DAO_Setting();
- $dao->group_name = $group;
- $dao->name = $name;
+ $dao->group_name = $group;
+ $dao->name = $name;
$dao->component_id = $componentID;
if (empty($domainID)) {
- $dao->domain_id = CRM_Core_Config::domainID();
+ $dao->domain_id = CRM_Core_Config::domainID();
}
else {
$dao->domain_id = $domainID;
*/
static function getItem(
$group,
- $name = NULL,
- $componentID = NULL,
+ $name = NULL,
+ $componentID = NULL,
$defaultValue = NULL,
- $contactID = NULL,
- $domainID = NULL
+ $contactID = NULL,
+ $domainID = NULL
) {
if (NULL !== ($override = self::getOverride($group, $name, NULL))) {
$group,
$name,
$componentID = NULL,
- $contactID = NULL,
- $createdID = NULL,
- $domainID = NULL
+ $contactID = NULL,
+ $createdID = NULL,
+ $domainID = NULL
) {
$fields = array();
$fieldsToSet = self::validateSettingsInput(array($name => $value), $fields);
$group,
$name,
$componentID = NULL,
- $contactID = NULL,
- $createdID = NULL,
- $domainID = NULL
+ $contactID = NULL,
+ $createdID = NULL,
+ $domainID = NULL
) {
if (empty($domainID)) {
$domainID = CRM_Core_Config::domainID();
static function valueOptions(
$group,
$name,
- $system = TRUE,
- $userID = NULL,
- $localize = FALSE,
- $returnField = 'name',
+ $system = TRUE,
+ $userID = NULL,
+ $localize = FALSE,
+ $returnField = 'name',
$returnNameANDLabels = FALSE,
- $condition = NULL
+ $condition = NULL
) {
$optionValue = self::getItem($group, $name);
$group,
$name,
$value,
- $system = TRUE,
- $userID = NULL,
+ $system = TRUE,
+ $userID = NULL,
$keyField = 'name'
) {
if (empty($value)) {