CRM-20518 Default participant status not set when status name not matches localized...
authorfrancescbassas <francesc@babu.cat>
Wed, 3 May 2017 18:46:57 +0000 (20:46 +0200)
committerGitHub <noreply@github.com>
Wed, 3 May 2017 18:46:57 +0000 (20:46 +0200)
CRM/Event/Form/Participant.php

index 49b1c13bef802236ec000a96f041e8a9730e5485..144122ab17add470bd2fbfeb0519f16017261282 100644 (file)
@@ -477,8 +477,8 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
 
     //setting default register date
     if ($this->_action == CRM_Core_Action::ADD) {
-      $statuses = array_flip($this->_participantStatuses);
-      $defaults[$this->_id]['status_id'] = CRM_Utils_Array::value(ts('Registered'), $statuses);
+      $statuses = array_flip(CRM_Event_PseudoConstant::participantStatus());
+      $defaults[$this->_id]['status_id'] = CRM_Utils_Array::value('Registered', $statuses);
       if (!empty($defaults[$this->_id]['event_id'])) {
         $contributionTypeId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event',
           $defaults[$this->_id]['event_id'],