Skip to content

Commit

Permalink
Fixed issue #15651: delete_participant fails to delete and gives no e…
Browse files Browse the repository at this point in the history
…rror back
  • Loading branch information
adamzammit committed Jan 7, 2020
1 parent 65ff298 commit e39cfb1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions application/helpers/remotecontrol/remotecontrol_handle.php
Expand Up @@ -1805,10 +1805,13 @@ public function delete_participants($sSessionKey, $iSurveyID, $aTokenIDs)
$token = Token::model($iSurveyID)->findByPk($iTokenID);
if (!isset($token)) {
$aResult[$iTokenID] = 'Invalid token ID';
} elseif ($token->delete()) {
$aResult[$iTokenID] = 'Deleted';
} else {
$aResult[$iTokenID] = 'Deletion went wrong';
$iDel = Token::model($iSurveyID)->deleteByPk($iTokenID);
if ($iDel > 0) {
$aResult[$iTokenID] = 'Deleted';
} else {
$aResult[$iTokenID] = 'Deletion went wrong';
}
}
}
return $aResult;
Expand Down

0 comments on commit e39cfb1

Please sign in to comment.