Commit e8f3a7a1 authored by Carsten Schmitz's avatar Carsten Schmitz

Dev Simplified redirects

parent b08e4043
......@@ -44,7 +44,7 @@ class OptoutController extends LSYii_Controller {
if (!$iSurveyID) //IF there is no survey id, redirect back to the default public page
{
$this->redirect(Yii::app()->getController()->createUrl('/'));
$this->redirect(array('/'));
}
$iSurveyID = (int)$iSurveyID; //Make sure it's an integer (protect from SQL injects)
//Check that there is a SID
......@@ -127,7 +127,7 @@ class OptoutController extends LSYii_Controller {
if (!$iSurveyID) //IF there is no survey id, redirect back to the default public page
{
$this->redirect(Yii::app()->getController()->createUrl('/'));
$this->redirect(array('/'));
}
$iSurveyID = (int)$iSurveyID; //Make sure it's an integer (protect from SQL injects)
//Check that there is a SID
......
......@@ -110,7 +110,7 @@ class RegisterController extends LSYii_Controller {
if ($register_errormsg != "")
{
$_SESSION['survey_'.$surveyid]['register_errormsg']=$register_errormsg;
Yii::app()->request->redirect(Yii::app()->createUrl('survey/index/sid/'.$surveyid));
Yii::app()->request->redirect(array('survey/index/sid/'.$surveyid));
}
//Check if this email already exists in token database
......@@ -121,7 +121,7 @@ class RegisterController extends LSYii_Controller {
{
$register_errormsg=$clang->gT("The email you used has already been registered.");
$_SESSION['survey_'.$surveyid]['register_errormsg']=$register_errormsg;
Yii::app()->request->redirect(Yii::app()->createUrl('survey/index/sid/'.$surveyid));
Yii::app()->request->redirect(array('survey/index/sid/'.$surveyid));
//include "index.php";
//exit;
}
......
......@@ -479,7 +479,7 @@ class dataentry extends Survey_Common_Action
}
Yii::app()->session['flashmessage'] = sprintf($clang->gT("%s old response(s) and according timings were successfully imported."),$iRecordCount,$iRecordCountT);
}
$this->getController()->redirect(Yii::app()->getController()->createUrl("/admin/responses/sa/index/surveyid/{$surveyid}"));
$this->getController()->redirect(array("/admin/responses/sa/index/surveyid/{$surveyid}"));
}
}
}
......
......@@ -35,7 +35,7 @@ class Index extends Survey_Common_Action
}
else
{
Yii::app()->request->redirect(Yii::app()->getController()->createUrl('admin/survey/sa/index'));
Yii::app()->request->redirect(array('admin/survey/sa/index'));
}
}
......
......@@ -564,7 +564,7 @@ class participantsaction extends Survey_Common_Action
$stg ->stg_value=Yii::app()->request->getPost('userideditable');
$stg->save();
}
Yii::app()->getController()->redirect(Yii::app()->getController()->createUrl('admin/participants/sa/userControl'));
Yii::app()->getController()->redirect(array('admin/participants/sa/userControl'));
}
/**
......@@ -587,7 +587,7 @@ class participantsaction extends Survey_Common_Action
$stg->save();
}
}
Yii::app()->getController()->redirect(Yii::app()->getController()->createUrl('admin/participants/sa/blacklistControl'));
Yii::app()->getController()->redirect(array('admin/participants/sa/blacklistControl'));
}
/**
......@@ -1059,7 +1059,7 @@ class participantsaction extends Survey_Common_Action
);
ParticipantAttributeNames::model()->saveAttributeValue($editattvalue);
}
Yii::app()->getController()->redirect(Yii::app()->getController()->createUrl('admin/participants/sa/attributeControl'));
Yii::app()->getController()->redirect(array('admin/participants/sa/attributeControl'));
}
/*
......@@ -1070,7 +1070,7 @@ class participantsaction extends Survey_Common_Action
$iAttributeId = Yii::app()->request->getQuery('aid');
$iValueId = Yii::app()->request->getQuery('vid');
ParticipantAttributeNames::model()->delAttributeValues($iAttributeId, $iValueId);
Yii::app()->getController()->redirect(Yii::app()->getController()->createUrl('/admin/participants/sa/viewAttribute/aid/' . $iAttributeId));
Yii::app()->getController()->redirect(array('/admin/participants/sa/viewAttribute/aid/' . $iAttributeId));
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment