Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
justinfreeman (Agileware)
Core
Commits
ba93e7ad
Commit
ba93e7ad
authored
11 years ago
by
colemanw
Browse files
Options
Downloads
Patches
Plain Diff
CRM-13550 - API - Port 2nd patch from 4.2
parent
4f56b52e
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
api/v3/utils.php
+11
-4
11 additions, 4 deletions
api/v3/utils.php
with
11 additions
and
4 deletions
api/v3/utils.php
+
11
−
4
View file @
ba93e7ad
...
...
@@ -656,11 +656,15 @@ function _civicrm_api3_get_options_from_params(&$params, $queryObject = FALSE, $
$options
=
array
(
'offset'
=>
CRM_Utils_Rule
::
integer
(
$offset
),
'sort'
=>
CRM_Utils_Rule
::
string
(
$sort
),
'limit'
=>
CRM_Utils_Rule
::
integer
(
$limit
),
'offset'
=>
CRM_Utils_Rule
::
integer
(
$offset
)
?
$offset
:
NULL
,
'sort'
=>
CRM_Utils_Rule
::
string
(
$sort
)
?
$sort
:
NULL
,
'limit'
=>
CRM_Utils_Rule
::
integer
(
$limit
)
?
$limit
:
NULL
,
'return'
=>
!
empty
(
$returnProperties
)
?
$returnProperties
:
NULL
,
);
if
(
$options
[
'sort'
]
&&
stristr
(
$options
[
'sort'
],
'SELECT'
))
{
throw
new
API_Exception
(
'invalid string in sort options'
);
}
if
(
!
$queryObject
)
{
return
$options
;
}
...
...
@@ -680,7 +684,10 @@ function _civicrm_api3_get_options_from_params(&$params, $queryObject = FALSE, $
}
elseif
(
in_array
(
$n
,
$otherVars
))
{}
else
{
$inputParams
[
$n
]
=
CRM_Utils_Rule
::
string
(
$v
);
$inputParams
[
$n
]
=
$v
;
if
(
$v
&&
!
is_array
(
$v
)
&&
stristr
(
$v
,
'SELECT'
))
{
throw
new
API_Exception
(
'invalid string'
);
}
}
}
$options
[
'return'
]
=
array_merge
(
$returnProperties
,
$legacyreturnProperties
);
...
...
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