Skip to content

Commit

Permalink
Fixed issue #17649: White page by deleting a participant in a survey
Browse files Browse the repository at this point in the history
Add missing redirect (function no longer called via Ajax but with form POST)
  • Loading branch information
olleharstedt committed Oct 5, 2021
1 parent 506fce1 commit 22efd40
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions application/controllers/admin/tokens.php
Expand Up @@ -266,13 +266,8 @@ public function deleteToken()
if (!Permission::model()->hasSurveyPermission($iSid, 'tokens', 'delete')) {
throw new CHttpException(403, gT("You do not have permission to access this page."));
}
if (!Yii::app()->getRequest()->isPostRequest) {
TokenDynamic::model($iSid)->deleteToken((int)$aTokenId); //in this case it's no an array ...
App()->setFlashMessage(gT('Participant has been deleted.'), 'success');
$this->getController()->redirect(array("admin/tokens", "sa" => "browse", "surveyid" => $iSid));
}
TokenDynamic::model($iSid)->deleteRecords(array($aTokenId));
return true;
$this->getController()->redirect(array("admin/tokens", "sa" => "browse", "surveyid" => $iSid));
}

/**
Expand Down

0 comments on commit 22efd40

Please sign in to comment.