projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9cd4c65
)
Mailer.php
author
Edward
<edward@roojs.com>
Tue, 24 Jul 2018 05:13:08 +0000
(13:13 +0800)
committer
Edward
<edward@roojs.com>
Tue, 24 Jul 2018 05:13:08 +0000
(13:13 +0800)
Mailer.php
patch
|
blob
|
history
diff --git
a/Mailer.php
b/Mailer.php
index
334baa3
..
24a9a70
100644
(file)
--- a/
Mailer.php
+++ b/
Mailer.php
@@
-386,7
+386,7
@@
class Pman_Core_Mailer {
@$dom->loadHTML('<?xml encoding="UTF-8">' .$html);
$imgs= $dom->getElementsByTagName('img');
@$dom->loadHTML('<?xml encoding="UTF-8">' .$html);
$imgs= $dom->getElementsByTagName('img');
- $
test
= array();
+ $
urls
= array();
foreach ($imgs as $i=>$img) {
$url = $img->getAttribute('src');
foreach ($imgs as $i=>$img) {
$url = $img->getAttribute('src');
@@
-397,7
+397,15
@@
class Pman_Core_Mailer {
if ($me == 'no') {
continue;
}
if ($me == 'no') {
continue;
}
- $test[] = $url;
+
+ if(!array_key_exists($url, $urls)){
+ $conv = $this->fetchImage($url);
+ $this->images[$conv['contentid']] = $conv;
+ } else {
+ $conv = $urls[$url];
+ }
+
+
}
print_R($test);exit;
}
print_R($test);exit;