Skip to content

Commit

Permalink
Dev: Remove event beforeParticipantDelete
Browse files Browse the repository at this point in the history
Dev: See comment in code. The pull request user should
Dev: fix this and ask for another merge.
  • Loading branch information
olleharstedt committed May 4, 2016
1 parent 10e1f2e commit 40db9bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions application/controllers/admin/tokens.php
Expand Up @@ -924,12 +924,17 @@ function delete($iSurveyID)
self::_newtokentable($iSurveyID);
}

/*
* Broken, caused by commit e8f6f767
* $sTokenIDs can be a comma-separated list, which will cause
* a SQL error
$token = Token::model($iSurveyID)->find('tid=' . $sTokenIDs);
$beforeParticipantDelete = new PluginEvent('beforeParticipantDelete');
$beforeParticipantDelete->set('model',$token );
$beforeParticipantDelete->set('iSurveyID',$iSurveyID );
App()->getPluginManager()->dispatchEvent($beforeParticipantDelete);
*/

if (Permission::model()->hasSurveyPermission($iSurveyID, 'tokens', 'delete'))
{
Expand Down

0 comments on commit 40db9bf

Please sign in to comment.