X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Mailer.php;h=24a9a70e611f0f3c9b7438d709c7d6c9cfceae13;hb=fd17a6eeb2c5bbe5ec7575da642a0aee021faac4;hp=334baa3e76aca983185fe0e33fe923fcceb6c056;hpb=9cd4c657915086676e3fb949c21261c73cf97a91;p=Pman.Core diff --git a/Mailer.php b/Mailer.php index 334baa3e..24a9a70e 100644 --- a/Mailer.php +++ b/Mailer.php @@ -386,7 +386,7 @@ class Pman_Core_Mailer { @$dom->loadHTML('' .$html); $imgs= $dom->getElementsByTagName('img'); - $test = array(); + $urls = array(); foreach ($imgs as $i=>$img) { $url = $img->getAttribute('src'); @@ -397,7 +397,15 @@ class Pman_Core_Mailer { 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;