Commit 450eb9ce authored by Denis Chenu's avatar Denis Chenu
Browse files

[fix] surveyId is not set before sending email

parent 2d9f8760
......@@ -13,9 +13,9 @@ Allow to send token email one by one with one click.
## Home page & Copyright
- HomePage <http://extensions.sondages.pro/>
- Copyright © 2015 Denis Chenu <http://sondages.pro>
- Copyright © 2015-2016 Denis Chenu <http://sondages.pro>
- Licence : GNU General Affero Public License <https://www.gnu.org/licenses/agpl-3.0.html>
## Support
- Issues <https://gitlab.com/Shnoulle-LimeSurvey-plugin/sendMailAjax/issues>
- Issues <https://framagit.org/SondagePro-LimeSurvey-plugin/sendMailAjax/issues>
- Professional support <http://extensions.sondages.pro/1>
......@@ -5,7 +5,7 @@
* @author Denis Chenu <denis@sondages.pro>
* @copyright 2015 Denis Chenu <http://sondages.pro>
* @license AGPL v3
* @version 0.1.1
* @version 0.1.2
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
......@@ -313,7 +313,7 @@ class sendMailAjax extends PluginBase {
'message'=>'',
);
$oSurvey=Survey::model()->findByPk($this->iSurveyId);
Yii::app()->setConfig('surveyID',$iSurvey);
Yii::app()->setConfig('surveyID',$this->iSurveyId);
$aSurveyLangs = $oSurvey->getAllLanguages();
$aTokenFields = getTokenFieldsAndNames($this->iSurveyId, true);
$bHtml = $oSurvey->htmlemail=='Y';
......
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