Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
b61efec4
Commit
b61efec4
authored
5 years ago
by
eileen
Browse files
Options
Downloads
Patches
Plain Diff
Remove never-called function _civicrm_api3_deprecated_contact_check_custom_params
parent
7c295e89
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Utils/DeprecatedUtils.php
+0
-41
0 additions, 41 deletions
CRM/Utils/DeprecatedUtils.php
with
0 additions
and
41 deletions
CRM/Utils/DeprecatedUtils.php
+
0
−
41
View file @
b61efec4
...
...
@@ -1143,47 +1143,6 @@ function _civicrm_api3_deprecated_participant_check_params($params, $checkDuplic
return
TRUE
;
}
/**
* Ensure that we have the right input parameters for custom data
*
* @param array $params
* Associative array of property name/value.
* pairs to insert in new contact.
* @param string $csType
* Contact subtype if exists/passed.
*
* @return null
* on success, error message otherwise
*/
function
_civicrm_api3_deprecated_contact_check_custom_params
(
$params
,
$csType
=
NULL
)
{
empty
(
$csType
)
?
$onlyParent
=
TRUE
:
$onlyParent
=
FALSE
;
require_once
'CRM/Core/BAO/CustomField.php'
;
$customFields
=
CRM_Core_BAO_CustomField
::
getFields
(
$params
[
'contact_type'
],
FALSE
,
FALSE
,
$csType
,
NULL
,
$onlyParent
,
FALSE
,
FALSE
);
foreach
(
$params
as
$key
=>
$value
)
{
if
(
$customFieldID
=
CRM_Core_BAO_CustomField
::
getKeyID
(
$key
))
{
// check if it's a valid custom field id
if
(
!
array_key_exists
(
$customFieldID
,
$customFields
))
{
$errorMsg
=
"Invalid Custom Field Contact Type:
{
$params
[
'contact_type'
]
}
"
;
if
(
!
empty
(
$csType
))
{
$errorMsg
.
=
" or Mismatched SubType: "
.
implode
(
', '
,
(
array
)
$csType
);
}
return
civicrm_api3_create_error
(
$errorMsg
);
}
}
}
}
/**
* @param array $params
* @param bool $dupeCheck
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment