summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2013-05-01 15:55:21 +0200
committerBenny Baumann <BenBE@geshi.org>2013-05-01 15:55:21 +0200
commit1d7ef5fbcbde6ee830774ee472865080081ab064 (patch)
treeda4f20167ebdf6a29e8a72d86daa4bbc92d105e2 /includes
parentf6744f8ecb4e82f88ed1e8063f7c0e13c4d41408 (diff)
parenta6ae837dfcec95fa6eea25c64f3101ed25d0472a (diff)
downloadcacert-devel-1d7ef5fbcbde6ee830774ee472865080081ab064.tar.gz
cacert-devel-1d7ef5fbcbde6ee830774ee472865080081ab064.tar.xz
cacert-devel-1d7ef5fbcbde6ee830774ee472865080081ab064.zip
Merge branch 'bug-28' into testserver-stable
Conflicts: www/disputes.php
Diffstat (limited to 'includes')
-rw-r--r--includes/account.php5
-rw-r--r--includes/lib/l10n.php8
2 files changed, 11 insertions, 2 deletions
diff --git a/includes/account.php b/includes/account.php
index 46de17e..f98f67c 100644
--- a/includes/account.php
+++ b/includes/account.php
@@ -2612,7 +2612,8 @@
$row = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($_REQUEST['userid'])."'"));
printf(_("The password for %s has been updated successfully in the system."), sanitizeHTML($row['email']));
-
+ $my_translation = L10n::get_translation();
+ L10n::set_translation(get_recipient_language(intval($_REQUEST['userid'])));
$body = sprintf(_("Hi %s,"),$row['fname'])."\n\n";
$body .= _("You are receiving this email because a CAcert administrator ".
"has changed the password on your account.")."\n\n";
@@ -2621,7 +2622,7 @@
sendmail($row['email'], "[CAcert.org] "._("Password Update Notification"), $body,
"support@cacert.org", "", "", "CAcert Support");
-
+ L10n::set_translation($my_translation);
}
showfooter();
exit;
diff --git a/includes/lib/l10n.php b/includes/lib/l10n.php
index 85b7aff..f834fd0 100644
--- a/includes/lib/l10n.php
+++ b/includes/lib/l10n.php
@@ -340,4 +340,12 @@ class L10n {
bindtextdomain($domain, $_SESSION['_config']['filepath'].'/locale');
textdomain($domain);
}
+
+ function get_recipient_language($accoundid){
+//returns the language of a recipient to make sure that the language is correct
+//use together with
+ $query = "select * from `users` where `id`='".$id:"'";
+ $res = mysql_query($query);
+ $row = mysql_fetch_assoc($res);
+ return $row['language'];
} \ No newline at end of file