Commit 5d4fcf54 authored by totten's avatar totten

(NFC) Apply upcoming civicrm/coder policies (batch 2)

Method:

* Checkout latest merged branch of civicrm/coder (`8.x-2.x-civi`)
* Run this command to autoclean a batch of 100 files
  `PG=2 SIZE=100 ; find Civi/ CRM/ api/ bin/ extern/ tests/ -name '*.php' | grep -v /examples/ | grep -v /DAO/ | sort | head -n $(( $PG  * $SIZE )) | tail -n $SIZE | xargs phpcbf-civi`
* Go through the diff. For anything that looks wonky, open in an editor and find a better solution.

Note: The automated checker makes good points about awkward indentation, but the automated cleanup often makes it
worse.  So that's why I have to open it up.
parent 0d48f1cc
...@@ -106,10 +106,12 @@ class CRM_Admin_Page_CKEditorConfig extends CRM_Core_Page { ...@@ -106,10 +106,12 @@ class CRM_Admin_Page_CKEditorConfig extends CRM_Core_Page {
$this->assign('configUrl', $configUrl); $this->assign('configUrl', $configUrl);
$this->assign('revertConfirm', htmlspecialchars(ts('Are you sure you want to revert all changes?', ['escape' => 'js']))); $this->assign('revertConfirm', htmlspecialchars(ts('Are you sure you want to revert all changes?', ['escape' => 'js'])));
CRM_Utils_System::appendBreadCrumb([[ CRM_Utils_System::appendBreadCrumb([
'url' => CRM_Utils_System::url('civicrm/admin/setting/preferences/display', 'reset=1'), [
'title' => ts('Display Preferences'), 'url' => CRM_Utils_System::url('civicrm/admin/setting/preferences/display', 'reset=1'),
]]); 'title' => ts('Display Preferences'),
],
]);
return parent::run(); return parent::run();
} }
......
...@@ -160,7 +160,8 @@ class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic { ...@@ -160,7 +160,8 @@ class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic {
$mapper = CRM_Extension_System::singleton()->getMapper(); $mapper = CRM_Extension_System::singleton()->getMapper();
$manager = CRM_Extension_System::singleton()->getManager(); $manager = CRM_Extension_System::singleton()->getManager();
$localExtensionRows = []; // array($pseudo_id => extended_CRM_Extension_Info) // array($pseudo_id => extended_CRM_Extension_Info)
$localExtensionRows = [];
$keys = array_keys($manager->getStatuses()); $keys = array_keys($manager->getStatuses());
sort($keys); sort($keys);
foreach ($keys as $key) { foreach ($keys as $key) {
......
...@@ -24,7 +24,8 @@ class CRM_Admin_Page_ExtensionsUpgrade extends CRM_Core_Page { ...@@ -24,7 +24,8 @@ class CRM_Admin_Page_ExtensionsUpgrade extends CRM_Core_Page {
]); ]);
CRM_Core_Error::debug_log_message('CRM_Admin_Page_ExtensionsUpgrade: Start upgrades'); CRM_Core_Error::debug_log_message('CRM_Admin_Page_ExtensionsUpgrade: Start upgrades');
$runner->runAllViaWeb(); // does not return // does not return
$runner->runAllViaWeb();
} }
/** /**
......
...@@ -161,7 +161,8 @@ class CRM_Admin_Page_MessageTemplates extends CRM_Core_Page_Basic { ...@@ -161,7 +161,8 @@ class CRM_Admin_Page_MessageTemplates extends CRM_Core_Page_Basic {
} }
// rebuild the action links HTML, as we need to handle %%orig_id%% for revertible templates // rebuild the action links HTML, as we need to handle %%orig_id%% for revertible templates
$values['action'] = CRM_Core_Action::formLink($links, $action, [ $values['action'] = CRM_Core_Action::formLink($links, $action,
[
'id' => $object->id, 'id' => $object->id,
'orig_id' => CRM_Utils_Array::value($object->id, $this->_revertible), 'orig_id' => CRM_Utils_Array::value($object->id, $this->_revertible),
], ],
......
...@@ -101,9 +101,9 @@ class CRM_Admin_Page_PaymentProcessor extends CRM_Core_Page_Basic { ...@@ -101,9 +101,9 @@ class CRM_Admin_Page_PaymentProcessor extends CRM_Core_Page_Basic {
CRM_Utils_System::setTitle(ts('Settings - Payment Processor')); CRM_Utils_System::setTitle(ts('Settings - Payment Processor'));
//CRM-15546 //CRM-15546
$paymentProcessorTypes = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_PaymentProcessor', 'payment_processor_type_id', array( $paymentProcessorTypes = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_PaymentProcessor', 'payment_processor_type_id', array(
'labelColumn' => 'name', 'labelColumn' => 'name',
'flip' => 1, 'flip' => 1,
)); ));
$this->assign('defaultPaymentProcessorType', $paymentProcessorTypes['PayPal']); $this->assign('defaultPaymentProcessorType', $paymentProcessorTypes['PayPal']);
$breadCrumb = array( $breadCrumb = array(
array( array(
......
...@@ -131,21 +131,20 @@ class CRM_Badge_Form_Layout extends CRM_Admin_Form { ...@@ -131,21 +131,20 @@ class CRM_Badge_Form_Layout extends CRM_Admin_Form {
$this->addRule('width_participant_image', ts('Enter valid height'), 'positiveInteger'); $this->addRule('width_participant_image', ts('Enter valid height'), 'positiveInteger');
$this->addButtons([ $this->addButtons([
[ [
'type' => 'next', 'type' => 'next',
'name' => ts('Save'), 'name' => ts('Save'),
'isDefault' => TRUE, 'isDefault' => TRUE,
], ],
[ [
'type' => 'refresh', 'type' => 'refresh',
'name' => ts('Save and Preview'), 'name' => ts('Save and Preview'),
], ],
[ [
'type' => 'cancel', 'type' => 'cancel',
'name' => ts('Cancel'), 'name' => ts('Cancel'),
], ],
] ]);
);
} }
/** /**
......
...@@ -177,17 +177,16 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { ...@@ -177,17 +177,16 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
); );
$this->addButtons([ $this->addButtons([
[ [
'type' => 'upload', 'type' => 'upload',
'name' => ts('Validate & Process the Batch'), 'name' => ts('Validate & Process the Batch'),
'isDefault' => TRUE, 'isDefault' => TRUE,
], ],
[ [
'type' => 'cancel', 'type' => 'cancel',
'name' => ts('Save & Continue Later'), 'name' => ts('Save & Continue Later'),
], ],
] ]);
);
$this->assign('rowCount', $this->_batchInfo['item_count'] + 1); $this->assign('rowCount', $this->_batchInfo['item_count'] + 1);
...@@ -204,9 +203,9 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { ...@@ -204,9 +203,9 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
for ($rowNumber = 1; $rowNumber <= $this->_batchInfo['item_count']; $rowNumber++) { for ($rowNumber = 1; $rowNumber <= $this->_batchInfo['item_count']; $rowNumber++) {
$this->addEntityRef("primary_contact_id[{$rowNumber}]", '', [ $this->addEntityRef("primary_contact_id[{$rowNumber}]", '', [
'create' => TRUE, 'create' => TRUE,
'placeholder' => ts('- select -'), 'placeholder' => ts('- select -'),
]); ]);
// special field specific to membership batch udpate // special field specific to membership batch udpate
if ($this->_batchInfo['type_id'] == 2) { if ($this->_batchInfo['type_id'] == 2) {
...@@ -254,7 +253,8 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { ...@@ -254,7 +253,8 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
// Notes: $this->_elementIndex gives an approximate count of the variables being sent // Notes: $this->_elementIndex gives an approximate count of the variables being sent
// An offset value is set to deal with additional vars that are likely passed. // An offset value is set to deal with additional vars that are likely passed.
// There may be a more accurate way to do this... // There may be a more accurate way to do this...
$offset = 50; // set an offset to account for other vars we are not counting // set an offset to account for other vars we are not counting
$offset = 50;
if ((count($this->_elementIndex) + $offset) > ini_get("max_input_vars")) { if ((count($this->_elementIndex) + $offset) > ini_get("max_input_vars")) {
CRM_Core_Error::fatal(ts('Batch size is too large. Increase value of php.ini setting "max_input_vars" (current val = ' . ini_get("max_input_vars") . ')')); CRM_Core_Error::fatal(ts('Batch size is too large. Increase value of php.ini setting "max_input_vars" (current val = ' . ini_get("max_input_vars") . ')'));
} }
......
...@@ -716,7 +716,8 @@ INNER JOIN civicrm_group grp ON ( grp.id = campgrp.entity_id ) ...@@ -716,7 +716,8 @@ INNER JOIN civicrm_group grp ON ( grp.id = campgrp.entity_id )
'url' => CRM_Utils_System::url('civicrm/campaign/add', "reset=1", 'url' => CRM_Utils_System::url('civicrm/campaign/add', "reset=1",
NULL, NULL, FALSE, FALSE, TRUE), NULL, NULL, FALSE, FALSE, TRUE),
'type' => 'Campaign', 'type' => 'Campaign',
]]; ],
];
} }
return FALSE; return FALSE;
} }
......
...@@ -398,10 +398,7 @@ INNER JOIN civicrm_custom_group grp on fld.custom_group_id = grp.id ...@@ -398,10 +398,7 @@ INNER JOIN civicrm_custom_group grp on fld.custom_group_id = grp.id
$dao = CRM_Core_DAO::executeQuery($query, [1 => ['Voter_Info', 'String']]); $dao = CRM_Core_DAO::executeQuery($query, [1 => ['Voter_Info', 'String']]);
$customSearchFields = []; $customSearchFields = [];
while ($dao->fetch()) { while ($dao->fetch()) {
foreach ([ foreach (['ward', 'precinct'] as $name) {
'ward',
'precinct',
] as $name) {
if (stripos($name, $dao->label) !== FALSE) { if (stripos($name, $dao->label) !== FALSE) {
$fieldId = $dao->id; $fieldId = $dao->id;
$fieldName = 'custom_' . $dao->id; $fieldName = 'custom_' . $dao->id;
......
...@@ -439,11 +439,8 @@ SELECT survey.id as id, ...@@ -439,11 +439,8 @@ SELECT survey.id as id,
$autocompleteContactSearch = CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, $autocompleteContactSearch = CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'contact_autocomplete_options' 'contact_autocomplete_options'
); );
$returnProperties = array_fill_keys(array_merge([ $returnProperties = array_fill_keys(array_merge(
'contact_type', ['contact_type', 'contact_sub_type', 'sort_name'],
'contact_sub_type',
'sort_name',
],
array_keys($autocompleteContactSearch) array_keys($autocompleteContactSearch)
), 1); ), 1);
} }
...@@ -913,7 +910,7 @@ INNER JOIN civicrm_contact contact_a ON ( activityTarget.contact_id = contact_a ...@@ -913,7 +910,7 @@ INNER JOIN civicrm_contact contact_a ON ( activityTarget.contact_id = contact_a
* *
* @return mixed * @return mixed
*/ */
public Static function getReportID($surveyId) { public static function getReportID($surveyId) {
static $reportIds = []; static $reportIds = [];
if (!array_key_exists($surveyId, $reportIds)) { if (!array_key_exists($surveyId, $reportIds)) {
......
...@@ -168,17 +168,16 @@ class CRM_Campaign_Form_Campaign extends CRM_Core_Form { ...@@ -168,17 +168,16 @@ class CRM_Campaign_Form_Campaign extends CRM_Core_Form {
if ($this->_action & CRM_Core_Action::DELETE) { if ($this->_action & CRM_Core_Action::DELETE) {
$this->addButtons([ $this->addButtons([
[ [
'type' => 'next', 'type' => 'next',
'name' => ts('Delete'), 'name' => ts('Delete'),
'isDefault' => TRUE, 'isDefault' => TRUE,
], ],
[ [
'type' => 'cancel', 'type' => 'cancel',
'name' => ts('Cancel'), 'name' => ts('Cancel'),
], ],
] ]);
);
return; return;
} }
......
...@@ -297,13 +297,12 @@ class CRM_Campaign_Form_Petition_Signature extends CRM_Core_Form { ...@@ -297,13 +297,12 @@ class CRM_Campaign_Form_Petition_Signature extends CRM_Core_Form {
} }
// add buttons // add buttons
$this->addButtons([ $this->addButtons([
[ [
'type' => 'upload', 'type' => 'upload',
'name' => ts('Sign the Petition'), 'name' => ts('Sign the Petition'),
'isDefault' => TRUE, 'isDefault' => TRUE,
], ],
] ]);
);
} }
/** /**
......
...@@ -339,11 +339,7 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form_Search { ...@@ -339,11 +339,7 @@ class CRM_Campaign_Form_Search extends CRM_Core_Form_Search {
//apply filter of survey contact type for search. //apply filter of survey contact type for search.
$contactType = CRM_Campaign_BAO_Survey::getSurveyContactType(CRM_Utils_Array::value('campaign_survey_id', $this->_formValues)); $contactType = CRM_Campaign_BAO_Survey::getSurveyContactType(CRM_Utils_Array::value('campaign_survey_id', $this->_formValues));
if ($contactType && in_array($this->_operation, array( if ($contactType && in_array($this->_operation, ['reserve', 'interview'])) {
'reserve',
'interview',
))
) {
$this->_formValues['contact_type'][$contactType] = 1; $this->_formValues['contact_type'][$contactType] = 1;
} }
......
...@@ -110,8 +110,7 @@ class CRM_Campaign_Form_Search_Campaign extends CRM_Core_Form { ...@@ -110,8 +110,7 @@ class CRM_Campaign_Form_Search_Campaign extends CRM_Core_Form {
'' => ts('- select -'), '' => ts('- select -'),
'0' => ts('Yes'), '0' => ts('Yes'),
'1' => ts('No'), '1' => ts('No'),
] ]);
);
//build the array of all search params. //build the array of all search params.
$this->_searchParams = []; $this->_searchParams = [];
......
...@@ -72,17 +72,16 @@ class CRM_Campaign_Form_Survey_Delete extends CRM_Core_Form { ...@@ -72,17 +72,16 @@ class CRM_Campaign_Form_Survey_Delete extends CRM_Core_Form {
*/ */
public function buildQuickForm() { public function buildQuickForm() {
$this->addButtons([ $this->addButtons([
[ [
'type' => 'next', 'type' => 'next',
'name' => ts('Delete'), 'name' => ts('Delete'),
'isDefault' => TRUE, 'isDefault' => TRUE,
], ],
[ [
'type' => 'cancel', 'type' => 'cancel',
'name' => ts('Cancel'), 'name' => ts('Cancel'),
], ],
] ]);
);
} }
/** /**
......
...@@ -66,7 +66,8 @@ class CRM_Campaign_Form_Survey_Questions extends CRM_Campaign_Form_Survey { ...@@ -66,7 +66,8 @@ class CRM_Campaign_Form_Survey_Questions extends CRM_Campaign_Form_Survey {
public function buildQuickForm() { public function buildQuickForm() {
$subTypeId = CRM_Core_DAO::getFieldValue('CRM_Campaign_DAO_Survey', $this->_surveyId, 'activity_type_id'); $subTypeId = CRM_Core_DAO::getFieldValue('CRM_Campaign_DAO_Survey', $this->_surveyId, 'activity_type_id');
if (!CRM_Core_BAO_CustomGroup::autoCreateByActivityType($subTypeId)) { if (!CRM_Core_BAO_CustomGroup::autoCreateByActivityType($subTypeId)) {
$activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE, FALSE); // everything // everything
$activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE, FALSE);
// FIXME: Displays weird "/\ Array" message; doesn't work with tabs // FIXME: Displays weird "/\ Array" message; doesn't work with tabs
CRM_Core_Session::setStatus( CRM_Core_Session::setStatus(
ts( ts(
......
...@@ -413,7 +413,8 @@ class CRM_Campaign_Form_Survey_Results extends CRM_Campaign_Form_Survey { ...@@ -413,7 +413,8 @@ class CRM_Campaign_Form_Survey_Results extends CRM_Campaign_Form_Survey {
'name' => "survey_{$survey->id}", 'name' => "survey_{$survey->id}",
'title' => $params['report_title'] ? $params['report_title'] : $this->_values['title'], 'title' => $params['report_title'] ? $params['report_title'] : $this->_values['title'],
'status_id_op' => 'eq', 'status_id_op' => 'eq',
'status_id_value' => $activityStatus['Scheduled'], // reserved status // reserved status
'status_id_value' => $activityStatus['Scheduled'],
'survey_id_value' => [$survey->id], 'survey_id_value' => [$survey->id],
'description' => ts('Detailed report for canvassing, phone-banking, walk lists or other surveys.'), 'description' => ts('Detailed report for canvassing, phone-banking, walk lists or other surveys.'),
]; ];
......
...@@ -109,17 +109,16 @@ class CRM_Campaign_Form_Task extends CRM_Core_Form_Task { ...@@ -109,17 +109,16 @@ class CRM_Campaign_Form_Task extends CRM_Core_Form_Task {
*/ */
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) { public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons([ $this->addButtons([
[ [
'type' => $nextType, 'type' => $nextType,
'name' => $title, 'name' => $title,
'isDefault' => TRUE, 'isDefault' => TRUE,
], ],
[ [
'type' => $backType, 'type' => $backType,
'name' => ts('Cancel'), 'name' => ts('Cancel'),
], ],
] ]);
);
} }
} }
...@@ -75,10 +75,10 @@ class CRM_Campaign_Form_Task_Interview extends CRM_Campaign_Form_Task { ...@@ -75,10 +75,10 @@ class CRM_Campaign_Form_Task_Interview extends CRM_Campaign_Form_Task {
if ($this->_reserveToInterview || $this->_votingTab) { if ($this->_reserveToInterview || $this->_votingTab) {
//user came from voting tab / reserve form. //user came from voting tab / reserve form.
foreach ([ foreach ([
'surveyId', 'surveyId',
'contactIds', 'contactIds',
'interviewerId', 'interviewerId',
] as $fld) { ] as $fld) {
$this->{"_$fld"} = $this->get($fld); $this->{"_$fld"} = $this->get($fld);
} }
//get the target voter ids. //get the target voter ids.
...@@ -292,9 +292,9 @@ WHERE {$clause} ...@@ -292,9 +292,9 @@ WHERE {$clause}
for ($i = 1; $i < count($options); $i++) { for ($i = 1; $i < count($options); $i++) {
$this->addElement('select', "order_bys[{$i}][column]", ts('Order by Column'), $options); $this->addElement('select', "order_bys[{$i}][column]", ts('Order by Column'), $options);
$this->addElement('select', "order_bys[{$i}][order]", ts('Order by Order'), [ $this->addElement('select', "order_bys[{$i}][order]", ts('Order by Order'), [
'ASC' => ts('Ascending'), 'ASC' => ts('Ascending'),
'DESC' => ts('Descending'), 'DESC' => ts('Descending'),
]); ]);
} }
//pickup the uf fields. //pickup the uf fields.
...@@ -443,10 +443,10 @@ WHERE {$clause} ...@@ -443,10 +443,10 @@ WHERE {$clause}
elseif ($buttonName == '_qf_Interview_next_interviewToRelease') { elseif ($buttonName == '_qf_Interview_next_interviewToRelease') {
//get ready to jump to release form. //get ready to jump to release form.
foreach ([ foreach ([
'surveyId', 'surveyId',
'contactIds', 'contactIds',
'interviewerId', 'interviewerId',
] as $fld) { ] as $fld) {
$this->controller->set($fld, $this->{"_$fld"}); $this->controller->set($fld, $this->{"_$fld"});
} }
$this->controller->set('interviewToRelease', TRUE); $this->controller->set('interviewToRelease', TRUE);
......
...@@ -82,18 +82,17 @@ class CRM_Campaign_Form_Task_Print extends CRM_Campaign_Form_Task { ...@@ -82,18 +82,17 @@ class CRM_Campaign_Form_Task_Print extends CRM_Campaign_Form_Task {
// just need to add a javacript to popup the window for printing // just need to add a javacript to popup the window for printing
// //
$this->addButtons([ $this->addButtons([
[ [
'type' => 'next', 'type' => 'next',
'name' => ts('Print Respondents'), 'name' => ts('Print Respondents'),
'js' => ['onclick' => 'window.print()'], 'js' => ['onclick' => 'window.print()'],
'isDefault' => TRUE, 'isDefault' => TRUE,
], ],
[ [
'type' => 'back', 'type' => 'back',
'name' => ts('Done'), 'name' => ts('Done'),
], ],
] ]);
);
} }
/** /**
......
...@@ -67,10 +67,10 @@ class CRM_Campaign_Form_Task_Release extends CRM_Campaign_Form_Task { ...@@ -67,10 +67,10 @@ class CRM_Campaign_Form_Task_Release extends CRM_Campaign_Form_Task {
if ($this->_interviewToRelease) { if ($this->_interviewToRelease) {
//user came from interview form. //user came from interview form.
foreach ([ foreach ([
'surveyId', 'surveyId',
'contactIds', 'contactIds',
'interviewerId', 'interviewerId',
] as $fld) { ] as $fld) {
$this->{"_$fld"} = $this->get($fld); $this->{"_$fld"} = $this->get($fld);
} }
...@@ -101,9 +101,7 @@ class CRM_Campaign_Form_Task_Release extends CRM_Campaign_Form_Task { ...@@ -101,9 +101,7 @@ class CRM_Campaign_Form_Task_Release extends CRM_Campaign_Form_Task {
$activityStatus = CRM_Core_PseudoConstant::activityStatus('name'); $activityStatus = CRM_Core_PseudoConstant::activityStatus('name');
$statusIds = []; $statusIds = [];
foreach ([ foreach (['Scheduled'] as $name) {
'Scheduled',
] as $name) {
if ($statusId = array_search($name, $activityStatus)) { if ($statusId = array_search($name, $activityStatus)) {
$statusIds[] = $statusId; $statusIds[] = $statusId;
} }
......
...@@ -47,13 +47,12 @@ class CRM_Campaign_Form_Task_Result extends CRM_Campaign_Form_Task { ...@@ -47,13 +47,12 @@ class CRM_Campaign_Form_Task_Result extends CRM_Campaign_Form_Task {
*/ */
public function buildQuickForm() { public function buildQuickForm() {
$this->addButtons([ $this->addButtons([
[ [
'type' => 'done', 'type' => 'done',
'name' => ts('Done'), 'name' => ts('Done'),
'isDefault' => TRUE, 'isDefault' => TRUE,
], ],
] ]);
);
} }
} }
...@@ -158,9 +158,9 @@ class CRM_Campaign_Page_AJAX { ...@@ -158,9 +158,9 @@ class CRM_Campaign_Page_AJAX {
//format multi-select group and contact types. //format multi-select group and contact types.
foreach ([ foreach ([
'group', 'group',
'contact_type', 'contact_type',
] as $param) { ] as $param) {
$paramValue = CRM_Utils_Array::value($param, $params); $paramValue = CRM_Utils_Array::value($param, $params);
if ($paramValue) { if ($paramValue) {
unset($params[$param]); unset($params[$param]);
...@@ -173,10 +173,10 @@ class CRM_Campaign_Page_AJAX { ...@@ -173,10 +173,10 @@ class CRM_Campaign_Page_AJAX {
$voterClauseParams = []; $voterClauseParams = [];
foreach ([ foreach ([
'campaign_survey_id', 'campaign_survey_id',
'survey_interviewer_id', 'survey_interviewer_id',
'campaign_search_voter_for', 'campaign_search_voter_for',
] as $fld) { ] as $fld) {
$voterClauseParams[$fld] = CRM_Utils_Array::value($fld, $params); $voterClauseParams[$fld] = CRM_Utils_Array::value($fld, $params);
} }
...@@ -602,11 +602,11 @@ class CRM_Campaign_Page_AJAX { ...@@ -602,11 +602,11 @@ class CRM_Campaign_Page_AJAX {
} }
} }
foreach ([ foreach ([
'sort', 'sort',
'offset', 'offset',
'rowCount', 'rowCount',
'sortOrder', 'sortOrder',
] as $sortParam) { ] as $sortParam) {
$params[$sortParam] = $$sortParam; $params[$sortParam] = $$sortParam;
} }
...@@ -707,11 +707,11 @@ class CRM_Campaign_Page_AJAX { ...@@ -707,11 +707,11 @@ class CRM_Campaign_Page_AJAX {
} }
} }
foreach ([ foreach ([
'sort', 'sort',
'offset', 'offset',
'rowCount', 'rowCount',
'sortOrder', 'sortOrder',
] as $sortParam) { ] as $sortParam) {
$params[$sortParam] = $$sortParam; $params[$sortParam] = $$sortParam;
} }
...@@ -807,11 +807,11 @@ class CRM_Campaign_Page_AJAX { ...@@ -807,11 +807,11 @@ class CRM_Campaign_Page_AJAX {
} }
} }
foreach ([ foreach ([
'sort', 'sort',
'offset', 'offset',
'rowCount', 'rowCount',
'sortOrder',