$urlString = 'civicrm/contact/search/advanced';
}
elseif ($path == 'civicrm/group/search'
- || $path == 'civicrm/contact/search'
+ || $path == 'civicrm/contact/search'
|| $path == 'civicrm/contact/search/advanced'
|| $path == 'civicrm/contact/search/custom'
|| $path == 'civicrm/group/search') {
CRM_Campaign_BAO_Campaign::accessCampaign()
) {
$buildEngagementLevel = TRUE;
- $this->addSelect('engagement_level',array('entity' => 'activity'));
+ $this->addSelect('engagement_level', array('entity' => 'activity'));
$this->addRule('engagement_level',
ts('Please enter the engagement index as a number (integers only).'),
'positiveInteger'
list($name, $phone, $doNotSMS) = CRM_Contact_BAO_Contact_Location::getPhoneDetails($contactId, $mobileTypeID);
if (!$doNotSMS && $phone) {
- $sendSMS = array($SMSId => ts('Send SMS'));
+ $sendSMS = array($SMSId => ts('Send SMS'));
$activityTypes += $sendSMS;
}
}
"{$urlParams}{$typeId}", FALSE, NULL, FALSE
);
}
- elseif ($typeId == $SMSId) {
+ elseif ($typeId == $SMSId) {
$urls[$typeId] = CRM_Utils_System::url('civicrm/activity/sms/add',
"{$urlParams}{$typeId}", FALSE, NULL, FALSE
);
- }
+ }
elseif ($typeId == $letterTypeId) {
$urls[$typeId] = CRM_Utils_System::url('civicrm/activity/pdf/add',
"{$urlParams}{$typeId}", FALSE, NULL, FALSE
$full_open_report = CRM_Mailing_Event_BAO_Opened::getRows(
$this->_mailing_id, NULL, FALSE, NULL, NULL, NULL, $cid);
- $this->assign('openreport',$full_open_report);
+ $this->assign('openreport', $full_open_report);
$click_thru_report = CRM_Mailing_Event_BAO_TrackableURLOpen::getRows( $this->_mailing_id, NULL, FALSE, NULL, NULL, NULL, NULL, $cid);
- $this->assign('clickreport',$click_thru_report);
+ $this->assign('clickreport', $click_thru_report);
}
foreach ($defaults as $key => $value) {
if ($dateHigh) {
// Activity date time assumes midnight at the beginning of the date
// This sets it to almost midnight at the end of the date
- /* if ($dateHigh <= 99999999) {
+ /* if ($dateHigh <= 99999999) {
$dateHigh = 1000000 * $dateHigh + 235959;
} */
$dateHigh = date('m/d/Y', strtotime($dateHigh));
while ($result->fetch()) {
if(!empty($result->activity_id)) {
- $ids[] = $result->activity_id;
+ $ids[] = $result->activity_id;
+ }
}
}
- }
if (!empty($ids)) {
$form->_componentClause = ' civicrm_activity.id IN ( ' . implode(',', $ids) . ' ) ';
)
);
-
$this->assign('profileTitle', $this->_title);
$this->assign('componentIds', $this->_activityHolderIds);
$fileFieldExists = FALSE;
*
* @return void
*/
- public function addRules() {}
+ public function addRules() {
+ }
/**
* Process the form after the input has been submitted and validated
$dataPatterns = $this->get('dataPatterns');
$hasLocationTypes = $this->get('fieldTypes');
-
/* Initialize all field usages to false */
foreach ($mapperKeys as $key) {
//used to warn for mismatch column count or mismatch mapping
$warning = 0;
-
for ($i = 0; $i < $this->_columnCount; $i++) {
$sel = &$this->addElement('hierselect', "mapper[$i]", ts('Mapper for Field %1', array(1 => $i)), NULL);
$jsSet = FALSE;
$this->set('savedMapping', $saveMappingFields->mapping_id);
}
-
$parser = new CRM_Activity_Import_Parser_Activity($mapperKeysMain, $mapperLocType, $mapperPhoneType);
$parser->run($fileName, $seperator, $mapper, $skipColumnHeader,
CRM_Import_Parser::MODE_PREVIEW
fclose($fd);
-
if ($mode == self::MODE_PREVIEW || $mode == self::MODE_IMPORT) {
$customHeaders = $mapper;
*
* @return void
*/
- public function fini() {}
+ public function fini() {
+ }
}
$context = CRM_Utils_Type::escape(CRM_Utils_Array::value('context', $_GET), 'String');
$sortMapper = array(
- 0 => 'display_date', 1 => 'ca.subject', 2 => 'ca.activity_type_id',
- 3 => 'acc.sort_name', 4 => 'cc.sort_name', 5 => 'ca.status_id',
+ 0 => 'display_date',
+ 1 => 'ca.subject',
+ 2 => 'ca.activity_type_id',
+ 3 => 'acc.sort_name',
+ 4 => 'cc.sort_name',
+ 5 => 'ca.status_id',
);
$sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer');
public static function getCaseGlobalRelationships() {
$sortMapper = array(
- 0 => 'sort_name', 1 => 'phone', 2 => 'email',
+ 0 => 'sort_name',
+ 1 => 'phone',
+ 2 => 'email',
);
$sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer');
$contactID = CRM_Utils_Type::escape($_GET['cid'], 'Integer');
$sortMapper = array(
- 0 => 'relation', 1 => 'name', 2 => 'phone', 3 => 'email'
+ 0 => 'relation',
+ 1 => 'name',
+ 2 => 'phone',
+ 3 => 'email'
);
$sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer');
$contactID = CRM_Utils_Type::escape($_GET['cid'], 'Integer');
$sortMapper = array(
- 0 => 'relation', 1 => 'name', 2 => 'phone', 3 => 'email', 4 => 'actions'
+ 0 => 'relation',
+ 1 => 'name',
+ 2 => 'phone',
+ 3 => 'email',
+ 4 => 'actions'
);
$sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer');
$contactType = empty($row['relation_type']) ? '' : (string) CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_RelationshipType', $row['relation_type'], 'contact_type_b');
$contactType = $contactType == 'Contact' ? '' : $contactType;
switch($row['source']) {
- case 'caseRel':
- $row['actions'] =
+ case 'caseRel':
+ $row['actions'] =
'<a href="#editCaseRoleDialog" title="'. ts('Reassign %1', array(1 => $typeLabel)) .'" class="crm-hover-button case-miniform" data-contact_type="' . $contactType . '" data-rel_type="'. $row['relation_type'] .'" data-rel_id="'. $row['rel_id'] .'"data-key="'. CRM_Core_Key::get('civicrm/ajax/relation') .'">'.
'<span class="icon edit-icon"></span>'.
'</a>'.
'<a href="#deleteCaseRoleDialog" title="'. ts('Remove %1', array(1 => $typeLabel)) .'" class="crm-hover-button case-miniform" data-contact_type="' . $contactType . '" data-rel_type="'.$row['relation_type'].'" data-key="'. CRM_Core_Key::get('civicrm/ajax/delcaserole') .'">'.
'<span class="icon delete-icon"></span>'.
'</a>';
- break;
+ break;
- case 'caseRoles':
- $row['actions'] =
+ case 'caseRoles':
+ $row['actions'] =
'<a href="#editCaseRoleDialog" title="'. ts('Assign %1', array(1 => $typeLabel)) .'" class="crm-hover-button case-miniform" data-contact_type="' . $contactType . '" data-rel_type="'. $row['relation_type'] .'" data-key="'. CRM_Core_Key::get('civicrm/ajax/relation') .'">'.
'<span class="icon edit-icon"></span>'.
'</a>';
- break;
+ break;
}
}
$idx++;
}
$activityFilter = array(
- 'activity_type_filter_id' => empty($params['activity_type_id']) ? '' :
- CRM_Utils_Type::escape($params['activity_type_id'], 'Integer'),
- 'activity_type_exclude_filter_id' => empty($params['activity_type_exclude_id']) ? '' :
- CRM_Utils_Type::escape($params['activity_type_exclude_id'], 'Integer'),
+ 'activity_type_filter_id' => empty($params['activity_type_id']) ? '' : CRM_Utils_Type::escape($params['activity_type_id'], 'Integer'),
+ 'activity_type_exclude_filter_id' => empty($params['activity_type_exclude_id']) ? '' : CRM_Utils_Type::escape($params['activity_type_exclude_id'], 'Integer'),
);
CRM_Core_BAO_Setting::setItem(
$selectorElements = array(
'activity_type', 'subject', 'source_contact',
'target_contact', 'assignee_contact',
- 'activity_date', 'status','links', 'class',
+ 'activity_date', 'status', 'links', 'class',
);
echo CRM_Utils_JSON::encodeDataTableSelector($activities, $sEcho, $iTotal, $iFilteredTotal, $selectorElements);
'name'
);
-
switch ($activityTypeId) {
case $emailTypeValue:
$wrapper = new CRM_Utils_Wrapper();
}
// route behaviour of contact/view/activity based on action defined
- if ($this->_action &
- (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD | CRM_Core_Action::VIEW)
+ if ($this->_action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD | CRM_Core_Action::VIEW)
) {
$this->edit();
$activityTypeId = CRM_Utils_Request::retrieve('atype', 'Positive', $this);
*/
function __construct($contactId,
$permission,
- $admin = FALSE,
- $context = 'activity',
+ $admin = FALSE,
+ $context = 'activity',
$activityTypeIDs = NULL) {
$this->_contactId = $contactId;
$this->_permission = $permission;
* @return array
*/
public static function actionLinks($activityTypeId,
- $sourceRecordId = NULL,
+ $sourceRecordId = NULL,
$accessMailingReport = FALSE,
- $activityId = NULL,
- $key = NULL,
- $compContext = NULL) {
+ $activityId = NULL,
+ $key = NULL,
+ $compContext = NULL) {
static $activityActTypes = NULL;
//CRM-14277 added addtitional param to handle activity search
$extraParams = "&searchContext=activity";
$actionLinks = array();
if ($showView) {
- $actionLinks += array(CRM_Core_Action::VIEW => array('name' => ts('View'),
+ $actionLinks += array(CRM_Core_Action::
+ VIEW => array(
+ 'name' => ts('View'),
'url' => $url,
'qs' => $qsView,
'title' => ts('View Activity'),
$updateUrl = 'civicrm/activity/pdf/add';
}
if ( CRM_Activity_BAO_Activity::checkPermission($activityId, CRM_Core_Action::UPDATE) ) {
- $actionLinks += array(CRM_Core_Action::UPDATE => array('name' => ts('Edit'),
+ $actionLinks += array(CRM_Core_Action::
+ UPDATE => array(
+ 'name' => ts('Edit'),
'url' => $updateUrl,
'qs' => $qsUpdate,
'title' => ts('Update Activity'),
$activityTypeName &&
CRM_Case_BAO_Case::checkPermission($activityId, 'File On Case', $activityTypeId)
) {
- $actionLinks += array(CRM_Core_Action::ADD => array('name' => ts('File on Case'),
+ $actionLinks += array(CRM_Core_Action::
+ ADD => array(
+ 'name' => ts('File on Case'),
'url' => '#',
'extra' => 'onclick="javascript:fileOnCase( \'file\', \'%%id%%\', null, this ); return false;"',
'title' => ts('File on Case'),
if (!isset($delUrl) || !$delUrl) {
$delUrl = $url;
}
- $actionLinks += array(CRM_Core_Action::DELETE => array('name' => ts('Delete'),
+ $actionLinks += array(CRM_Core_Action::
+ DELETE => array(
+ 'name' => ts('Delete'),
'url' => $delUrl,
'qs' => $qsDelete,
'title' => ts('Delete Activity'),
}
if ($accessMailingReport) {
- $actionLinks += array(CRM_Core_Action::BROWSE => array('name' => ts('Mailing Report'),
+ $actionLinks += array(CRM_Core_Action::
+ BROWSE => array(
+ 'name' => ts('Mailing Report'),
'url' => 'civicrm/mailing/report',
'qs' => "mid={$sourceRecordId}&reset=1&cid=%%cid%%&context=activitySelector",
'title' => ts('View Mailing Report'),
private static function &_getColumnHeaders() {
if (!isset(self::$_columnHeaders)) {
self::$_columnHeaders = array(
- array('name' => ts('Type'),
+ array(
+ 'name' => ts('Type'),
'sort' => 'activity_type',
'direction' => CRM_Utils_Sort::DONTCARE,
),
- array('name' => ts('Subject'),
+ array(
+ 'name' => ts('Subject'),
'sort' => 'subject',
'direction' => CRM_Utils_Sort::DONTCARE,
),
- array('name' => ts('Added By'),
+ array(
+ 'name' => ts('Added By'),
'sort' => 'source_contact_name',
'direction' => CRM_Utils_Sort::DONTCARE,
),
@access public
*/
function __construct(&$queryParams,
- $action = CRM_Core_Action::NONE,
+ $action = CRM_Core_Action::NONE,
$activityClause = NULL,
- $single = FALSE,
- $limit = NULL,
- $context = 'search',
- $compContext = NULL
+ $single = FALSE,
+ $limit = NULL,
+ $context = 'search',
+ $compContext = NULL
) {
// submitted form values
$this->_queryParams = &$queryParams;
if ($this->_context == 'search') {
$row['checkbox'] = CRM_Core_Form::CB_PREFIX . $result->activity_id;
}
- $row['contact_type'] = CRM_Contact_BAO_Contact_Utils::getImage($result->contact_sub_type ?
- $result->contact_sub_type : $result->contact_type, FALSE, $result->contact_id
+ $row['contact_type'] = CRM_Contact_BAO_Contact_Utils::getImage($result->contact_sub_type ? $result->contact_sub_type : $result->contact_type, FALSE, $result->contact_id
);
$accessMailingReport = FALSE;
$activityTypeId = $row['activity_type_id'];