);
CRM_Campaign_BAO_Query::componentSearchClause($campParams, $query);
break;
+
case 'activity_result':
if (is_array($value)) {
$safe = NULL;
'cid' => $this->id,
),
);
+
case CRM_Core_Action::UPDATE:
return array(
'title' => $this->display_name,
$params['condition'] = "parent_id = (SELECT id FROM civicrm_contact_type WHERE name='{$props['contact_type']}')";
}
break;
+
case 'contact_type':
if ($context == 'search') {
// CRM-15495 - EntityRef filters and basic search forms expect this format
case CRM_Core_Action::VIEW:
CRM_Utils_System::setTitle(ts('View Relationship for %1', array(1 => $this->_display_name_a)));
break;
+
case CRM_Core_Action::ADD:
CRM_Utils_System::setTitle(ts('Add Relationship for %1', array(1 => $this->_display_name_a)));
break;
+
case CRM_Core_Action::UPDATE:
CRM_Utils_System::setTitle(ts('Edit Relationship for %1', array(1 => $this->_display_name_a)));
break;
+
case CRM_Core_Action::DELETE:
CRM_Utils_System::setTitle(ts('Delete Relationship for %1', array(1 => $this->_display_name_a)));
break;
$form->_contactIds[] = $form->_toContactIds[] = $contactId;
$form->_toContactEmails[] = $email;
break;
+
case 'cc':
$form->_ccContactIds[] = $contactId;
break;
+
case 'bcc':
$form->_bccContactIds[] = $contactId;
break;
$ccValues['email'][] = '"' . $form->_contactDetails[$contactId]['sort_name'] . '" <' . $email . '>';
$ccValues['details'][] = "<a href='{$contactURL}'>" . $form->_contactDetails[$contactId]['display_name'] . "</a>";
break;
+
case 'bcc_id':
$bccValues['email'][] = '"' . $form->_contactDetails[$contactId]['sort_name'] . '" <' . $email . '>';
$bccValues['details'][] = "<a href='{$contactURL}'>" . $form->_contactDetails[$contactId]['display_name'] . "</a>";
}
}
break;
+
//check for any error in email/postal greeting, addressee,
//custom email/postal greeting, custom addressee, CRM-4575
}
}
break;
+
case 'CheckBox':
case 'AdvMulti-Select':
case 'Multi-Select':
$params['condition'] = 'id IN (' . implode(',', $types) . ')';
}
break;
+
// CRM-13981 This field was combined with soft_credits in 4.5 but the api still supports it
case 'honor_type_id':
$className = 'CRM_Contribute_BAO_ContributionSoft';
unset($status[CRM_Utils_Array::key('Pending', $statusName)]);
unset($status[CRM_Utils_Array::key('Failed', $statusName)]);
break;
+
case 'Pending':
case 'In Progress':
unset($status[CRM_Utils_Array::key('Refunded', $statusName)]);
break;
+
case 'Failed':
foreach (array(
'Pending',
case 'thankyou_date':
$params[$key] = CRM_Utils_Date::formatDate($params[$key], $dateType);
break;
+
case 'pledge_payment':
$params[$key] = CRM_Utils_String::strtobool($val);
break;
+
}
if ($customFieldID = CRM_Core_BAO_CustomField::getKeyID($key)) {
if ($customFields[$customFieldID]['data_type'] == 'Date') {
case 'first':
$startActionDate1 = 1;
break;
+
case 'second':
$startActionDate1 = 2;
break;
+
case 'third':
$startActionDate1 = 3;
break;
+
case 'fourth':
$startActionDate1 = 4;
break;
+
case 'last':
$startActionDate1 = -1;
break;
case 'always':
$doDelete = TRUE;
break;
+
case 'never':
$doDelete = FALSE;
break;
+
case 'unused':
$getRefCount = civicrm_api3($dao->entity_type, 'getrefcount', array(
'debug' => 1,
$doDelete = ($total == 0);
break;
+
default:
throw new \Exception('Unrecognized cleanup policy: ' . $policy);
}
case 'register_date':
return CRM_Utils_Rule::date($this->_value);
+
/*
case 'event_id':
static $events = null;
case 'civicrm_contact':
$contactIdClause = "AND id = %3";
break;
+
case 'civicrm_note':
$contactIdClause = "AND (( entity_id = %3 AND entity_table = 'civicrm_contact' ) OR (entity_id IN (SELECT note.id FROM `{$this->db}`.log_civicrm_note note WHERE note.entity_id = %3 AND note.entity_table = 'civicrm_contact') AND entity_table = 'civicrm_note'))";
break;
+
case 'civicrm_entity_tag':
$contactIdClause = "AND entity_id = %3 AND entity_table = 'civicrm_contact'";
break;
+
case 'civicrm_relationship':
$contactIdClause = "AND (contact_id_a = %3 OR contact_id_b = %3)";
break;
+
case 'civicrm_activity':
$activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name');
$sourceID = CRM_Utils_Array::key('Activity Source', $activityContacts);
LEFT JOIN civicrm_activity_contact source ON source.activity_id = lt.id AND source.contact_id = %3 AND source.record_type_id = {$sourceID} ";
$contactIdClause = "AND (at.id IS NOT NULL OR aa.id IS NOT NULL OR source.id IS NOT NULL)";
break;
+
case 'civicrm_case':
$contactIdClause = "AND id = (select case_id FROM civicrm_case_contact WHERE contact_id = %3 LIMIT 1)";
break;
+
default:
if (array_key_exists($table, $addressCustomTables)) {
$join = "INNER JOIN `{$this->db}`.`log_civicrm_address` et ON et.id = lt.entity_id";
case 'civicrm_case':
$values[$table]['status_id'] = CRM_Case_PseudoConstant::caseStatus('label', FALSE);
break;
+
case 'civicrm_activity':
$values[$table]['status_id'] = CRM_Core_PseudoConstant::activityStatus();
break;
$dao->reset();
}
break;
+
// custom data tables
case in_array($table, array_keys($ctypes)):
return $event->getTotalCount($this->_mailing_id,
$this->_job_id
);
- break;
case 'delivered':
$event = new CRM_Mailing_Event_BAO_Delivered();
$this->_job_id,
$this->_is_distinct
);
- break;
case 'opened':
$event = new CRM_Mailing_Event_BAO_Opened();
$this->_job_id,
$this->_is_distinct
);
- break;
case 'bounce':
$event = new CRM_Mailing_Event_BAO_Bounce();
$this->_job_id,
$this->_is_distinct
);
- break;
case 'forward':
$event = new CRM_Mailing_Event_BAO_Forward();
$this->_job_id,
$this->_is_distinct
);
- break;
case 'reply':
$event = new CRM_Mailing_Event_BAO_Reply();
$this->_job_id,
$this->_is_distinct
);
- break;
case 'unsubscribe':
$event = new CRM_Mailing_Event_BAO_Unsubscribe();
$this->_job_id,
$this->_is_distinct
);
- break;
case 'optout':
$event = new CRM_Mailing_Event_BAO_Unsubscribe();
$this->_is_distinct,
FALSE
);
- break;
case 'click':
$event = new CRM_Mailing_Event_BAO_TrackableURLOpen();
$this->_is_distinct,
$this->_url_id
);
- break;
default:
return 0;
$this->_job_id, $this->_is_distinct,
$offset, $rowCount, $sort
);
- break;
case 'opened':
return CRM_Mailing_Event_BAO_Opened::getRows($this->_mailing_id,
$this->_job_id, $this->_is_distinct,
$offset, $rowCount, $sort
);
- break;
case 'bounce':
return CRM_Mailing_Event_BAO_Bounce::getRows($this->_mailing_id,
$this->_job_id, $this->_is_distinct,
$offset, $rowCount, $sort
);
- break;
case 'forward':
return CRM_Mailing_Event_BAO_Forward::getRows($this->_mailing_id,
$this->_job_id, $this->_is_distinct,
$offset, $rowCount, $sort
);
- break;
case 'unsubscribe':
return CRM_Mailing_Event_BAO_Unsubscribe::getRows($this->_mailing_id,
$this->_job_id, $this->_is_distinct,
$offset, $rowCount, $sort, TRUE
);
- break;
case 'optout':
return CRM_Mailing_Event_BAO_Unsubscribe::getRows($this->_mailing_id,
$this->_job_id, $this->_is_distinct,
$offset, $rowCount, $sort, FALSE
);
- break;
case 'click':
return CRM_Mailing_Event_BAO_TrackableURLOpen::getRows(
$this->_is_distinct, $this->_url_id,
$offset, $rowCount, $sort
);
- break;
default:
return NULL;
case CRM_Utils_Type::T_FLOAT:
$this->_columns[$tableName][$fieldGrp][$fieldName]['operatorType'] = CRM_Report_Form::OP_FLOAT;
break;
+
case CRM_Utils_Type::T_INT:
$this->_columns[$tableName][$fieldGrp][$fieldName]['operatorType'] = CRM_Report_Form::OP_INT;
break;
+
case CRM_Utils_Type::T_DATE:
$this->_columns[$tableName][$fieldGrp][$fieldName]['operatorType'] = CRM_Report_Form::OP_DATE;
break;
+
case CRM_Utils_Type::T_BOOLEAN:
$this->_columns[$tableName][$fieldGrp][$fieldName]['operatorType'] = CRM_Report_Form::OP_SELECT;
if (!array_key_exists('options', $this->_columns[$tableName][$fieldGrp][$fieldName])) {
);
}
break;
+
default:
if ($daoOrBaoName &&
array_key_exists('pseudoconstant', $this->_columns[$tableName][$fieldGrp][$fieldName])
'nll' => ts('Is empty (Null)'),
'nnll' => ts('Is not empty (Null)'),
);
- break;
case CRM_Report_Form::OP_SELECT:
return array(
'in' => ts('Is one of'),
'notin' => ts('Is not one of'),
);
- break;
case CRM_Report_Form::OP_DATE:
return array(
'nll' => ts('Is empty (Null)'),
'nnll' => ts('Is not empty (Null)'),
);
- break;
case CRM_Report_Form::OP_MULTISELECT_SEPARATOR:
// use this operator for the values, concatenated with separator. For e.g if
$caseId = $event->object->case_id;
}
break;
+
case 'Case':
// by the time we get the post-delete event, the record is gone, so
// there's nothing to analyze
$caseId = $event->id;
}
break;
+
default:
throw new \CRM_Core_Exception("CRM_Case_Listener does not support entity {$event->entity}");
}
case '--phpunit-json':
$parser = array('\Civi\CiUtil\PHPUnitParser', 'parseJsonResults');
break;
+
case '--jenkins-xml':
$parser = array('\Civi\CiUtil\JenkinsParser', 'parseXmlResults');
break;
+
case '--csv':
$parser = array('\Civi\CiUtil\CSVParser', 'parseResults');
break;
+
case '--out=txt':
$printerType = 'txt';
break;
+
case '--out=csv':
$printerType = 'csv';
break;
+
default:
$suites[] = array(
'file' => $argv[$i],
switch (strtolower(substr($memString, -1))) {
case "k":
return round(substr($memString, 0, -1) * 1024);
+
case "m":
return round(substr($memString, 0, -1) * 1024 * 1024);
+
case "g":
return round(substr($memString, 0, -1) * 1024 * 1024 * 1024);
+
default:
return round($memString);
}
case 'getfields':
$values = _civicrm_api_get_fields($entity, FALSE, $apiRequest['params']);
return civicrm_api3_create_success($values, $apiRequest['params'], $entity, 'getfields');
+
case 'create':
case 'update':
case 'replace':
case 'Mailing':
$tokens = array_merge(CRM_Core_SelectValues::mailingTokens(), $tokens);
break;
+
case 'ScheduleEventReminder':
$tokens = array_merge(CRM_Core_SelectValues::activityTokens(), $tokens);
$tokens = array_merge(CRM_Core_SelectValues::eventTokens(), $tokens);
$tokens = array_merge(CRM_Core_SelectValues::membershipTokens(), $tokens);
break;
+
case 'ManageEventScheduleReminder':
$tokens = array_merge(CRM_Core_SelectValues::eventTokens(), $tokens);
break;
$detail => CRM_Mailing_Event_BAO_Delivered::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']),
);
break;
+
case 'Bounces':
$stats[$params['mailing_id']] += array(
$detail => CRM_Mailing_Event_BAO_Bounce::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']),
);
break;
+
case 'Unsubscribers':
$stats[$params['mailing_id']] += array(
$detail => CRM_Mailing_Event_BAO_Unsubscribe::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, NULL, $params['date']),
);
break;
+
case 'Unique Clicks':
$stats[$params['mailing_id']] += array(
$detail => CRM_Mailing_Event_BAO_TrackableURLOpen::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, NULL, $params['date']),
);
break;
+
case 'Opened':
$stats[$params['mailing_id']] += array(
$detail => CRM_Mailing_Event_BAO_Opened::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']),
),
);
break;
+
case 'total unique clicks':
$result = CRM_Mailing_Event_BAO_TrackableURLOpen::getRows($mailingAB['mailing_id_a'], NULL, TRUE, 0, 1, "civicrm_mailing_event_trackable_url_open.time_stamp ASC");
$startDate = CRM_Utils_Date::processDate($result[0]['date']);
),
);
break;
+
case 'total clicks on a particular link':
if (empty($params['target_url'])) {
throw new API_Exception("Provide url to get stats result for total clicks on a particular link");