Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-08-04-22-25-32
[civicrm-core.git] / CRM / Event / Form / Task / Batch.php
index 33dae3abd34dc4cc35021bd9a3b30ad956f12cc7..e0078ef21c32cd7f4f42612caa5725af3a643930 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -180,7 +180,7 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task {
         if ($customFieldID = CRM_Core_BAO_CustomField::getKeyID($name)) {
           $customValue = CRM_Utils_Array::value($customFieldID, $this->_customFields);
           $entityColumnValue = array();
-          if (CRM_Utils_Array::value('extends_entity_column_value', $customValue)) {
+          if (!empty($customValue['extends_entity_column_value'])) {
             $entityColumnValue = explode(CRM_Core_DAO::VALUE_SEPARATOR,
               $customValue['extends_entity_column_value']
             );
@@ -281,11 +281,11 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task {
         );
 
         $value['id'] = $key;
-        if (CRM_Utils_Array::value('participant_register_date', $value)) {
+        if (!empty($value['participant_register_date'])) {
           $value['register_date'] = CRM_Utils_Date::processDate($value['participant_register_date'], $value['participant_register_date_time']);
         }
 
-        if (CRM_Utils_Array::value('participant_role', $value)) {
+        if (!empty($value['participant_role'])) {
           $participantRoles = CRM_Event_PseudoConstant::participantRole();
           if (is_array($value['participant_role'])) {
             $value['role_id'] = implode(CRM_Core_DAO::VALUE_SEPARATOR, array_keys($value['participant_role']));
@@ -298,7 +298,7 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task {
         //need to send mail when status change
         $statusChange = FALSE;
         $relatedStatusChange = FALSE;
-        if (CRM_Utils_Array::value('participant_status', $value)) {
+        if (!empty($value['participant_status'])) {
           $value['status_id'] = $value['participant_status'];
           $fromStatusId = CRM_Utils_Array::value($key, $this->_fromStatusIds);
           if (!$fromStatusId) {
@@ -313,7 +313,7 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task {
           }
         }
 
-        if (CRM_Utils_Array::value('participant_source', $value)) {
+        if (!empty($value['participant_source'])) {
           $value['source'] = $value['participant_source'];
         }
         unset($value['participant_register_date']);
@@ -339,6 +339,12 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task {
   }
   //end of function
 
+  /**
+   * @param $participantId
+   * @param $statusId
+   *
+   * @return Ambigous|void
+   */
   static function updatePendingOnlineContribution($participantId, $statusId) {
     if (!$participantId || !$statusId) {
       return;