Merge pull request #4360 from christianwach/wordpress-hooks
[civicrm-core.git] / CRM / Event / Import / Parser / Participant.php
index b48e980af44fbc2c50f93e615f95c0599be85304..f097124aa5586adb778f2fe10340563294c18c1b 100644 (file)
@@ -58,7 +58,7 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser {
   protected $_newParticipants;
 
   /**
-   * class constructor
+   * Class constructor
    */
   function __construct(&$mapperKeys, $mapperLocType = NULL, $mapperPhoneType = NULL) {
     parent::__construct();
@@ -66,7 +66,7 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser {
   }
 
   /**
-   * the initializer code, called before the processing
+   * The initializer code, called before the processing
    *
    * @return void
    * @access public
@@ -124,7 +124,7 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser {
   }
 
   /**
-   * handle the values in mapField mode
+   * Handle the values in mapField mode
    *
    * @param array $values the array of values belonging to this line
    *
@@ -136,7 +136,7 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser {
   }
 
   /**
-   * handle the values in preview mode
+   * Handle the values in preview mode
    *
    * @param array $values the array of values belonging to this line
    *
@@ -148,7 +148,7 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser {
   }
 
   /**
-   * handle the values in summary mode
+   * Handle the values in summary mode
    *
    * @param array $values the array of values belonging to this line
    *
@@ -264,7 +264,7 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser {
   }
 
   /**
-   * handle the values in import mode
+   * Handle the values in import mode
    *
    * @param int $onDuplicate the code for what action to take on duplicates
    * @param array $values the array of values belonging to this line
@@ -299,6 +299,10 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser {
             $params[$key] = CRM_Utils_String::strtoboolstr($val);
           }
         }
+        if($key == 'participant_register_date') {
+          CRM_Utils_Date::convertToDefaultDate($params, $dateType, 'participant_register_date');
+          $formatted['participant_register_date'] = CRM_Utils_Date::processDate($params['participant_register_date']);
+        }
       }
     }
 
@@ -496,7 +500,7 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser {
   }
 
   /**
-   * the initializer code, called before the processing
+   * The initializer code, called before the processing
    *
    * @return void
    * @access public