Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 1 file changed
  • 0 comments
  • 2 contributors
Apr 26, 2012
Federico Mestrone The member function _getTokenIds in application/controllers/admin/tok…
…ens.php references a $iSurveyId variable which is not declared or initialised anywhere. The only reference to the function seems to be on line 1022, where such a variable is available. Adjusting the method to take an extra survey Id parameter seems to fix the problem I encountered when working with tokens in v2.0b1
259768e
Carsten Schmitz Merge pull request #6 from fmestrone/patch-1
Fixed issue: Missing parameter in _getTokenIds - patch kindly provided by fmestrone
876c0af

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  application/controllers/admin/tokens.php
4  application/controllers/admin/tokens.php
@@ -1019,7 +1019,7 @@ function email($iSurveyId, $aTokenIds = null)
1019 1019
         $aSurveyLangs = Survey::model()->findByPk($iSurveyId)->additionalLanguages;
1020 1020
         $sBaseLanguage = Survey::model()->findByPk($iSurveyId)->language;
1021 1021
         array_unshift($aSurveyLangs, $sBaseLanguage);
1022  
-        $aTokenIds = $this->_getTokenIds($aTokenIds);
  1022
+        $aTokenIds = $this->_getTokenIds($aTokenIds, $iSurveyId);
1023 1023
         $aTokenFields = getTokenFieldsAndNames($iSurveyId, true);
1024 1024
         $iAttributes = 0;
1025 1025
         if (getEmailFormat($iSurveyId) == 'html')
@@ -2022,7 +2022,7 @@ function _handletokenform($iSurveyId, $subaction, $iTokenId="")
2022 2022
         $this->_renderWrappedTemplate('token', array('tokenbar', 'tokenform'), $aData);
2023 2023
     }
2024 2024
 
2025  
-    private function _getTokenIds($aTokenIds)
  2025
+    private function _getTokenIds($aTokenIds, $iSurveyId)
2026 2026
     {
2027 2027
         // CHECK TO SEE IF A TOKEN TABLE EXISTS FOR THIS SURVEY
2028 2028
         $bTokenExists = tableExists('{{tokens_' . $iSurveyId . '}}');

No commit comments for this range

Something went wrong with that request. Please try again.