From 69d6212888629dec15d4accba3fa366b2f52345a Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 11 Jul 2014 09:50:41 +1200 Subject: [PATCH] fix enotice on priceset update --- CRM/Price/BAO/PriceFieldValue.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Price/BAO/PriceFieldValue.php b/CRM/Price/BAO/PriceFieldValue.php index d53f27a185..c3e0a7d7ea 100644 --- a/CRM/Price/BAO/PriceFieldValue.php +++ b/CRM/Price/BAO/PriceFieldValue.php @@ -88,7 +88,7 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { $params['name'] = strtolower(CRM_Utils_String::munge($params['label'], '_', 242)); } - if ($id = CRM_Utils_Array::value('id', $ids)) { + if ($id = CRM_Utils_Array::value('id', $ids) && !empty($params['weight'])) { if (isset($params['name']))unset($params['name']); $oldWeight = NULL; @@ -100,7 +100,7 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { $params['weight'] = CRM_Utils_Weight::updateOtherWeights('CRM_Price_DAO_PriceFieldValue', $oldWeight, $params['weight'], $fieldValues); } else { - if (empty($params['name'])) { + if (!$id && empty($params['name'])) { $params['name'] = CRM_Utils_String::munge(CRM_Utils_Array::value('label', $params), '_', 64); } if (empty($params['weight'])) { -- 2.25.1