Skip to content

Commit

Permalink
Fixed issue #9603: Undefined variable: iSurveyID in /var/www/limesurv…
Browse files Browse the repository at this point in the history
…ey/application/controllers/admin/tokens.php(36)
  • Loading branch information
Aestu committed Apr 15, 2015
1 parent 550b5ca commit 802dee4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions application/controllers/admin/tokens.php
Expand Up @@ -32,7 +32,7 @@ function index($iSurveyId)
$thissurvey = getSurveyInfo($iSurveyId);
if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'read') && !Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'create') && !Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update')
&& !Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'export') && !Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'import')
&& !Permission::model()->hasSurveyPermission($iSurveyID, 'surveysettings', 'update')
&& !Permission::model()->hasSurveyPermission($iSurveyId, 'surveysettings', 'update')
)
{
Yii::app()->session['flashmessage'] = gT("You do not have sufficient rights to access this page.");
Expand Down Expand Up @@ -857,7 +857,7 @@ function delete($iSurveyID)
SurveyLink::model()->deleteTokenLink($aTokenIds, $iSurveyID);

//Then delete the tokens
Token::model($iSurveyID)->deleteByPk($aTokenIds);
Token::model($iSurveyID)->deleteByPk($aTokenIds);
}
}

Expand Down Expand Up @@ -1015,7 +1015,7 @@ function addDummies($iSurveyId, $subaction = '')
function managetokenattributes($iSurveyId)
{
$iSurveyId = sanitize_int($iSurveyId);
if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyID, 'surveysettings', 'update'))
if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyId, 'surveysettings', 'update'))
{
Yii::app()->session['flashmessage'] = gT("You do not have sufficient rights to access this page.");
$this->getController()->redirect(array("/admin/survey/sa/view/surveyid/{$iSurveyId}"));
Expand Down Expand Up @@ -1065,7 +1065,7 @@ function managetokenattributes($iSurveyId)
function updatetokenattributes($iSurveyId)
{
$iSurveyId = sanitize_int($iSurveyId);
if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyID, 'surveysettings', 'update'))
if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyId, 'surveysettings', 'update'))
{
Yii::app()->session['flashmessage'] = gT("You do not have sufficient rights to access this page.");
$this->getController()->redirect(array("/admin/survey/sa/view/surveyid/{$iSurveyId}"));
Expand Down Expand Up @@ -1112,7 +1112,7 @@ function deletetokenattributes($iSurveyId)
Yii::app()->session['flashmessage'] = gT("No token table.");
$this->getController()->redirect($this->getController()->createUrl("/admin/survey/sa/view/surveyid/{$iSurveyId}"));
}
if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyID, 'surveysettings', 'update'))
if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyId, 'surveysettings', 'update'))
{
Yii::app()->session['flashmessage'] = gT("You do not have sufficient rights to access this page.");
$this->getController()->redirect($this->getController()->createUrl("/admin/survey/sa/view/surveyid/{$iSurveyId}"));
Expand Down Expand Up @@ -1171,7 +1171,7 @@ function deletetokenattributes($iSurveyId)
function updatetokenattributedescriptions($iSurveyId)
{
$iSurveyId = sanitize_int($iSurveyId);
if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyID, 'surveysettings', 'update'))
if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update') && !Permission::model()->hasSurveyPermission($iSurveyId, 'surveysettings', 'update'))
{
Yii::app()->session['flashmessage'] = gT("You do not have sufficient rights to access this page.");
$this->getController()->redirect(array("/admin/survey/sa/view/surveyid/{$iSurveyId}"));
Expand Down

0 comments on commit 802dee4

Please sign in to comment.