CRM-15139 QA fix
authormonishdeb <monish.deb@webaccessglobal.com>
Tue, 26 Aug 2014 10:19:02 +0000 (15:49 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Tue, 26 Aug 2014 10:19:02 +0000 (15:49 +0530)
----------------------------------------
* CRM-15139: Batch update does not show values when using custom fields limited by event type
  https://issues.civicrm.org/jira/browse/CRM-15139

CRM/Event/Form/Task/Batch.php

index 5d70d16c209d3cc9b543b21254b7e96194bd0e24..95b96d7196932951d83e0c3627220693ea95f7b8 100644 (file)
@@ -191,7 +191,7 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task {
             );
           }
           $entityColumnValueRole = CRM_Utils_Array::value($roleId, $entityColumnValue);
-          $entityColumnValueEventType = CRM_Utils_Array::value(array_search($eventTypeId, $entityColumnValue), $entityColumnValue);
+          $entityColumnValueEventType = in_array($eventTypeId, $entityColumnValue) ? $eventTypeId : NULL;
           if (($this->_roleCustomDataTypeID == $customValue['extends_entity_column_id']) &&
             ($entityColumnValueRole)
           ) {