projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #14981 from eileenmcnaughton/load_extract
[civicrm-core.git]
/
api
/
v3
/
Order.php
diff --git
a/api/v3/Order.php
b/api/v3/Order.php
index e895e0fc1146d5ee3d6afd868f3be97d8b663a49..e570855b57a9b1081237f7a8b2959c304d08b3d2 100644
(file)
--- a/
api/v3/Order.php
+++ b/
api/v3/Order.php
@@
-45,7
+45,7
@@
function civicrm_api3_order_get($params) {
$contributions = [];
$params['api.line_item.get'] = ['qty' => ['<>' => 0]];
$isSequential = FALSE;
$contributions = [];
$params['api.line_item.get'] = ['qty' => ['<>' => 0]];
$isSequential = FALSE;
- if (
CRM_Utils_Array::value('sequential', $params
)) {
+ if (
!empty($params['sequential']
)) {
$params['sequential'] = 0;
$isSequential = TRUE;
}
$params['sequential'] = 0;
$isSequential = TRUE;
}
@@
-84,11
+84,11
@@
function _civicrm_api3_order_get_spec(&$params) {
* @return array
* Api result array
*/
* @return array
* Api result array
*/
-function civicrm_api3_order_create(
&
$params) {
+function civicrm_api3_order_create($params) {
$entity = NULL;
$entityIds = [];
$entity = NULL;
$entityIds = [];
- if (
CRM_Utils_Array::value('line_items', $params
) && is_array($params['line_items'])) {
+ if (
!empty($params['line_items']
) && is_array($params['line_items'])) {
$priceSetID = NULL;
CRM_Contribute_BAO_Contribution::checkLineItems($params);
foreach ($params['line_items'] as $lineItems) {
$priceSetID = NULL;
CRM_Contribute_BAO_Contribution::checkLineItems($params);
foreach ($params['line_items'] as $lineItems) {
@@
-124,7
+124,7
@@
function civicrm_api3_order_create(&$params) {
}
$contribution = civicrm_api3('Contribution', 'create', $params);
// add payments
}
$contribution = civicrm_api3('Contribution', 'create', $params);
// add payments
- if ($entity &&
CRM_Utils_Array::value('id', $contribution
)) {
+ if ($entity &&
!empty($contribution['id']
)) {
foreach ($entityIds as $entityId) {
$paymentParams = [
'contribution_id' => $contribution['id'],
foreach ($entityIds as $entityId) {
$paymentParams = [
'contribution_id' => $contribution['id'],