Skip to content

Commit

Permalink
make model function static
Browse files Browse the repository at this point in the history
  • Loading branch information
KRav007 committed Nov 2, 2015
1 parent 2afb771 commit 34138c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions application/helpers/remotecontrol/remotecontrol_handle.php
Expand Up @@ -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(
Expand Down Expand Up @@ -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'] == ''))
{
Expand Down
2 changes: 1 addition & 1 deletion application/models/Participant.php
Expand Up @@ -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)
);
Expand Down

0 comments on commit 34138c9

Please sign in to comment.