Skip to content

Commit

Permalink
Dev: Whitespace fix
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Mar 18, 2020
1 parent 2d9b123 commit cabaa73
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions application/helpers/remotecontrol/remotecontrol_handle.php
Expand Up @@ -2079,12 +2079,12 @@ public function list_participants($sSessionKey, $iSurveyID, $iStart = 0, $iLimit
$iLimit = (int) $iLimit;
$oSurvey = Survey::model()->findByPk($iSurveyID);
if (!isset($oSurvey)) {
return array('status' => 'Error: Invalid survey ID');
return array('status' => 'Error: Invalid survey ID');
}

if (Permission::model()->hasSurveyPermission($iSurveyID, 'tokens', 'read')) {
if (!tableExists("{{tokens_$iSurveyID}}")) {
return array('status' => 'Error: No survey participants table');
return array('status' => 'Error: No survey participants table');
}

$aAttributeValues = array();
Expand All @@ -2094,13 +2094,13 @@ public function list_participants($sSessionKey, $iSurveyID, $iStart = 0, $iLimit
}

if ($bUnused) {
$oTokens = Token::model($iSurveyID)->incomplete()->findAllByAttributes($aAttributeValues, array('order' => 'tid', 'limit' => $iLimit, 'offset' => $iStart));
$oTokens = Token::model($iSurveyID)->incomplete()->findAllByAttributes($aAttributeValues, array('order' => 'tid', 'limit' => $iLimit, 'offset' => $iStart));
} else {
$oTokens = Token::model($iSurveyID)->findAllByAttributes($aAttributeValues, array('order' => 'tid', 'limit' => $iLimit, 'offset' => $iStart));
$oTokens = Token::model($iSurveyID)->findAllByAttributes($aAttributeValues, array('order' => 'tid', 'limit' => $iLimit, 'offset' => $iStart));
}

if (count($oTokens) == 0) {
return array('status' => 'No survey participants found.');
return array('status' => 'No survey participants found.');
}


Expand All @@ -2121,18 +2121,19 @@ public function list_participants($sSessionKey, $iSurveyID, $iStart = 0, $iLimit
'firstname'=>$token->attributes['firstname'],
'lastname'=>$token->attributes['lastname'],
'email'=>$token->attributes['email'],
));
)
);
foreach ($extendedAttributes as $sAttribute) {
$aTempData[$sAttribute] = $token->attributes[$sAttribute];
}
$aData[] = $aTempData;
}
return $aData;
} else {
return array('status' => 'No permission');
return array('status' => 'No permission');
}
} else {
return array('status' => 'Invalid Session Key');
return array('status' => 'Invalid Session Key');
}
}

Expand Down

0 comments on commit cabaa73

Please sign in to comment.