Commit f55d3632 authored by Chenu Denis's avatar Chenu Denis

[fix] Set reloaded even with welcome page on new srid

parent 6de07185
......@@ -758,14 +758,12 @@ class reloadAnyResponse extends PluginBase {
}
$oSurvey = Survey::model()->findByPk($surveyid);
$token = App()->getRequest()->getParam('token');
if($srid == "new") {
if($srid == "new" || \reloadAnyResponse\Utilities::getCurrentReloadedSrid($surveyid) == "new") {
$oStarurl = new \reloadAnyResponse\StartUrl($surveyid,$token);
if($oStarurl->isAvailable()) {
$this->reloadedSrid = "new";
$this->surveyId = $surveyid;
/* To save replace */
}
// Done in beforeLoadResponse, needed only with token related survey
return;
}
if ($this->loadReponse($surveyid, $srid, App()->getRequest()->getParam('token'),App()->getRequest()->getParam('code')) ) {
......@@ -785,15 +783,16 @@ class reloadAnyResponse extends PluginBase {
if(!$this->surveyId) {
return;
}
\reloadAnyResponse\Utilities::fixToken($this->surveyId);
$srid = \reloadAnyResponse\Utilities::getCurrentSrid($this->surveyId);
if($this->reloadedSrid == "new") {
/* check activation */
\reloadAnyResponse\Utilities::setSaveAutomatic($this->surveyId);
$srid = $this->reloadedSrid = \reloadAnyResponse\Utilities::getCurrentSrid($this->surveyId);
\reloadAnyResponse\Utilities::setCurrentReloadedSrid($this->surveyId,$srid);
if($srid) {
\reloadAnyResponse\Utilities::setSaveAutomatic($this->surveyId);
$this->reloadedSrid = \reloadAnyResponse\Utilities::getCurrentSrid($this->surveyId);
\reloadAnyResponse\Utilities::setCurrentReloadedSrid($this->surveyId,$srid);
} else {
\reloadAnyResponse\Utilities::setCurrentReloadedSrid($this->surveyId,"new");
}
}
if($srid) {
$ajaxUrl = Yii::app()->getController()->createUrl(
......
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