From 802dee43218122e9b3901aa599cc3431df959a5b Mon Sep 17 00:00:00 2001 From: Alfredo Esteban Date: Thu, 16 Apr 2015 01:28:45 +0200 Subject: [PATCH] Fixed issue #9603: Undefined variable: iSurveyID in /var/www/limesurvey/application/controllers/admin/tokens.php(36) --- application/controllers/admin/tokens.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/application/controllers/admin/tokens.php b/application/controllers/admin/tokens.php index d577c029572..146f99157b9 100644 --- a/application/controllers/admin/tokens.php +++ b/application/controllers/admin/tokens.php @@ -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."); @@ -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); } } @@ -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}")); @@ -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}")); @@ -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}")); @@ -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}"));