Skip to content

Commit

Permalink
Fixed issue #6976: Reminder mails are sent in wrong language
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Nov 30, 2012
1 parent 0bca7c2 commit 4bf5edf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion application/config/config-defaults.php
Expand Up @@ -68,7 +68,7 @@

$config['timeadjust'] = 0; // Number of hours to adjust between your webserver local time and your own local time (for datestamping responses)
$config['allowexportalldb'] = 1; // 0 will only export prefixed tables when doing a database dump. If set to 1 ALL tables in the database will be exported
$config['maxdumpdbrecords'] = 2500; // The maximum number of records that would be ouputted in a go during a database backup. Reduce this number if you're getting errors while backing up the entire database.
$config['maxdumpdbrecords'] = 2000; // The maximum number of records that would be ouputted in a go during a database backup. Reduce this number if you're getting errors while backing up the entire database.
$config['allowmandbackwards'] = 1; // Allow moving backwards (ie: << prev) through survey if a mandatory question
// has not been answered. 1=Allow, 0=Deny
$config['deletenonvalues'] = 1; // By default, LimeSurvey does not save responses to conditional questions that haven't been answered/shown. To have LimeSurvey save these responses change this value to 0.
Expand Down
2 changes: 1 addition & 1 deletion application/helpers/common_helper.php
Expand Up @@ -3798,7 +3798,7 @@ function questionAttributes($returnByName=false)

$qattributes["public_statistics"]=array(
"types"=>"15ABCEFGHKLMNOPRWYZ!:*",
'category'=>$clang->gT('Other'),
'category'=>$clang->gT('Statistics'),
'sortorder'=>80,
'inputtype'=>'singleselect',
'options'=>array(0=>$clang->gT('No'),
Expand Down
12 changes: 6 additions & 6 deletions application/views/admin/token/remind.php
Expand Up @@ -27,9 +27,9 @@
foreach ($surveylangs as $language)
{
//GET SURVEY DETAILS
if (!$thissurvey['email_remind'])
if (!$thissurvey[$language]['email_remind'])
{
$thissurvey['email_remind'] = str_replace("\n", "\r\n", $clang->gT("Dear {FIRSTNAME},\n\nRecently we invited you to participate in a survey.\n\nWe note that you have not yet completed the survey, and wish to remind you that the survey is still available should you wish to take part.\n\nThe survey is titled:\n\"{SURVEYNAME}\"\n\n\"{SURVEYDESCRIPTION}\"\n\nTo participate, please click on the link below.\n\nSincerely,\n\n{ADMINNAME} ({ADMINEMAIL})\n\n----------------------------------------------\nClick here to do the survey:\n{SURVEYURL}") . "\n\n" . $clang->gT("If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:\n{OPTOUTURL}"));
$thissurvey[$language]['email_remind'] = str_replace("\n", "\r\n", $clang->gT("Dear {FIRSTNAME},\n\nRecently we invited you to participate in a survey.\n\nWe note that you have not yet completed the survey, and wish to remind you that the survey is still available should you wish to take part.\n\nThe survey is titled:\n\"{SURVEYNAME}\"\n\n\"{SURVEYDESCRIPTION}\"\n\nTo participate, please click on the link below.\n\nSincerely,\n\n{ADMINNAME} ({ADMINEMAIL})\n\n----------------------------------------------\nClick here to do the survey:\n{SURVEYURL}") . "\n\n" . $clang->gT("If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:\n{OPTOUTURL}"));
}
echo "<div id='tabpage_{$language}'><ul>"
. "<li><label for='from_$language' >" . $clang->gT("From") . ":</label>\n"
Expand All @@ -38,12 +38,12 @@

$fieldsarray["{ADMINNAME}"] = $thissurvey['adminname'];
$fieldsarray["{ADMINEMAIL}"] = $thissurvey['adminemail'];
$fieldsarray["{SURVEYNAME}"] = $thissurvey['name'];
$fieldsarray["{SURVEYDESCRIPTION}"] = $thissurvey['description'];
$fieldsarray["{SURVEYNAME}"] = $thissurvey[$language]['name'];
$fieldsarray["{SURVEYDESCRIPTION}"] = $thissurvey[$language]['description'];
$fieldsarray["{EXPIRY}"] = $thissurvey["expiry"];

$subject = Replacefields($thissurvey['email_remind_subj'], $fieldsarray, false);
$textarea = Replacefields($thissurvey['email_remind'], $fieldsarray, false);
$subject = Replacefields($thissurvey[$language]['email_remind_subj'], $fieldsarray, false);
$textarea = Replacefields($thissurvey[$language]['email_remind'], $fieldsarray, false);
if ($ishtml !== true)
{
$textarea = str_replace(array('<x>', '</x>'), array(''), $textarea);
Expand Down

0 comments on commit 4bf5edf

Please sign in to comment.