Commit be2fb01f authored by colemanw's avatar colemanw Committed by eileen

Short array syntax - auto-format CRM directory

parent c2be63a9

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -44,7 +44,7 @@ class CRM_Activity_Form_ActivityFilter extends CRM_Core_Form {
$this->add('select', 'activity_type_exclude_filter_id', ts('Exclude'), $activityOptions, FALSE, ['class' => 'crm-select2', 'multiple' => TRUE, 'placeholder' => ts('- no types excluded -')]);
$this->addDatePickerRange('activity_date_time', ts('Date'));
$this->addSelect('status_id',
array('entity' => 'activity', 'multiple' => 'multiple', 'option_url' => NULL, 'placeholder' => ts('- any -'))
['entity' => 'activity', 'multiple' => 'multiple', 'option_url' => NULL, 'placeholder' => ts('- any -')]
);
$this->assign('suppressForm', TRUE);
......@@ -61,7 +61,7 @@ class CRM_Activity_Form_ActivityFilter extends CRM_Core_Form {
*/
public function setDefaultValues() {
// CRM-11761 retrieve user's activity filter preferences
$defaults = array();
$defaults = [];
if (Civi::settings()->get('preserve_activity_tab_filter') && (CRM_Core_Session::getLoggedInContactID())) {
$defaults = Civi::contactSettings()->get('activity_tab_filter');
}
......
......@@ -49,13 +49,13 @@ class CRM_Activity_Form_ActivityLinks extends CRM_Core_Form {
}
$urlParams = "action=add&reset=1&cid={$contactId}&selectedChild=activity&atype=";
$allTypes = CRM_Utils_Array::value('values', civicrm_api3('OptionValue', 'get', array(
$allTypes = CRM_Utils_Array::value('values', civicrm_api3('OptionValue', 'get', [
'option_group_id' => 'activity_type',
'is_active' => 1,
'options' => array('limit' => 0, 'sort' => 'weight'),
)));
'options' => ['limit' => 0, 'sort' => 'weight'],
]));
$activityTypes = array();
$activityTypes = [];
foreach ($allTypes as $act) {
$url = 'civicrm/activity/add';
......@@ -78,16 +78,16 @@ class CRM_Activity_Form_ActivityLinks extends CRM_Core_Form {
}
// Check for existence of a mobile phone and ! do not SMS privacy setting
try {
$phone = civicrm_api3('Phone', 'getsingle', array(
$phone = civicrm_api3('Phone', 'getsingle', [
'contact_id' => $contactId,
'phone_type_id' => CRM_Core_PseudoConstant::getKey('CRM_Core_BAO_Phone', 'phone_type_id', 'Mobile'),
'return' => array('phone', 'contact_id'),
'options' => array('limit' => 1, 'sort' => "is_primary DESC"),
'api.Contact.getsingle' => array(
'return' => ['phone', 'contact_id'],
'options' => ['limit' => 1, 'sort' => "is_primary DESC"],
'api.Contact.getsingle' => [
'id' => '$value.contact_id',
'return' => 'do_not_sms',
),
));
],
]);
}
catch (CiviCRM_API3_Exception $e) {
continue;
......@@ -108,7 +108,7 @@ class CRM_Activity_Form_ActivityLinks extends CRM_Core_Form {
$act['url'] = CRM_Utils_System::url($url,
"{$urlParams}{$act['value']}", FALSE, NULL, FALSE
);
$act += array('icon' => 'fa-plus-square-o');
$act += ['icon' => 'fa-plus-square-o'];
$activityTypes[$act['value']] = $act;
}
......
......@@ -53,11 +53,11 @@ class CRM_Activity_Form_ActivityView extends CRM_Core_Form {
}
$session = CRM_Core_Session::singleton();
if (!in_array($context, array(
if (!in_array($context, [
'home',
'dashlet',
'dashletFullscreen',
))
])
) {
$url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$cid}&selectedChild=activity");
}
......@@ -66,8 +66,8 @@ class CRM_Activity_Form_ActivityView extends CRM_Core_Form {
}
$session->pushUserContext($url);
$defaults = array();
$params = array('id' => $activityId);
$defaults = [];
$params = ['id' => $activityId];
CRM_Activity_BAO_Activity::retrieve($params, $defaults);
// Set activity type name and description to template.
......@@ -123,14 +123,14 @@ class CRM_Activity_Form_ActivityView extends CRM_Core_Form {
* Build the form object.
*/
public function buildQuickForm() {
$this->addButtons(array(
array(
$this->addButtons([
[
'type' => 'cancel',
'name' => ts('Done'),
'spacing' => '         ',
'isDefault' => TRUE,
),
)
],
]
);
}
......
......@@ -198,16 +198,16 @@ class CRM_Activity_Form_Search extends CRM_Core_Form_Search {
if (!empty($_POST)) {
$this->_formValues = $this->controller->exportValues($this->_name);
$specialParams = array(
$specialParams = [
'activity_type_id',
'status_id',
'priority_id',
'activity_text',
);
$changeNames = array(
];
$changeNames = [
'status_id' => 'activity_status_id',
'priority_id' => 'activity_priority_id',
);
];
CRM_Contact_BAO_Query::processSpecialFormValue($this->_formValues, $specialParams, $changeNames);
}
......
......@@ -57,7 +57,7 @@ class CRM_Activity_Form_Task extends CRM_Core_Form_Task {
* @param CRM_Core_Form $form
*/
public static function preProcessCommon(&$form) {
$form->_activityHolderIds = array();
$form->_activityHolderIds = [];
$values = $form->controller->exportValues($form->get('searchFormName'));
......@@ -65,7 +65,7 @@ class CRM_Activity_Form_Task extends CRM_Core_Form_Task {
$activityTasks = CRM_Activity_Task::tasks();
$form->assign('taskName', $activityTasks[$form->_task]);
$ids = array();
$ids = [];
if ($values['radio_ts'] == 'ts_sel') {
foreach ($values as $name => $value) {
if (substr($name, 0, CRM_Core_Form::CB_PREFIX_LEN) == CRM_Core_Form::CB_PREFIX) {
......@@ -85,7 +85,7 @@ class CRM_Activity_Form_Task extends CRM_Core_Form_Task {
$activityClause = NULL;
$components = CRM_Core_Component::getNames();
$componentClause = array();
$componentClause = [];
foreach ($components as $componentID => $componentName) {
if ($componentName != 'CiviCase' && !CRM_Core_Permission::check("access $componentName")) {
$componentClause[] = " (activity_type.component_id IS NULL OR activity_type.component_id <> {$componentID}) ";
......@@ -163,17 +163,17 @@ WHERE activity_id IN ( $IDs ) AND
* @param bool $submitOnce
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons(array(
array(
$this->addButtons([
[
'type' => $nextType,
'name' => $title,
'isDefault' => TRUE,
),
array(
],
[
'type' => $backType,
'name' => ts('Cancel'),
),
));
],
]);
}
}
......@@ -71,7 +71,7 @@ class CRM_Activity_Form_Task_AddToTag extends CRM_Activity_Form_Task {
}
public function addRules() {
$this->addFormRule(array('CRM_Activity_Form_Task_AddToTag', 'formRule'));
$this->addFormRule(['CRM_Activity_Form_Task_AddToTag', 'formRule']);
}
/**
......@@ -81,7 +81,7 @@ class CRM_Activity_Form_Task_AddToTag extends CRM_Activity_Form_Task {
* @return array
*/
public static function formRule($form, $rule) {
$errors = array();
$errors = [];
if (empty($form['tag']) && empty($form['activity_taglist'])) {
$errors['_qf_default'] = ts("Please select at least one tag.");
}
......@@ -94,7 +94,7 @@ class CRM_Activity_Form_Task_AddToTag extends CRM_Activity_Form_Task {
public function postProcess() {
// Get the submitted values in an array.
$params = $this->controller->exportValues($this->_name);
$activityTags = $tagList = array();
$activityTags = $tagList = [];
// check if contact tags exists
if (!empty($params['tag'])) {
......@@ -131,22 +131,22 @@ class CRM_Activity_Form_Task_AddToTag extends CRM_Activity_Form_Task {
// merge activity and taglist tags
$allTags = CRM_Utils_Array::crmArrayMerge($activityTags, $tagList);
$this->_name = array();
$this->_name = [];
foreach ($allTags as $key => $dnc) {
$this->_name[] = $this->_tags[$key];
list($total, $added, $notAdded) = CRM_Core_BAO_EntityTag::addEntitiesToTag($this->_activityHolderIds, $key,
'civicrm_activity', FALSE);
$status = array(ts('Activity tagged', array('count' => $added, 'plural' => '%count activities tagged')));
$status = [ts('Activity tagged', ['count' => $added, 'plural' => '%count activities tagged'])];
if ($notAdded) {
$status[] = ts('1 activity already had this tag', array(
$status[] = ts('1 activity already had this tag', [
'count' => $notAdded,
'plural' => '%count activities already had this tag',
));
]);
}
$status = '<ul><li>' . implode('</li><li>', $status) . '</li></ul>';
CRM_Core_Session::setStatus($status, ts("Added Tag <em>%1</em>", array(1 => $this->_tags[$key])), 'success', array('expires' => 0));
CRM_Core_Session::setStatus($status, ts("Added Tag <em>%1</em>", [1 => $this->_tags[$key]]), 'success', ['expires' => 0]);
}
}
......
......@@ -62,7 +62,7 @@ class CRM_Activity_Form_Task_Batch extends CRM_Activity_Form_Task {
parent::preProcess();
// Get the contact read only fields to display.
$readOnlyFields = array_merge(array('sort_name' => ts('Added By'), 'target_sort_name' => ts('With Contact')),
$readOnlyFields = array_merge(['sort_name' => ts('Added By'), 'target_sort_name' => ts('With Contact')],
CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'contact_autocomplete_options',
TRUE, NULL, FALSE, 'name', TRUE
......@@ -101,12 +101,12 @@ class CRM_Activity_Form_Task_Batch extends CRM_Activity_Form_Task {
CRM_Utils_System::setTitle($this->_title);
$this->addDefaultButtons(ts('Save'));
$this->_fields = array();
$this->_fields = [];
$this->_fields = CRM_Core_BAO_UFGroup::getFields($ufGroupId, FALSE, CRM_Core_Action::VIEW);
// remove file type field and then limit fields
$suppressFields = FALSE;
$removehtmlTypes = array('File');
$removehtmlTypes = ['File'];
foreach ($this->_fields as $name => $field) {
if (CRM_Core_BAO_CustomField::getKeyID($name) &&
in_array($this->_fields[$name]['html_type'], $removehtmlTypes)
......@@ -124,24 +124,24 @@ class CRM_Activity_Form_Task_Batch extends CRM_Activity_Form_Task {
$this->_fields = array_slice($this->_fields, 0, $this->_maxFields);
$this->addButtons(array(
array(
$this->addButtons([
[
'type' => 'submit',
'name' => ts('Update Activities'),
'isDefault' => TRUE,
),
array(
],
[
'type' => 'cancel',
'name' => ts('Cancel'),
),
));
],
]);
$this->assign('profileTitle', $this->_title);
$this->assign('componentIds', $this->_activityHolderIds);
// Load all campaigns.
if (array_key_exists('activity_campaign_id', $this->_fields)) {
$this->_componentCampaigns = array();
$this->_componentCampaigns = [];
CRM_Core_PseudoConstant::populate($this->_componentCampaigns,
'CRM_Activity_DAO_Activity',
TRUE, 'campaign_id', 'id',
......@@ -153,7 +153,7 @@ class CRM_Activity_Form_Task_Batch extends CRM_Activity_Form_Task {
// It is possible to have fields that are required in CiviCRM not be required in the
// profile. Overriding that here. Perhaps a better approach would be to
// make them required in the schema & read that up through getFields functionality.
$requiredFields = array('activity_date_time');
$requiredFields = ['activity_date_time'];
foreach ($this->_activityHolderIds as $activityId) {
$typeId = CRM_Core_DAO::getFieldValue("CRM_Activity_DAO_Activity", $activityId, 'activity_type_id');
......@@ -201,7 +201,7 @@ class CRM_Activity_Form_Task_Batch extends CRM_Activity_Form_Task {
return;
}
$defaults = array();
$defaults = [];
foreach ($this->_activityHolderIds as $activityId) {
CRM_Core_BAO_UFGroup::setProfileDefaults(NULL, $this->_fields, $defaults, FALSE, $activityId, 'Activity');
}
......
......@@ -76,12 +76,12 @@ class CRM_Activity_Form_Task_Delete extends CRM_Activity_Form_Task {
}
if ($deleted) {
$msg = ts('%count activity deleted.', array('plural' => '%count activities deleted.', 'count' => $deleted));
$msg = ts('%count activity deleted.', ['plural' => '%count activities deleted.', 'count' => $deleted]);
CRM_Core_Session::setStatus($msg, ts('Removed'), 'success');
}
if ($failed) {
CRM_Core_Session::setStatus(ts('1 could not be deleted.', array('plural' => '%count could not be deleted.', 'count' => $failed)), ts('Error'), 'error');
CRM_Core_Session::setStatus(ts('1 could not be deleted.', ['plural' => '%count could not be deleted.', 'count' => $failed]), ts('Error'), 'error');
}
}
......
......@@ -68,7 +68,7 @@ class CRM_Activity_Form_Task_FileOnCase extends CRM_Activity_Form_Task {
* Build the form object.
*/
public function buildQuickForm() {
$this->addEntityRef('unclosed_case_id', ts('Select Case'), array('entity' => 'Case'), TRUE);
$this->addEntityRef('unclosed_case_id', ts('Select Case'), ['entity' => 'Case'], TRUE);
$this->addDefaultButtons(ts('Save'));
}
......@@ -80,8 +80,8 @@ class CRM_Activity_Form_Task_FileOnCase extends CRM_Activity_Form_Task {
$caseId = $formparams['unclosed_case_id'];
$filedActivities = 0;
foreach ($this->_activityHolderIds as $key => $id) {
$targetContactValues = $defaults = array();
$params = array('id' => $id);
$targetContactValues = $defaults = [];
$params = ['id' => $id];
CRM_Activity_BAO_Activity::retrieve($params, $defaults);
if (CRM_Case_BAO_Case::checkPermission($id, 'File On Case', $defaults['activity_type_id'])) {
......@@ -92,13 +92,13 @@ class CRM_Activity_Form_Task_FileOnCase extends CRM_Activity_Form_Task {
$targetContactValues = implode(',', array_keys($targetContactValues));
}
$params = array(
$params = [
'caseID' => $caseId,
'activityID' => $id,
'newSubject' => empty($defaults['subject']) ? '' : $defaults['subject'],
'targetContactIds' => $targetContactValues,
'mode' => 'file',
);
];
$error_msg = CRM_Activity_Page_AJAX::_convertToCaseActivity($params);
if (empty($error_msg['error_msg'])) {
......@@ -109,16 +109,16 @@ class CRM_Activity_Form_Task_FileOnCase extends CRM_Activity_Form_Task {
}
}
else {
CRM_Core_Session::setStatus(ts('Not permitted to file activity %1 %2.', array(
CRM_Core_Session::setStatus(ts('Not permitted to file activity %1 %2.', [
1 => empty($defaults['subject']) ? '' : $defaults['subject'],
2 => $defaults['activity_date_time'],
)),
]),
ts("Error"), "error");
}
}
CRM_Core_Session::setStatus($filedActivities, ts("Filed Activities"), "success");
CRM_Core_Session::setStatus("", ts('Total Selected Activities: %1', array(1 => count($this->_activityHolderIds))), "info");
CRM_Core_Session::setStatus("", ts('Total Selected Activities: %1', [1 => count($this->_activityHolderIds)]), "info");
}
}
......@@ -73,10 +73,10 @@ class CRM_Activity_Form_Task_PickOption extends CRM_Activity_Form_Task {
$validate = FALSE;
//validations
if (count($this->_activityHolderIds) > $this->_maxActivities) {
CRM_Core_Session::setStatus(ts("The maximum number of Activities you can select to send an email is %1. You have selected %2. Please select fewer Activities from your search results and try again.", array(
CRM_Core_Session::setStatus(ts("The maximum number of Activities you can select to send an email is %1. You have selected %2. Please select fewer Activities from your search results and try again.", [
1 => $this->_maxActivities,
2 => count($this->_activityHolderIds),
)), ts("Maximum Exceeded"), "error");
]), ts("Maximum Exceeded"), "error");
$validate = TRUE;
}
// then redirect
......@@ -92,7 +92,7 @@ class CRM_Activity_Form_Task_PickOption extends CRM_Activity_Form_Task {
$this->addElement('checkbox', 'with_contact', ts('With Contact'));
$this->addElement('checkbox', 'assigned_to', ts('Assigned to Contact'));
$this->addElement('checkbox', 'created_by', ts('Created by'));
$this->setDefaults(array('with_contact' => 1));
$this->setDefaults(['with_contact' => 1]);
$this->addDefaultButtons(ts('Continue'));
}
......@@ -100,7 +100,7 @@ class CRM_Activity_Form_Task_PickOption extends CRM_Activity_Form_Task {
* Add local and global form rules.
*/
public function addRules() {
$this->addFormRule(array('CRM_Activity_Form_Task_PickOption', 'formRule'));
$this->addFormRule(['CRM_Activity_Form_Task_PickOption', 'formRule']);
}
/**
......@@ -117,7 +117,7 @@ class CRM_Activity_Form_Task_PickOption extends CRM_Activity_Form_Task {
!isset($fields['assigned_to']) &&
!isset($fields['created_by'])
) {
return array('with_contact' => ts('You must select at least one email recipient type.'));
return ['with_contact' => ts('You must select at least one email recipient type.')];
}
return TRUE;
}
......@@ -129,7 +129,7 @@ class CRM_Activity_Form_Task_PickOption extends CRM_Activity_Form_Task {
// Clear any formRule errors from Email form in case they came back here via Cancel button
$this->controller->resetPage('Email');
$params = $this->exportValues();
$this->_contacts = array();
$this->_contacts = [];
$activityContacts = CRM_Activity_BAO_ActivityContact::buildOptions('record_type_id', 'validate');
$assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts);
......
......@@ -68,10 +68,10 @@ class CRM_Activity_Form_Task_PickProfile extends CRM_Activity_Form_Task {
$validate = FALSE;
// Validations.
if (count($this->_activityHolderIds) > $this->_maxActivities) {
CRM_Core_Session::setStatus(ts("The maximum number of activities you can select for Update multiple activities is %1. You have selected %2. Please select fewer Activities from your search results and try again.", array(
CRM_Core_Session::setStatus(ts("The maximum number of activities you can select for Update multiple activities is %1. You have selected %2. Please select fewer Activities from your search results and try again.", [
1 => $this->_maxActivities,
2 => count($this->_activityHolderIds),
)), ts('Maximum Exceeded'), 'error');
]), ts('Maximum Exceeded'), 'error');
$validate = TRUE;
}
......@@ -85,11 +85,11 @@ class CRM_Activity_Form_Task_PickProfile extends CRM_Activity_Form_Task {
* Build the form object.
*/
public function buildQuickForm() {
$types = array('Activity');
$types = ['Activity'];
$profiles = CRM_Core_BAO_UFGroup::getProfiles($types, TRUE);
$activityTypeIds = array_flip(CRM_Core_PseudoConstant::activityType(TRUE, FALSE, FALSE, 'name'));
$nonEditableActivityTypeIds = array(
$nonEditableActivityTypeIds = [
$activityTypeIds['Email'],
$activityTypeIds['Bulk Email'],
$activityTypeIds['Contribution'],
......@@ -99,7 +99,7 @@ class CRM_Activity_Form_Task_PickProfile extends CRM_Activity_Form_Task {
$activityTypeIds['Membership Renewal'],
$activityTypeIds['Event Registration'],
$activityTypeIds['Pledge Acknowledgment'],
);
];
$notEditable = FALSE;
foreach ($this->_activityHolderIds as $activityId) {
$typeId = CRM_Core_DAO::getFieldValue("CRM_Activity_DAO_Activity", $activityId, 'activity_type_id');
......@@ -110,7 +110,7 @@ class CRM_Activity_Form_Task_PickProfile extends CRM_Activity_Form_Task {
}
if (empty($profiles)) {
CRM_Core_Session::setStatus(ts("You will need to create a Profile containing the %1 fields you want to edit before you can use Update multiple activities. Navigate to Administer > Customize Data and Screens > Profiles to configure a Profile. Consult the online Administrator documentation for more information.", array(1 => $types[0])), ts("No Profile Configured"), "alert");
CRM_Core_Session::setStatus(ts("You will need to create a Profile containing the %1 fields you want to edit before you can use Update multiple activities. Navigate to Administer > Customize Data and Screens > Profiles to configure a Profile. Consult the online Administrator documentation for more information.", [1 => $types[0]]), ts("No Profile Configured"), "alert");
CRM_Utils_System::redirect($this->_userContext);
}
elseif ($notEditable) {
......@@ -119,9 +119,9 @@ class CRM_Activity_Form_Task_PickProfile extends CRM_Activity_Form_Task {
}
$ufGroupElement = $this->add('select', 'uf_group_id', ts('Select Profile'),
array(
[
'' => ts('- select profile -'),
) + $profiles, TRUE
] + $profiles, TRUE
);
$this->addDefaultButtons(ts('Continue'));
}
......@@ -130,7 +130,7 @@ class CRM_Activity_Form_Task_PickProfile extends CRM_Activity_Form_Task {
* Add local and global form rules.
*/
public function addRules() {
$this->addFormRule(array('CRM_Activity_Form_Task_PickProfile', 'formRule'));
$this->addFormRule(['CRM_Activity_Form_Task_PickProfile', 'formRule']);
}
/**
......
......@@ -71,18 +71,18 @@ class CRM_Activity_Form_Task_Print extends CRM_Activity_Form_Task {
public function buildQuickForm() {
// just need to add a javacript to popup the window for printing
$this->addButtons(array(
array(
$this->addButtons([
[
'type' => 'next',
'name' => ts('Print Activities'),
'js' => array('onclick' => 'window.print()'),
'js' => ['onclick' => 'window.print()'],
'isDefault' => TRUE,
),
array(
],
[
'type' => 'back',
'name' => ts('Done'),
),
));
],
]);
}
}
......@@ -67,7 +67,7 @@ class CRM_Activity_Form_Task_RemoveFromTag extends CRM_Activity_Form_Task {
}
public function addRules() {
$this->addFormRule(array('CRM_Activity_Form_Task_RemoveFromTag', 'formRule'));
$this->addFormRule(['CRM_Activity_Form_Task_RemoveFromTag', 'formRule']);
}
/**
......@@ -77,7 +77,7 @@ class CRM_Activity_Form_Task_RemoveFromTag extends CRM_Activity_Form_Task {
* @return array
*/
public static function formRule($form, $rule) {
$errors = array();
$errors = [];
if (empty($form['tag']) && empty($form['activity_taglist'])) {
$errors['_qf_default'] = "Please select atleast one tag.";
}
......@@ -91,7 +91,7 @@ class CRM_Activity_Form_Task_RemoveFromTag extends CRM_Activity_Form_Task {
//get the submitted values in an array
$params = $this->controller->exportValues($this->_name);
$activityTags = $tagList = array();
$activityTags = $tagList = [];
// check if contact tags exists
if (!empty($params['tag'])) {
......@@ -120,27 +120,27 @@ class CRM_Activity_Form_Task_RemoveFromTag extends CRM_Activity_Form_Task {
// merge contact and taglist tags
$allTags = CRM_Utils_Array::crmArrayMerge($activityTags, $tagList);
$this->_name = array();
$this->_name = [];
foreach ($allTags as $key => $dnc) {
$this->_name[] = $this->_tags[$key];
list($total, $removed, $notRemoved) = CRM_Core_BAO_EntityTag::removeEntitiesFromTag($this->_activityHolderIds,
$key, 'civicrm_activity', FALSE);
$status = array(
ts('%count activity un-tagged', array(
$status = [
ts('%count activity un-tagged', [
'count' => $removed,
'plural' => '%count activities un-tagged',
)),
);
]),
];
if ($notRemoved) {
$status[] = ts('1 activity already did not have this tag', array(
$status[] = ts('1 activity already did not have this tag', [
'count' => $notRemoved,
'plural' => '%count activities already did not have this tag',
));
]);
}
$status = '<ul><li>' . implode('</li><li>', $status) . '</li></ul>';
CRM_Core_Session::setStatus($status, ts("Removed Tag <em>%1</em>", array(1 => $this->_tags[$key])), 'success', array('expires' => 0));
CRM_Core_Session::setStatus($status, ts(