Permalink
Browse files

Use editVal in emailProcess fields

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1254 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent 94a2be5 commit 692510beefb683320348b2848fa7ac2c6f497c39 jakubvrana committed Nov 26, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 editor/include/adminer.inc.php
@@ -359,10 +359,11 @@ function selectEmailProcess($where, $foreignKeys) {
$headers .= $eol . "MIME-Version: 1.0$eol" . "X-Mailer: Adminer Editor"
. ($_POST["email_from"] ? $eol . "From: " . str_replace("\n", "", $_POST["email_from"]) : "") //! should escape display name
;
+ $fields = fields($_GET["select"]);
foreach ($this->rowDescriptions($rows, $foreignKeys) as $row) {
$replace = array();
foreach ($matches[1] as $val) {
- $replace['{$' . "$val}"] = $row[$val]; //! allow literal {$name}
+ $replace['{$' . "$val}"] = $this->editVal($row[$val], $fields[$val]); //! allow literal {$name}
}
$email = $row[$_POST["email_field"]];
if (is_email($email) && mail($email, email_header(strtr($subject, $replace)), $beginning . strtr($message, $replace) . $attachments, $headers)) {

0 comments on commit 692510b

Please sign in to comment.