diff --git a/application/helpers/remotecontrol/remotecontrol_handle.php b/application/helpers/remotecontrol/remotecontrol_handle.php index cd1dcb1e905..32be86d074f 100644 --- a/application/helpers/remotecontrol/remotecontrol_handle.php +++ b/application/helpers/remotecontrol/remotecontrol_handle.php @@ -2592,7 +2592,6 @@ public function cpd_importParticipants($sSessionKey, $aParticipants) $oFindCriteria->limit = -1; $aAttributeRecords = ParticipantAttributeName::model()->with('participant_attribute_names_lang')->findAll($oFindCriteria); - foreach ($aParticipants as $sKey => $aParticipantData) { $aData = array( @@ -2620,8 +2619,8 @@ public function cpd_importParticipants($sSessionKey, $aParticipants) //First, process the known fields if (!isset($aData['participant_id']) || $aData['participant_id'] == "") { - $arParticipantModel = new Participant(); - $aData['participant_id'] = $arParticipantModel->gen_uuid(); + // $arParticipantModel = new Participant(); + $aData['participant_id'] = Participant::gen_uuid(); } if (isset($aData['emailstatus']) && trim($aData['emailstatus'] == '')) { diff --git a/application/models/Participant.php b/application/models/Participant.php index 4f081824fec..018c93d22d4 100644 --- a/application/models/Participant.php +++ b/application/models/Participant.php @@ -125,7 +125,7 @@ public function search() * funcion for generation of unique id */ - function gen_uuid() + static function gen_uuid() { return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000, mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) );