From 9fcff390cdd93d7108a339b497f1c3f69a9d28f4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 16 Nov 2011 23:58:25 +0100 Subject: [PATCH] Fix: should not change var $html here. It is not class html.form.class.php --- htdocs/core/class/CMailFile.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 20f12c52180..f3e238c7bf3 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -63,10 +63,10 @@ class CMailFile var $bodyCSS; // Image - var $form; + var $html; var $image_boundary; var $atleastoneimage=0; - var $form_images=array(); + var $html_images=array(); var $images_encoded=array(); var $image_types = array('gif' => 'image/gif', 'jpg' => 'image/jpeg', @@ -137,6 +137,7 @@ class CMailFile { $this->html = $msg; $findimg = $this->findHtmlImages($conf->fckeditor->dir_output); + // Define if there is at least one file if ($findimg) { @@ -857,6 +858,7 @@ class CMailFile // Build the list of image extensions $extensions = array_keys($this->image_types); + preg_match_all('/(?:"|\')([^"\']+\.('.implode('|', $extensions).'))(?:"|\')/Ui', $this->html, $matches); if ($matches)