Skip to content

Commit

Permalink
remove duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
KRav007 committed Nov 2, 2015
1 parent 8a87cd8 commit 2afb771
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions application/helpers/remotecontrol/remotecontrol_handle.php
Expand Up @@ -2620,7 +2620,8 @@ public function cpd_importParticipants($sSessionKey, $aParticipants)
//First, process the known fields
if (!isset($aData['participant_id']) || $aData['participant_id'] == "")
{
$aData['participant_id'] = $this->_gen_uuid();
$arParticipantModel = new Participant();
$aData['participant_id'] = $arParticipantModel->gen_uuid();
}
if (isset($aData['emailstatus']) && trim($aData['emailstatus'] == ''))
{
Expand Down Expand Up @@ -2702,24 +2703,4 @@ protected function _checkEmailFormat($sEmail)
}
return false;
}

/**
* Create the LS participant id ID
* @return string
*/
protected 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)
);
}

}

0 comments on commit 2afb771

Please sign in to comment.