projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e073aa2
)
sync
author
john
<john@roojs.com>
Fri, 20 Jul 2018 06:31:43 +0000
(14:31 +0800)
committer
john
<john@roojs.com>
Fri, 20 Jul 2018 06:31:43 +0000
(14:31 +0800)
DataObjects/Core_email.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_email.php
b/DataObjects/Core_email.php
index
729ec24
..
96ec985
100644
(file)
--- a/
DataObjects/Core_email.php
+++ b/
DataObjects/Core_email.php
@@
-388,13
+388,16
@@
class Pman_Core_DataObjects_Core_email extends DB_DataObject
if(empty($contents['subject'])){
$contents['subject'] = $this->subject;
}
if(empty($contents['subject'])){
$contents['subject'] = $this->subject;
}
-
+
if (!empty($contents['subject_replace'])) {
if (!empty($contents['subject_replace'])) {
+
+ // do not use the mapping
if (isset($contents['mapping'])) {
foreach ($contents['mapping'] as $pattern => $replace) {
$contents['subject'] = preg_replace($pattern,$replace,$contents['subject']);
}
}
if (isset($contents['mapping'])) {
foreach ($contents['mapping'] as $pattern => $replace) {
$contents['subject'] = preg_replace($pattern,$replace,$contents['subject']);
}
}
+
foreach ($contents as $k => $v) {
if (is_string($v)) {
$contents['subject'] = str_replace('{'. $k . '}', $v, $contents['subject']);
foreach ($contents as $k => $v) {
if (is_string($v)) {
$contents['subject'] = str_replace('{'. $k . '}', $v, $contents['subject']);
@@
-415,11
+418,8
@@
class Pman_Core_DataObjects_Core_email extends DB_DataObject
}
require_once 'Pman/Core/Mailer.php';
}
require_once 'Pman/Core/Mailer.php';
-
$templateDir = session_save_path() . '/email-cache-' . $ui['name'] ;
$templateDir = session_save_path() . '/email-cache-' . $ui['name'] ;
- //print_r($this);
-
$cfg = array(
'template'=> $this->tableName() . '-' . $this->id,
$cfg = array(
'template'=> $this->tableName() . '-' . $this->id,