projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88aa5a0
)
DataObjects/Core_email.php
author
Alan Knowles
<alan@roojs.com>
Thu, 11 Jun 2015 05:53:18 +0000
(13:53 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 11 Jun 2015 05:53:18 +0000
(13:53 +0800)
DataObjects/Core_email.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_email.php
b/DataObjects/Core_email.php
index
278c45f
..
9249f38
100644
(file)
--- a/
DataObjects/Core_email.php
+++ b/
DataObjects/Core_email.php
@@
-188,11
+188,16
@@
class Pman_Core_DataObjects_Core_email extends DB_DataObject
foreach ($xpath->query('//img[@src]') as $img) { // process images!
$href = $img->getAttribute('src');
- $
cid = explode('-', array_pop(explode('#', $href))
);
+ $
hash = explode('#', $href
);
// we name all our cid's as attachment-*
+ // however the src url may be #image-*
- if(isset($cid[1])){
+ if(!isset($hash[1])){
+ continue;
+ }
+ $cid = explode('-', $hash[1]);
+ if(!empty($cid[1])){
$img->setAttribute('src', 'cid:' . $cid[1]);
}
}