|
From: Paul S. O. <ps...@us...> - 2002-03-22 19:33:33
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv23745/includes
Modified Files:
emailer.php
Log Message:
Alter way variables are substituted ... was causing problems when a [] followed a {VAR} in the email ...
Index: emailer.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/emailer.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** emailer.php 18 Mar 2002 23:53:12 -0000 1.14
--- emailer.php 22 Mar 2002 19:33:28 -0000 1.15
***************
*** 155,166 ****
}
- //$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);
! eval("\$this->msg = \"$this->msg\";");
//
--- 155,163 ----
}
// Escape all quotes, else the eval will fail.
! $this->msg = str_replace ("'", "\'", $this->msg);
! $this->msg = preg_replace('#\{([a-z0-9\-_]*?)\}#is', "' . $\\1 . '", $this->msg);
! eval("\$this->msg = '$this->msg';");
//
***************
*** 171,175 ****
preg_match("/^(Subject:(.*?)[\r\n]+?)?(.*?)$/is", $this->msg, $match);
! $this->msg = ( isset($match[3]) ) ? trim($match[3]) : "";
$this->subject = ( $this->subject != '' ) ? $this->subject : trim($match[2]);
--- 168,172 ----
preg_match("/^(Subject:(.*?)[\r\n]+?)?(.*?)$/is", $this->msg, $match);
! $this->msg = ( isset($match[3]) ) ? trim($match[3]) : '';
$this->subject = ( $this->subject != '' ) ? $this->subject : trim($match[2]);
|