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
343b1e77
Unverified
Commit
343b1e77
authored
4 years ago
by
Seamus Lee
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #19403 from eileenmcnaughton/mem_order
[REF] Fix Order class to not reload if already loaded
parents
9a4884ed
de668aa8
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/Financial/BAO/Order.php
+12
-4
12 additions, 4 deletions
CRM/Financial/BAO/Order.php
with
12 additions
and
4 deletions
CRM/Financial/BAO/Order.php
+
12
−
4
View file @
343b1e77
...
...
@@ -176,13 +176,21 @@ class CRM_Financial_BAO_Order {
* @param int $id
*
* @return array
* @throws \CiviCRM_API3_Exception
*/
public
function
getPriceFieldSpec
(
int
$id
)
:
array
{
if
(
!
isset
(
$this
->
priceFieldMetadata
[
$id
]))
{
return
$this
->
getPriceFieldsMetadata
()[
$id
];
}
/**
* Get the metadata for the fields in the price set.
*
* @return array
*/
public
function
getPriceFieldsMetadata
():
array
{
if
(
empty
(
$this
->
priceFieldMetadata
))
{
$this
->
priceFieldMetadata
=
CRM_Price_BAO_PriceSet
::
getCachedPriceSetDetail
(
$this
->
getPriceSetID
())[
'fields'
];
}
return
$this
->
priceFieldMetadata
[
$id
]
;
return
$this
->
priceFieldMetadata
;
}
/**
...
...
@@ -193,7 +201,7 @@ class CRM_Financial_BAO_Order {
*
* @param array $input
*/
public
function
setPriceSelectionFromUnfilteredInput
(
array
$input
)
{
public
function
setPriceSelectionFromUnfilteredInput
(
array
$input
)
:
void
{
foreach
(
$input
as
$fieldName
=>
$value
)
{
if
(
strpos
(
$fieldName
,
'price_'
)
===
0
)
{
$fieldID
=
substr
(
$fieldName
,
6
);
...
...
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