Commit 24c97899 authored by Chenu Denis's avatar Chenu Denis
Browse files

[fix] Save and quit redirect for 5.X

parent a59656e9
......@@ -8,7 +8,7 @@
<author>Denis Chenu</author>
<authorUrl>https://extensions.sondages.pro/reloadanyresponse</authorUrl>
<supportUrl>https://support.sondages.pro/</supportUrl>
<version>5.2.0</version>
<version>5.2.1</version>
<license>GNU Affero General Public License v3.0</license>
<description><![CDATA[Allow to reload any response for admin user and respondant.]]></description>
</metadata>
......
<?php
/**
* Plugin helper for limesurvey : new class and function allowing to reload any survey
*
* @author Denis Chenu <denis@sondages.pro>
* @copyright 2018-2021 Denis Chenu <http://www.sondages.pro>
* @license AGPL v3
* @version 5.2.0
* @version 5.2.1
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -1391,10 +1390,18 @@ class reloadAnyResponse extends PluginBase
}
if(App()->getRequest()->getPost('save'.get_class($this))=='redirect') {
if(version_compare(App()->getConfig('versionnumber'), '4.0.0', "<")) {
Yii::app()->getController()->redirect(
Yii::app()->getController()->createUrl(
'admin/survey',
array('sa'=>'view','surveyid'=>$surveyId)
)
);
}
Yii::app()->getController()->redirect(
Yii::app()->getController()->createUrl(
'admin/survey',
array('sa'=>'view','surveyid'=>$surveyId)
'surveyAdministration/view',
array('surveyid'=>$surveyId)
)
);
}
......
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