aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-03-22 19:33:28 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-03-22 19:33:28 +0000
commitca2a956b6c72a98107048036f555a098ac449a78 (patch)
treee88371edcea448d4b16fad9e6eed5e4f7de6fd71 /phpBB/includes
parent22d0fa9e3f2e41fa379ced61356f8fc9e5721ff4 (diff)
downloadforums-ca2a956b6c72a98107048036f555a098ac449a78.tar
forums-ca2a956b6c72a98107048036f555a098ac449a78.tar.gz
forums-ca2a956b6c72a98107048036f555a098ac449a78.tar.bz2
forums-ca2a956b6c72a98107048036f555a098ac449a78.tar.xz
forums-ca2a956b6c72a98107048036f555a098ac449a78.zip
Alter way variables are substituted ... was causing problems when a [] followed a {VAR} in the email ...
git-svn-id: file:///svn/phpbb/trunk@2407 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rwxr-xr-xphpBB/includes/emailer.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/phpBB/includes/emailer.php b/phpBB/includes/emailer.php
index f54a9d4f3e..a6e8aaf5f0 100755
--- a/phpBB/includes/emailer.php
+++ b/phpBB/includes/emailer.php
@@ -154,14 +154,11 @@ class emailer
$$key = $val;
}
- //$this->mailMsg = ereg_replace("<!!( )*([^>]*)( )*!!>", '$this->arrPlaceHolders['."\\2".']', $this->mailMsg);
- // $this->msg = ereg_replace("{( )*([^>]*)( )*}", '$'."\\2", $this->msg);
- $this->msg = preg_replace('#\{([a-z0-9\-_]*?)\}#is', '$'."\\1", $this->msg);
-
// Escape all quotes, else the eval will fail.
- $this->msg = str_replace ("\"", "\\\"", $this->msg);
+ $this->msg = str_replace ("'", "\'", $this->msg);
+ $this->msg = preg_replace('#\{([a-z0-9\-_]*?)\}#is', "' . $\\1 . '", $this->msg);
- eval("\$this->msg = \"$this->msg\";");
+ eval("\$this->msg = '$this->msg';");
//
// We now try and pull a subject from the email body ... if it exists,
@@ -170,7 +167,7 @@ class emailer
$match = array();
preg_match("/^(Subject:(.*?)[\r\n]+?)?(.*?)$/is", $this->msg, $match);
- $this->msg = ( isset($match[3]) ) ? trim($match[3]) : "";
+ $this->msg = ( isset($match[3]) ) ? trim($match[3]) : '';
$this->subject = ( $this->subject != '' ) ? $this->subject : trim($match[2]);
return TRUE;