Commit 353ffa53 authored by totten's avatar totten

INFRA-132 - CRM/ - PHPStorm cleanup

parent 46bcf597
......@@ -258,8 +258,8 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
$dao->query($union);
$allow = array(0);
$deny = array(0);
$allow = array(0);
$deny = array(0);
$override = array();
while ($dao->fetch()) {
......@@ -333,8 +333,8 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
* @static
*/
public static function getClause($table, $id, &$tables) {
$table = CRM_Utils_Type::escape($table, 'String');
$id = CRM_Utils_Type::escape($id, 'Integer');
$table = CRM_Utils_Type::escape($table, 'String');
$id = CRM_Utils_Type::escape($id, 'Integer');
$whereTables = array();
$ssTable = CRM_Contact_BAO_SavedSearch::getTableName();
......@@ -408,10 +408,10 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
$rule = new CRM_ACL_BAO_ACL();
$acl = self::getTableName();
$acl = self::getTableName();
$contact = CRM_Contact_BAO_Contact::getTableName();
$c2g = CRM_Contact_BAO_GroupContact::getTableName();
$group = CRM_Contact_BAO_Group::getTableName();
$c2g = CRM_Contact_BAO_GroupContact::getTableName();
$group = CRM_Contact_BAO_Group::getTableName();
$query = " SELECT $acl.*
FROM $acl ";
......@@ -468,12 +468,12 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
$rule = new CRM_ACL_BAO_ACL();
$acl = self::getTableName();
$aclRole = 'civicrm_acl_role';
$acl = self::getTableName();
$aclRole = 'civicrm_acl_role';
$aclRoleJoin = CRM_ACL_DAO_EntityRole::getTableName();
$contact = CRM_Contact_BAO_Contact::getTableName();
$c2g = CRM_Contact_BAO_GroupContact::getTableName();
$group = CRM_Contact_BAO_Group::getTableName();
$contact = CRM_Contact_BAO_Contact::getTableName();
$c2g = CRM_Contact_BAO_GroupContact::getTableName();
$group = CRM_Contact_BAO_Group::getTableName();
$query = " SELECT $acl.*
FROM $acl
......@@ -532,9 +532,9 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
$rule = new CRM_ACL_BAO_ACL();
$acl = self::getTableName();
$c2g = CRM_Contact_BAO_GroupContact::getTableName();
$group = CRM_Contact_BAO_Group::getTableName();
$acl = self::getTableName();
$c2g = CRM_Contact_BAO_GroupContact::getTableName();
$group = CRM_Contact_BAO_Group::getTableName();
$results = array();
if ($contact_id) {
......@@ -581,7 +581,7 @@ SELECT $acl.*
$aclRole = 'civicrm_acl_role';
$aclER = CRM_ACL_DAO_EntityRole::getTableName();
$c2g = CRM_Contact_BAO_GroupContact::getTableName();
$c2g = CRM_Contact_BAO_GroupContact::getTableName();
$group = CRM_Contact_BAO_Group::getTableName();
$query = " SELECT $acl.*
......@@ -779,7 +779,7 @@ SELECT g.*
WHERE g.id IN ( $ids )
AND g.is_active = 1
";
$dao = CRM_Core_DAO::executeQuery($query);
$dao = CRM_Core_DAO::executeQuery($query);
$staticGroupIDs = array();
$cachedGroupIDs = array();
while ($dao->fetch()) {
......@@ -806,13 +806,13 @@ SELECT g.*
$tmpTables = array();
foreach (unserialize($dao->where_tables) as $tmpName => $tmpInfo) {
if ($tmpName == '`civicrm_group_contact-' . $dao->id . '`') {
$tmpName = '`civicrm_group_contact-ACL`';
$tmpInfo = str_replace('civicrm_group_contact-' . $dao->id, 'civicrm_group_contact-ACL', $tmpInfo);
$tmpName = '`civicrm_group_contact-ACL`';
$tmpInfo = str_replace('civicrm_group_contact-' . $dao->id, 'civicrm_group_contact-ACL', $tmpInfo);
$staticGroupIDs[] = $dao->id;
}
elseif ($tmpName == '`civicrm_group_contact_cache_' . $dao->id . '`') {
$tmpName = '`civicrm_group_contact_cache-ACL`';
$tmpInfo = str_replace('civicrm_group_contact_cache_' . $dao->id, 'civicrm_group_contact_cache-ACL', $tmpInfo);
$tmpName = '`civicrm_group_contact_cache-ACL`';
$tmpInfo = str_replace('civicrm_group_contact_cache_' . $dao->id, 'civicrm_group_contact_cache-ACL', $tmpInfo);
$cachedGroupIDs[] = $dao->id;
}
$tmpTables[$tmpName] = $tmpInfo;
......@@ -822,7 +822,8 @@ SELECT g.*
}
if (($dao->saved_search_id || $dao->children || $dao->parents) &&
$dao->cache_date == NULL) {
$dao->cache_date == NULL
) {
CRM_Contact_BAO_GroupContactCache::load($dao);
}
}
......
......@@ -165,7 +165,7 @@ WHERE modified_date IS NULL
// CRM_Core_DAO::singleValueQuery("TRUNCATE TABLE civicrm_acl_contact_cache"); // No, force-commits transaction
// CRM_Core_DAO::singleValueQuery("DELETE FROM civicrm_acl_contact_cache"); // Transaction-safe
if (CRM_Core_Transaction::isActive()) {
CRM_Core_Transaction::addCallback(CRM_Core_Transaction::PHASE_POST_COMMIT, function() {
CRM_Core_Transaction::addCallback(CRM_Core_Transaction::PHASE_POST_COMMIT, function () {
CRM_Core_DAO::singleValueQuery("TRUNCATE TABLE civicrm_acl_contact_cache");
});
}
......
......@@ -156,30 +156,30 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
$label = ts('Role');
$role = array(
'-1' => ts('- select role -'),
'0' => ts('Everyone'),
) + CRM_Core_OptionGroup::values('acl_role');
'-1' => ts('- select role -'),
'0' => ts('Everyone'),
) + CRM_Core_OptionGroup::values('acl_role');
$this->add('select', 'entity_id', $label, $role, TRUE);
$group = array(
'-1' => ts('- select -'),
'0' => ts('All Groups'),
) + CRM_Core_PseudoConstant::group();
'-1' => ts('- select -'),
'0' => ts('All Groups'),
) + CRM_Core_PseudoConstant::group();
$customGroup = array(
'-1' => ts('- select -'),
'0' => ts('All Custom Groups'),
) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id');
'-1' => ts('- select -'),
'0' => ts('All Custom Groups'),
) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id');
$ufGroup = array(
'-1' => ts('- select -'),
'0' => ts('All Profiles'),
) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFField', 'uf_group_id');
'-1' => ts('- select -'),
'0' => ts('All Profiles'),
) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFField', 'uf_group_id');
$event = array(
'-1' => ts('- select -'),
'0' => ts('All Events'),
) + CRM_Event_PseudoConstant::event(NULL, FALSE, "( is_template IS NULL OR is_template != 1 )");
'-1' => ts('- select -'),
'0' => ts('All Events'),
) + CRM_Event_PseudoConstant::event(NULL, FALSE, "( is_template IS NULL OR is_template != 1 )");
$this->add('select', 'group_id', ts('Group'), $group);
$this->add('select', 'custom_group_id', ts('Custom Data'), $customGroup);
......
......@@ -95,9 +95,9 @@ SELECT object_table
$label = ts('Role');
$role = array(
'-1' => ts('- select role -'),
'0' => ts('Everyone'),
) + CRM_Core_OptionGroup::values('acl_role');
'-1' => ts('- select role -'),
'0' => ts('Everyone'),
) + CRM_Core_OptionGroup::values('acl_role');
$entityID = &$this->add('select', 'entity_id', $label, $role, TRUE);
if ($this->_id) {
......
......@@ -88,10 +88,11 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
$this->addButtons(
array(
array(
'type' => 'next',
'name' => ts('Save'),
'spacing' => '',
'isDefault' => FALSE ),
'type' => 'next',
'name' => ts('Save'),
'spacing' => '',
'isDefault' => FALSE
),
)
);
......@@ -141,7 +142,10 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
}
if (!empty($warningPermissionNames)) {
CRM_Core_Session::setStatus(
ts('The %1 role was assigned one or more permissions that may prove dangerous for users of that role to have. Please reconsider assigning %2 to them.', array(1 => $wp_roles->role_names[$role], 2 => implode(', ', $warningPermissionNames))),
ts('The %1 role was assigned one or more permissions that may prove dangerous for users of that role to have. Please reconsider assigning %2 to them.', array(
1 => $wp_roles->role_names[$role],
2 => implode(', ', $warningPermissionNames)
)),
ts('Unsafe Permission Settings')
);
}
......
......@@ -121,12 +121,14 @@ class CRM_ACL_Page_ACL extends CRM_Core_Page_Basic {
);
// set breadcrumb to append to admin/access
$breadCrumb = array(array(
'title' => ts('Access Control'),
$breadCrumb = array(
array(
'title' => ts('Access Control'),
'url' => CRM_Utils_System::url('civicrm/admin/access',
'reset=1'
),
));
)
);
CRM_Utils_System::appendBreadCrumb($breadCrumb);
// what action to take ?
if ($action & (CRM_Core_Action::ADD | CRM_Core_Action::DELETE)) {
......@@ -173,22 +175,22 @@ ORDER BY entity_id
$roles = CRM_Core_OptionGroup::values('acl_role');
$group = array(
'-1' => ts('- select -'),
'0' => ts('All Groups'),
) + CRM_Core_PseudoConstant::group();
'-1' => ts('- select -'),
'0' => ts('All Groups'),
) + CRM_Core_PseudoConstant::group();
$customGroup = array(
'-1' => ts('- select -'),
'0' => ts('All Custom Groups'),
) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id');
'-1' => ts('- select -'),
'0' => ts('All Custom Groups'),
) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id');
$ufGroup = array(
'-1' => ts('- select -'),
'0' => ts('All Profiles'),
) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFField', 'uf_group_id');
'-1' => ts('- select -'),
'0' => ts('All Profiles'),
) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFField', 'uf_group_id');
$event = array(
'-1' => ts('- select -'),
'0' => ts('All Events'),
) + CRM_Event_PseudoConstant::event();
'-1' => ts('- select -'),
'0' => ts('All Events'),
) + CRM_Event_PseudoConstant::event();
while ($dao->fetch()) {
$acl[$dao->id] = array();
......
......@@ -109,10 +109,12 @@ class CRM_ACL_Page_ACLBasic extends CRM_Core_Page_Basic {
);
// set breadcrumb to append to admin/access
$breadCrumb = array(array(
'title' => ts('Access Control'),
$breadCrumb = array(
array(
'title' => ts('Access Control'),
'url' => CRM_Utils_System::url('civicrm/admin/access', 'reset=1'),
));
)
);
CRM_Utils_System::appendBreadCrumb($breadCrumb);
// what action to take ?
......
......@@ -121,12 +121,14 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic {
);
// set breadcrumb to append to admin/access
$breadCrumb = array(array(
'title' => ts('Access Control'),
$breadCrumb = array(
array(
'title' => ts('Access Control'),
'url' => CRM_Utils_System::url('civicrm/admin/access',
'reset=1'
),
));
)
);
CRM_Utils_System::appendBreadCrumb($breadCrumb);
CRM_Utils_System::setTitle(ts('Assign Users to Roles'));
......
......@@ -76,7 +76,7 @@ class CRM_Activity_BAO_ActivityContact extends CRM_Activity_DAO_ActivityContact
*/
public static function getNames($activityID, $recordTypeID, $alsoIDs = FALSE) {
$names = array();
$ids = array();
$ids = array();
if (empty($activityID)) {
return $alsoIDs ? array($names, $ids) : $names;
......@@ -115,7 +115,8 @@ AND contact_a.is_deleted = 0
public static function retrieveContactIdsByActivityId($activityID, $recordTypeID) {
$activityContact = array();
if (!CRM_Utils_Rule::positiveInteger($activityID) ||
!CRM_Utils_Rule::positiveInteger($recordTypeID)) {
!CRM_Utils_Rule::positiveInteger($recordTypeID)
) {
return $activityContact;
}
......
......@@ -97,7 +97,7 @@ class CRM_Activity_BAO_ICalendar {
'fileName' => $icsFileName,
'cleanName' => $icsFileName,
'fullPath' => $this->icsfile,
);
);
return 'activity_ics';
}
}
......
......@@ -202,7 +202,10 @@ class CRM_Activity_BAO_Query {
$types = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE);
//get the component activity types.
$compActTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE, TRUE);
$activityTypeIds = self::buildWhereAndQill($query, $value, $types, $op, $grouping, array('Activity Type', 'civicrm_activity.activity_type_id'));
$activityTypeIds = self::buildWhereAndQill($query, $value, $types, $op, $grouping, array(
'Activity Type',
'civicrm_activity.activity_type_id'
));
foreach ($activityTypeIds as $activityTypeId) {
if (array_key_exists($activityTypeId, $compActTypes)) {
......@@ -258,7 +261,10 @@ class CRM_Activity_BAO_Query {
case 'activity_status':
$status = CRM_Core_PseudoConstant::activityStatus();
$activityTypeIds = self::buildWhereAndQill($query, $value, $status, $op, $grouping, array('Activity Status', 'civicrm_activity.status_id'));
$activityTypeIds = self::buildWhereAndQill($query, $value, $status, $op, $grouping, array(
'Activity Status',
'civicrm_activity.status_id'
));
break;
case 'activity_subject':
......@@ -285,7 +291,7 @@ class CRM_Activity_BAO_Query {
case 'activity_test':
// We dont want to include all tests for sql OR CRM-7827
if (!$value || $query->getOperator() != 'OR') {
$query->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause("civicrm_activity.is_test", $op, $value, "Boolean");
$query->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause("civicrm_activity.is_test", $op, $value, "Boolean");
if ($value) {
$query->_qill[$grouping][] = ts('Activity is a Test');
}
......@@ -360,7 +366,7 @@ class CRM_Activity_BAO_Query {
case 'activity_result':
if (is_array($value)) {
$safe = NULL;
while (list(,$k) = each($value)) {
while (list(, $k) = each($value)) {
$safe[] = "'" . CRM_Utils_Type::escape($k, 'String') . "'";
}
$query->_where[$grouping][] = "civicrm_activity.result IN (" . implode(',', $safe) . ")";
......@@ -386,7 +392,7 @@ class CRM_Activity_BAO_Query {
}
elseif ($value == 2) {
$query->_where[$grouping][] = "civicrm_activity.parent_id IS NULL";
$query->_qill[$grouping][] = ts('Activities which are not Followup Activities');
$query->_qill[$grouping][] = ts('Activities which are not Followup Activities');
}
break;
}
......@@ -545,14 +551,14 @@ class CRM_Activity_BAO_Query {
$form->addSelect('activity_engagement_level', array('entity' => 'activity', 'context' => 'search'));
// Add survey result field.
$optionGroups = CRM_Campaign_BAO_Survey::getResultSets('name');
$optionGroups = CRM_Campaign_BAO_Survey::getResultSets('name');
$resultOptions = array();
foreach ($optionGroups as $gid => $name) {
if ($name) {
$value = array();
$value = CRM_Core_OptionGroup::values($name);
if (!empty($value)) {
while (list($k,$v) = each($value)) {
while (list($k, $v) = each($value)) {
$resultOptions[$v] = $v;
}
}
......
......@@ -175,12 +175,20 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
'assignee_contact_id' => array(
'type' => 'entityRef',
'label' => ts('Assigned to'),
'attributes' => array('multiple' => TRUE, 'create' => TRUE, 'api' => array('params' => array('is_deceased' => 0))),
'attributes' => array(
'multiple' => TRUE,
'create' => TRUE,
'api' => array('params' => array('is_deceased' => 0))
),
),
'followup_assignee_contact_id' => array(
'type' => 'entityRef',
'label' => ts('Assigned to'),
'attributes' => array('multiple' => TRUE, 'create' => TRUE, 'api' => array('params' => array('is_deceased' => 0))),
'attributes' => array(
'multiple' => TRUE,
'create' => TRUE,
'api' => array('params' => array('is_deceased' => 0))
),
),
'followup_activity_type_id' => array(
'type' => 'select',
......@@ -432,10 +440,11 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
$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') {
|| $path == 'civicrm/group/search'
) {
$urlString = $path;
}
else {
......@@ -629,7 +638,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
//enable form element (ActivityLinks sets this true)
$this->assign('suppressForm', FALSE);
$element = & $this->add('select', 'activity_type_id', ts('Activity Type'),
$element = &$this->add('select', 'activity_type_id', ts('Activity Type'),
$this->_fields['followup_activity_type_id']['attributes'],
FALSE, array(
'onchange' => "CRM.buildCustomData( 'Activity', this.value );",
......@@ -980,8 +989,8 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
unset($params['id']);
$linkedEntities = array(
array(
'table' => 'civicrm_activity_contact',
'findCriteria' => array(
'table' => 'civicrm_activity_contact',
'findCriteria' => array(
'activity_id' => $this->_activityId,
),
'linkedColumns' => array('activity_id'),
......@@ -1062,7 +1071,8 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
$mailStatus = '';
if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'activity_assignee_notification')) {
'activity_assignee_notification')
) {
$activityIDs = array($activity->id);
if ($followupActivity) {
$activityIDs = array_merge($activityIDs, array($followupActivity->id));
......
......@@ -47,8 +47,8 @@ class CRM_Activity_Form_ActivityView extends CRM_Core_Form {
public function preProcess() {
//get the activity values
$activityId = CRM_Utils_Request::retrieve('id', 'Positive', $this);
$context = CRM_Utils_Request::retrieve('context', 'String', $this);
$cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
$context = CRM_Utils_Request::retrieve('context', 'String', $this);
$cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
//check for required permissions, CRM-6264
if ($activityId &&
......@@ -59,7 +59,11 @@ class CRM_Activity_Form_ActivityView extends CRM_Core_Form {
$session = CRM_Core_Session::singleton();
if (!in_array($context, array(
'home', 'dashlet', 'dashletFullscreen'))) {
'home',
'dashlet',
'dashletFullscreen'
))
) {
$url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$cid}&selectedChild=activity");
}
else {
......
......@@ -93,9 +93,9 @@ class CRM_Activity_Form_Search extends CRM_Core_Form_Search {
// we allow the controller to set force/reset externally, useful when we are being
// driven by the wizard framework
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject);
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE);
$this->_limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this);
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject);
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE);
$this->_limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this);
$this->_context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'search');
$this->assign("context", $this->_context);
......
......@@ -143,8 +143,8 @@ class CRM_Activity_Form_Task extends CRM_Core_Form {
}
else {
$session->replaceUserContext(CRM_Utils_System::url("civicrm/contact/search/$searchFormName",
$urlParams
));
$urlParams
));
}
}
......
......@@ -147,7 +147,10 @@ class CRM_Activity_Form_Task_AddToTag extends CRM_Activity_Form_Task {
$status = array(ts('%count activities tagged', array('count' => $added, 'plural' => '%count activities tagged')));
if ($notAdded) {
$status[] = ts('%count activities already had this tag', array('count' => $notAdded, 'plural' => '%count activities already had this tag'));
$status[] = ts('%count activities already had this tag', array(
'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));
......
......@@ -96,8 +96,8 @@ class CRM_Activity_Form_Task_FileOnCase extends CRM_Activity_Form_Task {
*/
public function postProcess() {
$formparams = $this->exportValues();
$caseId = $formparams['unclosed_case_id'];
$formparams = $this->exportValues();
$caseId = $formparams['unclosed_case_id'];
$filedActivities = 0;
foreach ($this->_activityHolderIds as $key => $id) {
$targetContactValues = $defaults = array();
......@@ -130,8 +130,9 @@ 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(
1 => empty($defaults['subject']) ? '' : $defaults['subject'],
2 => $defaults['activity_date_time'])),
1 => empty($defaults['subject']) ? '' : $defaults['subject'],
2 => $defaults['activity_date_time']
)),
ts("Error"), "error");
}
}
......
......@@ -79,7 +79,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(1 => $this->_maxActivities, 2 => count($this->_activityHolderIds))), ts("Maximum Exceeded"), "error");
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(
1 => $this->_maxActivities,
2 => count($this->_activityHolderIds)
)), ts("Maximum Exceeded"), "error");
$validate = TRUE;
}
// then redirect
......
......@@ -74,7 +74,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 Batch Update is %1. You have selected %2. Please select fewer Activities from your search results and try again.", array(1 => $this->_maxActivities, 2 => count($this->_activityHolderIds))), ts('Maximum Exceeded'), 'error');
CRM_Core_Session::setStatus(ts("The maximum number of Activities you can select for Batch Update is %1. You have selected %2. Please select fewer Activities from your search results and try again.", array(
1 => $this->_maxActivities,
2 => count($this->_activityHolderIds)
)), ts('Maximum Exceeded'), 'error');
$validate = TRUE;
}
......@@ -126,7 +129,8 @@ 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
'' => ts('- select profile -')
) + $profiles, TRUE
);
$this->addDefaultButtons(ts('Continue'));
}
......