summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorINOPIAE <inopiae@cacert.org>2012-12-15 16:41:36 +0100
committerBenny Baumann <BenBE@geshi.org>2013-05-01 15:50:25 +0200
commit44ef98610497de881a8a6207f2c6ef82c41f0a4f (patch)
tree6ec00c4486428eeac19595eedf58078893a3066b /includes
parent7baaa9a0ac611329539a43031ca3d0e81bba2b5f (diff)
downloadcacert-devel-44ef98610497de881a8a6207f2c6ef82c41f0a4f.tar.gz
cacert-devel-44ef98610497de881a8a6207f2c6ef82c41f0a4f.tar.xz
cacert-devel-44ef98610497de881a8a6207f2c6ef82c41f0a4f.zip
bug 28: created a new function to find the lanugae of the reciepient in temp_function1.php, modifieded www/disputes.php, www/wot.php and includes/account.php with the new function call.
Later the function from temp_function1.php should be moved to notary_inc.php???
Diffstat (limited to 'includes')
-rw-r--r--includes/account.php6
-rw-r--r--includes/temp_function1.php14
2 files changed, 18 insertions, 2 deletions
diff --git a/includes/account.php b/includes/account.php
index 4faa0e5..a89d620 100644
--- a/includes/account.php
+++ b/includes/account.php
@@ -18,6 +18,7 @@
require_once("../includes/loggedin.php");
require_once("../includes/lib/l10n.php");
require_once('lib/check_weak_key.php');
+ require_once("../includes/temp-function1.php");
loadem("account");
@@ -2612,7 +2613,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 +2623,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/temp_function1.php b/includes/temp_function1.php
new file mode 100644
index 0000000..ce6854e
--- /dev/null
+++ b/includes/temp_function1.php
@@ -0,0 +1,14 @@
+<?php
+function get_recipient_language($accoundid){
+//returns the language of a recipient to make sure that the language is correct
+//use together with
+// $my_translation = L10n::get_translation();
+// L10n::set_translation($_SESSION['_config']['notarise']['language']);
+// L10n::set_translation($my_translation);
+ $query = "select * from `users` where `id`='".$id:"'";
+ $res = mysql_query($query);
+ $row = mysql_fetch_assoc($res);
+ return $row['language'];
+
+}
+?>