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
3990fbed
Unverified
Commit
3990fbed
authored
5 years ago
by
Eileen McNaughton
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #14357 from colemanw/api4Wrap
Don't apply api3 pre/post processing to api4 actions
parents
783bb7ec
3635b823
Branches
5.65
Tags
5.65.2
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Civi/API/Subscriber/TransactionSubscriber.php
+6
-0
6 additions, 0 deletions
Civi/API/Subscriber/TransactionSubscriber.php
Civi/API/Subscriber/WrapperAdapter.php
+2
-2
2 additions, 2 deletions
Civi/API/Subscriber/WrapperAdapter.php
with
8 additions
and
2 deletions
Civi/API/Subscriber/TransactionSubscriber.php
+
6
−
0
View file @
3990fbed
...
...
@@ -79,6 +79,9 @@ class TransactionSubscriber implements EventSubscriberInterface {
* @return bool
*/
public
function
isTransactional
(
$apiProvider
,
$apiRequest
)
{
if
(
$apiRequest
[
'version'
]
==
4
)
{
return
FALSE
;
}
if
(
$this
->
isForceRollback
(
$apiProvider
,
$apiRequest
))
{
return
TRUE
;
}
...
...
@@ -98,6 +101,9 @@ class TransactionSubscriber implements EventSubscriberInterface {
* @return bool
*/
public
function
isForceRollback
(
$apiProvider
,
$apiRequest
)
{
if
(
$apiRequest
[
'version'
]
==
4
)
{
return
FALSE
;
}
// FIXME: When APIv3 uses better parsing, only one check will be needed.
if
(
isset
(
$apiRequest
[
'params'
][
'options'
][
'force_rollback'
]))
{
return
\CRM_Utils_String
::
strtobool
(
$apiRequest
[
'params'
][
'options'
][
'force_rollback'
]);
...
...
This diff is collapsed.
Click to expand it.
Civi/API/Subscriber/WrapperAdapter.php
+
2
−
2
View file @
3990fbed
...
...
@@ -97,8 +97,8 @@ class WrapperAdapter implements EventSubscriberInterface {
* @return array<\API_Wrapper>
*/
public
function
getWrappers
(
$apiRequest
)
{
if
(
!
isset
(
$apiRequest
[
'wrappers'
]))
{
$apiRequest
[
'wrappers'
]
=
$this
->
defaults
;
if
(
!
isset
(
$apiRequest
[
'wrappers'
])
||
is_null
(
$apiRequest
[
'wrappers'
])
)
{
$apiRequest
[
'wrappers'
]
=
$apiRequest
[
'version'
]
<
4
?
$this
->
defaults
:
[]
;
\CRM_Utils_Hook
::
apiWrappers
(
$apiRequest
[
'wrappers'
],
$apiRequest
);
}
return
$apiRequest
[
'wrappers'
];
...
...
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