Skip to content

Commit

Permalink
Merge pull request #5804 from eileenmcnaughton/unusedparams
Browse files Browse the repository at this point in the history
Remove unused parameters from function signature
  • Loading branch information
eileenmcnaughton committed May 10, 2015
2 parents 73fb6f5 + 2f9f578 commit fb9f0fb
Show file tree
Hide file tree
Showing 37 changed files with 6 additions and 57 deletions.
2 changes: 1 addition & 1 deletion CRM/Activity/BAO/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -2660,7 +2660,7 @@ public static function copyExtendedActivityData($params) {
}
}
}
CRM_Core_BAO_CustomValueTable::postProcess($customParams, CRM_Core_DAO::$_nullArray, 'civicrm_activity',
CRM_Core_BAO_CustomValueTable::postProcess($customParams, 'civicrm_activity',
$params['mainActivityId'], 'Activity'
);
}
Expand Down
1 change: 0 additions & 1 deletion CRM/Activity/Form/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,6 @@ public function postProcess($params = NULL) {
)
);
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$customFields,
$this->_activityId,
'Activity'
);
Expand Down
1 change: 0 additions & 1 deletion CRM/Activity/Form/Task/Batch.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ public function postProcess() {
foreach ($params['field'] as $key => $value) {

$value['custom'] = CRM_Core_BAO_CustomField::postProcess($value,
CRM_Core_DAO::$_nullObject,
$key, 'Activity'
);
$value['id'] = $key;
Expand Down
1 change: 0 additions & 1 deletion CRM/Activity/Import/Parser/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ public function import($onDuplicate, &$values) {
}

$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
CRM_Core_DAO::$_nullObject,
NULL,
'Activity'
);
Expand Down
2 changes: 0 additions & 2 deletions CRM/Batch/Form/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ private function processContribution(&$params) {
}

$value['custom'] = CRM_Core_BAO_CustomField::postProcess($value,
CRM_Core_DAO::$_nullObject,
NULL,
'Contribution'
);
Expand Down Expand Up @@ -674,7 +673,6 @@ private function processMembership(&$params) {

//check for custom data
$value['custom'] = CRM_Core_BAO_CustomField::postProcess($params['field'][$key],
$customFields,
$key,
'Membership',
$membershipTypeId
Expand Down
1 change: 0 additions & 1 deletion CRM/Campaign/Form/Campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ public function postProcess() {
CRM_Utils_Array::value('campaign_type_id', $params)
);
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$customFields,
$this->_campaignId,
'Campaign'
);
Expand Down
1 change: 0 additions & 1 deletion CRM/Campaign/Form/Petition/Signature.php
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,6 @@ public function postProcess() {
);

$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$customActivityFields,
NULL,
'Activity'
);
Expand Down
1 change: 0 additions & 1 deletion CRM/Campaign/Form/Survey/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ public function postProcess() {
$params['is_default'] = CRM_Utils_Array::value('is_default', $params, 0);

$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$customFields,
$this->_surveyId,
'Survey'
);
Expand Down
1 change: 0 additions & 1 deletion CRM/Campaign/Form/Task/Interview.php
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ public static function registerInterview($params) {

//format custom fields.
$customParams = CRM_Core_BAO_CustomField::postProcess($params,
$surveyFields,
$activityId,
'Activity'
);
Expand Down
1 change: 0 additions & 1 deletion CRM/Case/Form/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ public function postProcess($params = NULL) {
)
);
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$customFields,
$this->_activityId,
'Activity'
);
Expand Down
2 changes: 0 additions & 2 deletions CRM/Case/Form/Case.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ public function postProcess() {
$customFields = array();
$params['custom'] = CRM_Core_BAO_CustomField::postProcess(
$params,
$customFields,
NULL,
'Case'
);
Expand Down Expand Up @@ -423,7 +422,6 @@ public function postProcess() {
)
);
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$customFields,
$this->_activityId,
'Activity'
);
Expand Down
2 changes: 0 additions & 2 deletions CRM/Case/Form/CustomData.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,10 @@ public function buildQuickForm() {
*/
public function postProcess() {
$params = $this->controller->exportValues($this->_name);
$fields = array();

$transaction = new CRM_Core_Transaction();

CRM_Core_BAO_CustomValueTable::postProcess($params,
$fields,
'civicrm_case',
$this->_entityID,
'Case'
Expand Down
1 change: 0 additions & 1 deletion CRM/Contact/Form/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,6 @@ public function postProcess() {
$customFieldExtends = (CRM_Utils_Array::value('contact_sub_type', $params)) ? $params['contact_sub_type'] : $params['contact_type'];

$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$customFields,
$this->_contactId,
$customFieldExtends,
TRUE
Expand Down
1 change: 0 additions & 1 deletion CRM/Contact/Form/CustomData.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ public function postProcess() {
$params = $this->controller->exportValues($this->_name);

CRM_Core_BAO_CustomValueTable::postProcess($params,
$this->_groupTree[$this->_groupID]['fields'],
'civicrm_contact',
$this->_tableID,
$this->_entityType
Expand Down
1 change: 0 additions & 1 deletion CRM/Contact/Form/Inline/CustomData.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ public function postProcess() {
// Get the form values and groupTree
$params = $this->controller->exportValues($this->_name);
CRM_Core_BAO_CustomValueTable::postProcess($params,
$this->_groupTree[$this->_groupID]['fields'],
'civicrm_contact',
$this->_contactId,
$this->_entityType
Expand Down
1 change: 0 additions & 1 deletion CRM/Contribute/BAO/Contribution/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,6 @@ public static function processAPIContribution($params) {
)
);
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$customFields,
CRM_Utils_Array::value('id', $params, NULL),
'Contribution'
);
Expand Down
1 change: 0 additions & 1 deletion CRM/Contribute/Form/AdditionalInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ public static function postProcessCommon(&$params, &$formatted, &$form) {
)
);
$formatted['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$customFields,
CRM_Utils_Array::value('id', $params, NULL),
'Contribution'
);
Expand Down
1 change: 0 additions & 1 deletion CRM/Contribute/Form/Contribution/Confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,6 @@ public static function processContribution(

if ($online && $contribution) {
CRM_Core_BAO_CustomValueTable::postProcess($form->_params,
CRM_Core_DAO::$_nullArray,
'civicrm_contribution',
$contribution->id,
'Contribution'
Expand Down
1 change: 0 additions & 1 deletion CRM/Contribute/Form/Task/Batch.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ public function postProcess() {
foreach ($params['field'] as $key => $value) {

$value['custom'] = CRM_Core_BAO_CustomField::postProcess($value,
CRM_Core_DAO::$_nullObject,
$key,
'Contribution'
);
Expand Down
2 changes: 0 additions & 2 deletions CRM/Contribute/Import/Parser/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ public function import($onDuplicate, &$values) {

if ($onDuplicate != CRM_Import_Parser::DUPLICATE_UPDATE) {
$formatted['custom'] = CRM_Core_BAO_CustomField::postProcess($formatted,
CRM_Core_DAO::$_nullObject,
NULL,
'Contribution'
);
Expand All @@ -375,7 +374,6 @@ public function import($onDuplicate, &$values) {
if ($ids['contribution']) {
$formatted['id'] = $ids['contribution'];
$formatted['custom'] = CRM_Core_BAO_CustomField::postProcess($formatted,
CRM_Core_DAO::$_nullObject,
$formatted['id'],
'Contribution'
);
Expand Down
1 change: 0 additions & 1 deletion CRM/Core/BAO/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ public static function add(&$params, $fixAddress) {
}
if (!empty($customFields)) {
$addressCustom = CRM_Core_BAO_CustomField::postProcess($params,
$customFields,
$address->id,
'Address',
TRUE
Expand Down
3 changes: 0 additions & 3 deletions CRM/Core/BAO/CustomField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2234,8 +2234,6 @@ public static function getOptionGroupDefault($optionGroupId, $htmlType) {

/**
* @param array $params
* @param array $customFields
* Unused parameter
* @param int $entityID
* @param $customFieldExtends
* @param bool $inline
Expand All @@ -2244,7 +2242,6 @@ public static function getOptionGroupDefault($optionGroupId, $htmlType) {
*/
public static function postProcess(
&$params,
$customFields,
$entityID,
$customFieldExtends,
$inline = FALSE
Expand Down
4 changes: 1 addition & 3 deletions CRM/Core/BAO/CustomValueTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,14 +354,12 @@ public static function store(&$params, $entityTable, $entityID) {
* Post process function.
*
* @param array $params
* @param $customFields
* @param $entityTable
* @param int $entityID
* @param $customFieldExtends
*/
public static function postProcess(&$params, &$customFields, $entityTable, $entityID, $customFieldExtends) {
public static function postProcess(&$params, $entityTable, $entityID, $customFieldExtends) {
$customData = CRM_Core_BAO_CustomField::postProcess($params,
$customFields,
$entityID,
$customFieldExtends
);
Expand Down
3 changes: 0 additions & 3 deletions CRM/Custom/Form/CustomData.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ class CRM_Custom_Form_CustomData {
* @param string $type
* @param null|int $entityID
* @param null $onlySubType
*
* @return void
*/
public static function preProcess(
&$form, $subName = NULL, $subType = NULL,
Expand Down Expand Up @@ -160,7 +158,6 @@ public static function setDefaultValues(&$form) {

/**
* @param CRM_Core_Form $form
* @return void
*/
public static function buildQuickForm(&$form) {
$form->addElement('hidden', 'hidden_custom', 1);
Expand Down
1 change: 0 additions & 1 deletion CRM/Event/Form/ManageEvent/EventInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ public function postProcess() {
CRM_Utils_Array::value('event_type_id', $params)
);
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$customFields,
$this->_id,
'Event'
);
Expand Down
2 changes: 0 additions & 2 deletions CRM/Event/Form/Participant.php
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,6 @@ public function postProcess() {
$customFields = CRM_Utils_Array::crmArrayMerge($customFieldsEvent, $customFields);
$customFields = CRM_Utils_Array::crmArrayMerge($customFieldsEventType, $customFields);
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$customFields,
$this->_id,
'Participant'
);
Expand Down Expand Up @@ -1260,7 +1259,6 @@ public function postProcess() {

//add custom data for participant
CRM_Core_BAO_CustomValueTable::postProcess($this->_params,
CRM_Core_DAO::$_nullArray,
'civicrm_participant',
$participants[0]->id,
'Participant'
Expand Down
1 change: 0 additions & 1 deletion CRM/Event/Form/Registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,6 @@ public function confirmPostProcess($contactID = NULL, $contribution = NULL, $pay
}

CRM_Core_BAO_CustomValueTable::postProcess($this->_params,
CRM_Core_DAO::$_nullArray,
'civicrm_participant',
$participant->id,
'Participant'
Expand Down
1 change: 0 additions & 1 deletion CRM/Event/Form/Task/Batch.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ public function postProcess() {

//check for custom data
$value['custom'] = CRM_Core_BAO_CustomField::postProcess($value,
CRM_Core_DAO::$_nullObject,
$key,
'Participant'
);
Expand Down
2 changes: 0 additions & 2 deletions CRM/Event/Import/Parser/Participant.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ public function import($onDuplicate, &$values) {

if ($onDuplicate != CRM_Import_Parser::DUPLICATE_UPDATE) {
$formatted['custom'] = CRM_Core_BAO_CustomField::postProcess($formatted,
CRM_Core_DAO::$_nullObject,
NULL,
'Participant'
);
Expand All @@ -363,7 +362,6 @@ public function import($onDuplicate, &$values) {
$dao->id = $formatValues['participant_id'];

$formatted['custom'] = CRM_Core_BAO_CustomField::postProcess($formatted,
CRM_Core_DAO::$_nullObject,
$formatValues['participant_id'],
'Participant'
);
Expand Down
1 change: 0 additions & 1 deletion CRM/Grant/Form/Grant.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ public function postProcess() {
CRM_Core_BAO_CustomField::getFields('Grant', FALSE, FALSE, NULL, NULL, TRUE)
);
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$customFields,
$this->_id,
'Grant'
);
Expand Down
1 change: 0 additions & 1 deletion CRM/Group/Form/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ public function postProcess() {

$customFields = CRM_Core_BAO_CustomField::getFields('Group');
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$customFields,
$this->_id,
'Group'
);
Expand Down
1 change: 0 additions & 1 deletion CRM/Member/BAO/Membership.php
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,6 @@ public static function postProcessMembership(
foreach ($createdMemberships as $createdMembership) {
CRM_Core_BAO_CustomValueTable::postProcess(
$form->_params,
CRM_Core_DAO::$_nullArray,
'civicrm_membership',
$createdMembership->id,
'Membership'
Expand Down
1 change: 0 additions & 1 deletion CRM/Member/Form/Membership.php
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,6 @@ public function postProcess() {
);

$membershipTypeValues[$memType]['custom'] = CRM_Core_BAO_CustomField::postProcess($formValues,
$customFields,
$this->_id,
'Membership'
);
Expand Down
12 changes: 4 additions & 8 deletions CRM/Member/Form/MembershipRenewal.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function preProcess() {
$this->assign('cdType', FALSE);
if ($this->_cdType) {
$this->assign('cdType', TRUE);
return CRM_Custom_Form_CustomData::preProcess($this);
CRM_Custom_Form_CustomData::preProcess($this);
}

parent::preProcess();
Expand Down Expand Up @@ -156,8 +156,8 @@ public function preProcess() {
* Set default values for the form.
* the default values are retrieved from the database
*
*
* @return void
* @return array
* Default values.
*/
public function setDefaultValues() {
if ($this->_cdType) {
Expand Down Expand Up @@ -240,12 +240,10 @@ public function setDefaultValues() {

/**
* Build the form object.
*
* @return void
*/
public function buildQuickForm() {
if ($this->_cdType) {
return CRM_Custom_Form_CustomData::buildQuickForm($this);
CRM_Custom_Form_CustomData::buildQuickForm($this);
}

parent::buildQuickForm();
Expand Down Expand Up @@ -492,7 +490,6 @@ public static function formRule($params) {
*/
public function postProcess() {

$ids = array();
$config = CRM_Core_Config::singleton();

// get the submitted form values.
Expand Down Expand Up @@ -639,7 +636,6 @@ public function postProcess() {
);

$customFieldsFormatted = CRM_Core_BAO_CustomField::postProcess($formValues,
$customFields,
$this->_id,
'Membership'
);
Expand Down
1 change: 0 additions & 1 deletion CRM/Member/Form/Task/Batch.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ public function postProcess() {
}
//check for custom data
$value['custom'] = CRM_Core_BAO_CustomField::postProcess($params['field'][$key],
$customFields,
$key,
'Membership',
$membershipTypeId
Expand Down
Loading

0 comments on commit fb9f0fb

Please sign in to comment.