summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2012-10-11 13:34:39 +0200
committerBenny Baumann <BenBE@geshi.org>2012-10-11 13:34:39 +0200
commit8dbf200f93d34e024351438721bd8d23d04e114e (patch)
treef65cd3d418d2dbdad29b920b5ce6805491ffd311
parent7400caae53a400dcc1e9fab13610fe29cfd6c0a8 (diff)
parent947aa18ca593a2b466cfc5d31ad97a9a437dccca (diff)
downloadcacert-devel-8dbf200f93d34e024351438721bd8d23d04e114e.tar.gz
cacert-devel-8dbf200f93d34e024351438721bd8d23d04e114e.tar.xz
cacert-devel-8dbf200f93d34e024351438721bd8d23d04e114e.zip
Merge branch 'bug-1091' into release
-rw-r--r--includes/mysql.php.sample2
-rw-r--r--www/wot.php32
2 files changed, 31 insertions, 3 deletions
diff --git a/includes/mysql.php.sample b/includes/mysql.php.sample
index ff5cfc3..eb86401 100644
--- a/includes/mysql.php.sample
+++ b/includes/mysql.php.sample
@@ -28,7 +28,7 @@
function sendmail($to, $subject, $message, $from, $replyto = "", $toname = "", $fromname = "", $errorsto = "returns@cacert.org", $extra="")
{
- $lines = explode('\n', $message);
+ $lines = explode("\n", $message);
$message = "";
foreach($lines as $line)
{
diff --git a/www/wot.php b/www/wot.php
index bf5d301..2878534 100644
--- a/www/wot.php
+++ b/www/wot.php
@@ -442,8 +442,36 @@ $iecho= "c";
where `to`='".$user['id']."' group by `to` HAVING SUM(`points`) > 0"));
if($points > 0)
{
- sendmail($user['email'], "[CAcert.org] ".$_REQUEST['subject'], $_REQUEST['message'],
- $_SESSION['profile']['email'], "", "", $_SESSION['profile']['fname']." ".$_SESSION['profile']['lname']);
+ $my_translation = L10n::get_translation();
+ L10n::set_translation($user['language']);
+
+ $subject = "[CAcert.org] ".sprintf(_("Message from %s"),
+ $_SESSION['profile']['fname']);
+
+ $body = sprintf(_("Hi %s,"), $user['fname'])."\n\n";
+ $body .= sprintf(_("%s %s has sent you a message via the ".
+ "contact an Assurer form on CAcert.org."),
+ $_SESSION['profile']['fname'],
+ $_SESSION['profile']['lname'])."\n\n";
+ $body .= sprintf(_("Subject: %s"), $_REQUEST['subject'])."\n";
+ $body .= _("Message:")."\n";
+ $body .= $_REQUEST['message']."\n\n";
+ $body .= "------------------------------------------------\n\n";
+ $body .= _("Please note, that this is NOT a message on behalf ".
+ "of CAcert but another CAcert community member. If ".
+ "you suspect that the contact form might have been ".
+ "abused, please write to support@cacert.org")."\n\n";
+ $body .= _("Best regards")."\n";
+ $body .= _("Your CAcert Community");
+
+ sendmail($user['email'], $subject, $body,
+ $_SESSION['profile']['email'], //from
+ "", //replyto
+ "", //toname
+ $_SESSION['profile']['fname']." ".
+ $_SESSION['profile']['lname']); //fromname
+
+ L10n::set_translation($my_translation);
showheader(_("My CAcert.org Account!"));?>
<p>