Commit 66992caf authored by Sam's avatar Sam

Merge branch '2.05' of github.com:LimeSurvey/LimeSurvey into 2.05

parents ab24bef4 5a6cef22
......@@ -99,17 +99,20 @@ class OptinController extends LSYii_Controller {
{
$thistpl=getTemplatePath($thissurvey['templatedir']);
}
$this->_renderHtml($html,$thistpl,$clang);
$this->_renderHtml($html,$thistpl,$clang,$thissurvey);
}
private function _renderHtml($html,$thistpl,$clang)
private function _renderHtml($html,$thistpl, $oLanguage, $aSurveyInfo)
{
sendCacheHeaders();
doHeader();
$aSupportData=array('thissurvey'=>$aSurveyInfo, 'clang'=>$oLanguage);
echo templatereplace(file_get_contents($thistpl.DIRECTORY_SEPARATOR.'startpage.pstpl'),array(), $aSupportData);
$data['html'] = $html;
$data['thistpl'] = $thistpl;
$data['clang'] = $clang;
$this->render('/opt_view',$data);
echo templatereplace(file_get_contents($thistpl.DIRECTORY_SEPARATOR.'endpage.pstpl'),array(), $aSupportData);
doFooter();
}
}
......@@ -103,7 +103,7 @@ class OptoutController extends LSYii_Controller {
$thistpl=getTemplatePath($thissurvey['templatedir']);
}
$this->_renderHtml($html,$thistpl);
$this->_renderHtml($html,$thistpl,$thissurvey);
}
/* This function is run when opting out of the participants system. The other function /optout/token
......@@ -203,16 +203,19 @@ class OptoutController extends LSYii_Controller {
$thistpl=getTemplatePath($thissurvey['templatedir']);
}
$this->_renderHtml($html,$thistpl);
$this->_renderHtml($html,$thistpl, $thissurvey);
}
private function _renderHtml($html,$thistpl)
private function _renderHtml($html, $thistpl, $aSurveyInfo)
{
sendCacheHeaders();
doHeader();
$aSupportData=array('thissurvey'=>$aSurveyInfo);
echo templatereplace(file_get_contents($thistpl.DIRECTORY_SEPARATOR.'startpage.pstpl'),array(), $aSupportData);
$data['html'] = $html;
$data['thistpl'] = $thistpl;
$this->render('/opt_view',$data);
echo templatereplace(file_get_contents($thistpl.DIRECTORY_SEPARATOR.'endpage.pstpl'),array(), $aSupportData);
doFooter();
}
......
......@@ -226,12 +226,12 @@ class Usergroups extends Survey_Common_Action
if (User_groups::model()->updateGroup($db_name, $db_description, $ugid)) {
Yii::app()->session['flashmessage'] = $clang->gT("User group successfully saved!");
$aData['ugid'] = $ugid;
Yii::app()->request->redirect(array('admin/usergroups/sa/view/ugid/'.$ugid));
$this->getController()->redirect(array('admin/usergroups/sa/view/ugid/'.$ugid));
}
else
{
Yii::app()->session['flashmessage'] = $clang->gT("Failed to edit user group!");
Yii::app()->request->redirect(array('admin/usergroups/sa/edit/ugid/'.$ugid));
$this->getController()->redirect(array('admin/usergroups/sa/edit/ugid/'.$ugid));
}
}
......
......@@ -4628,7 +4628,13 @@ function TSVImportSurvey($sFullFilepath)
{
$result = Survey::model()->deleteSurvey($iNewSID);
}
else
{
LimeExpressionManager::SetSurveyId($iNewSID);
LimeExpressionManager::RevertUpgradeConditionsToRelevance($iNewSID);
LimeExpressionManager::UpgradeConditionsToRelevance($iNewSID);
}
return $results;
}
......@@ -73,8 +73,10 @@
<input type='text' size='83' id='subject_<?php echo $language; ?>' name='subject_<?php echo $language; ?>' value="<?php echo $subject; ?>" /></li>
<li><label for='message_<?php echo $language; ?>'><?php $clang->eT("Message"); ?>:</label>
<div class="htmleditor">
<textarea name='message_<?php echo $language; ?>' id='message_<?php echo $language; ?>' rows='20' cols='80'><?php echo htmlspecialchars($textarea); ?></textarea>
<?php echo getEditor("email-inv", "message_$language", "[" . $clang->gT("Invitation email:", "js") . "](" . $language . ")", $surveyid, '', '', "tokens"); ?>
</div>
</li>
</ul></div>
<?php } ?>
......
......@@ -51,11 +51,11 @@
echo "<input type='text' size='83' id='subject_$language' name='subject_$language' value=\"$subject\" /></li><li>\n"
. "<label for='message_$language'>" . $clang->gT("Message") . ":</label>\n"
. "<div class='htmleditor'>\n"
. "<textarea name='message_$language' id='message_$language' rows='20' cols='80' >";
echo htmlspecialchars($textarea);
echo "</textarea>"
. "</div>\n"
. getEditor("email-rem", "message_$language", "[" . $clang->gT("Reminder Email:", "js") . "](" . $language . ")", $surveyid, '', '', "tokens")
. "</li>\n"
. "</ul></div>";
......
<?php
echo templatereplace(file_get_contents("$thistpl/startpage.pstpl"));
echo templatereplace(file_get_contents("$thistpl/survey.pstpl"));
?>
<div id="wrapper"><p id="optoutmessage">
<?php
echo $html;
?>
</p></div>
<?php
echo templatereplace(file_get_contents("$thistpl/endpage.pstpl"));
?>
\ No newline at end of file
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