CRM-14778 store names as lower
authorEileen McNaughton <eileen@fuzion.co.nz>
Tue, 3 Jun 2014 11:58:01 +0000 (23:58 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Tue, 3 Jun 2014 11:58:01 +0000 (23:58 +1200)
CRM/Price/BAO/PriceField.php
CRM/Price/BAO/PriceFieldValue.php

index a1c27d965d16dd7e95806537478d932914c43063..6c25b02c767ff7b2c2fa93878cfb4b0a2715f9bd 100644 (file)
@@ -82,7 +82,7 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField {
    */
   static function create(&$params) {
     if(empty($params['id']) && empty($params['name'])) {
-      $params['name'] = CRM_Utils_String::munge($params['label'], '_', 242);
+      $params['name'] = strtolower(CRM_Utils_String::munge($params['label'], '_', 242));
     }
     $transaction = new CRM_Core_Transaction();
 
index 0690f8358acb6eae2e113dea5b99df8384415e32..d53f27a18555eca8decaf4dd60791d4d2294975b 100644 (file)
@@ -85,7 +85,7 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue {
       return;
     }
     if(empty($params['id']) && empty($params['name'])) {
-      $params['name'] = CRM_Utils_String::munge($params['label'], '_', 242);
+      $params['name'] = strtolower(CRM_Utils_String::munge($params['label'], '_', 242));
     }
 
     if ($id = CRM_Utils_Array::value('id', $ids)) {