Skip to content

Commit

Permalink
Dev: Make langcode optional in optin and optout.
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@11769 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
GautamGupta committed Dec 26, 2011
1 parent a16a0fb commit f8a1a3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions application/controllers/OptinController.php
Expand Up @@ -24,7 +24,7 @@
*/
class OptinController extends LSYii_Controller {

function actionLocal($langcode, $surveyid, $token)
function actionLocal($surveyid, $token, $langcode = '')
{
Yii::app()->loadHelper('database');
Yii::app()->loadHelper('sanitize');
Expand All @@ -34,7 +34,7 @@ function actionLocal($langcode, $surveyid, $token)
$sToken = sanitize_token($sToken);

if (!$iSurveyID)
{
{
$this->redirect($this->getController()->createUrl('/'));
}
$iSurveyID = (int)$iSurveyID;
Expand All @@ -58,7 +58,7 @@ function actionLocal($langcode, $surveyid, $token)
Yii::app()->lang = $clang;

$thissurvey=getSurveyInfo($iSurveyID,$baselang);

if ($thissurvey == false || Yii::app()->db->schema->getTable("{{tokens_{$iSurveyID}}}") == null)
{
$html = $clang->gT('This survey does not seem to exist.');
Expand Down
6 changes: 3 additions & 3 deletions application/controllers/OptoutController.php
Expand Up @@ -23,7 +23,7 @@
*/
class OptoutController extends LSYii_Controller {

function actionLocal($langcode, $surveyid, $token)
function actionLocal($surveyid, $token, $langcode = '')
{
Yii::app()->loadHelper('database');
Yii::app()->loadHelper('sanitize');
Expand All @@ -33,7 +33,7 @@ function actionLocal($langcode, $surveyid, $token)
$sToken = sanitize_token($sToken);

if (!$iSurveyID)
{
{
$this->redirect($this->getController()->createUrl('/'));
}
$iSurveyID = (int)$iSurveyID;
Expand Down Expand Up @@ -80,7 +80,7 @@ function actionLocal($langcode, $surveyid, $token)
{
$html = $clang->gT('You have been already removed from this survey.');
}
}
}
}

//PRINT COMPLETED PAGE
Expand Down

0 comments on commit f8a1a3c

Please sign in to comment.