//set the appropriate action
$url = CRM_Utils_System::currentPath();
$urlArray = explode('/', $url);
- $seachPath = array_pop($urlArray);
+ $searchPath = array_pop($urlArray);
$searchType = 'basic';
$this->_action = CRM_Core_Action::BASIC;
- switch ($seachPath) {
+ switch ($searchPath) {
case 'basic':
- $searchType = $seachPath;
+ $searchType = $searchPath;
$this->_action = CRM_Core_Action::BASIC;
break;
case 'advanced':
- $searchType = $seachPath;
+ $searchType = $searchPath;
$this->_action = CRM_Core_Action::ADVANCED;
break;
case 'builder':
- $searchType = $seachPath;
+ $searchType = $searchPath;
$this->_action = CRM_Core_Action::PROFILE;
break;
case 'custom':
$this->_action = CRM_Core_Action::COPY;
- $searchType = $seachPath;
+ $searchType = $searchPath;
break;
}
) = CRM_Utils_Date::setDateDefaults($defaults['activity_date_time'], 'activityDateTime');
}
- //set the assigneed contact count to template
+ //set the assignee contact count to template
if (!empty($defaults['assignee_contact'])) {
$this->assign('assigneeContactCount', count($defaults['assignee_contact']));
}
);
$activities = array_keys($activities);
$activities = $activities[0];
- $editUrl = CRM_Utils_System::url('civicrm/case/activity',
+ $editUrl = CRM_Utils_System::url('civicrm/case/activity',
"reset=1&cid={$this->_currentlyViewedContactId}&caseid={$this->_caseId}&action=update&id={$activities}"
);
}
unset($aTypes[$openCaseID]);
asort($aTypes);
$this->_fields['followup_activity_type_id']['attributes'] = array(
- '' => '- select activity type -') + $aTypes;
+ '' => '- select activity type -'
+ ) + $aTypes;
}
$result = parent::buildQuickForm();
}
if ($this->_action & CRM_Core_Action::RENEW) {
- $statusMsg = NULL;
- $params = array('id' => $this->_activityId);
+ $statusMsg = NULL;
+ $params = array('id' => $this->_activityId);
$activityRestore = CRM_Activity_BAO_Activity::restoreActivity($params);
if ($activityRestore) {
$statusMsg = ts('The selected activity has been restored.<br />');
);
}
- // assigning formated value
+ // assigning formatted value
if (CRM_Utils_Array::value('assignee_contact_id', $params)) {
$params['assignee_contact_id'] = explode(',', $params['assignee_contact_id']);
}
// unset params intended for activities only
unset($caseParams['subject'], $caseParams['details'],
- $caseParams['status_id'], $caseParams['custom']
+ $caseParams['status_id'], $caseParams['custom']
);
$case = CRM_Case_BAO_Case::create($caseParams);
$activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name');
$assigneeID = CRM_Utils_Array::key('Activity Assignees', $activityContacts);
if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'activity_assignee_notification'
- )) {
+ 'activity_assignee_notification'
+ )
+ ) {
$selectedContacts[] = 'assignee_contact_id';
}
}
if (!CRM_Utils_array::crmIsEmptyArray($mailToContacts)) {
- //include attachments while sendig a copy of activity.
+ //include attachments while sending a copy of activity.
$attachments = CRM_Core_BAO_File::getEntityFile('civicrm_activity',
$activity->id
);
- $ics = new CRM_Activity_BAO_ICalendar( $activity );
- $ics->addAttachment( $attachments, $mailToContacts );
+ $ics = new CRM_Activity_BAO_ICalendar($activity);
+ $ics->addAttachment($attachments, $mailToContacts);
$result = CRM_Case_BAO_Case::sendActivityCopy($this->_currentlyViewedContactId,
$activity->id, $mailToContacts, $attachments, $this->_caseId
}
CRM_Core_Session::setStatus('', ts("'%1' activity has been %2. %3 %4",
- array(
- 1 => $this->_activityTypeName,
- 2 => $recordStatus,
- 3 => $followupStatus,
- 4 => $mailStatus
- )
- ), 'info');
+ array(
+ 1 => $this->_activityTypeName,
+ 2 => $recordStatus,
+ 3 => $followupStatus,
+ 4 => $mailStatus
+ )
+ ), 'info');
}
}