"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core-bundle/src/Resources/contao/library/Contao/Email.php" between
contao-4.8.1.tar.gz and contao-4.8.2.tar.gz

About: Contao (fka TYPOlight) is a content management system (CMS). Latest release.

Email.php  (contao-4.8.1):Email.php  (contao-4.8.2)
skipping to change at line 71 skipping to change at line 71
/** /**
* Sender name * Sender name
* @var string * @var string
*/ */
protected $strSenderName; protected $strSenderName;
/** /**
* E-mail priority * E-mail priority
* @var integer * @var integer
*/ */
protected $intPriority = 3; protected $intPriority;
/** /**
* E-mail subject * E-mail subject
* @var string * @var string
*/ */
protected $strSubject; protected $strSubject;
/** /**
* Text part of the e-mail * Text part of the e-mail
* @var string * @var string
skipping to change at line 372 skipping to change at line 372
$arrRecipients = $this->compileRecipients(\func_get_args()); $arrRecipients = $this->compileRecipients(\func_get_args());
if (empty($arrRecipients)) if (empty($arrRecipients))
{ {
return false; return false;
} }
$this->objMessage->setTo($arrRecipients); $this->objMessage->setTo($arrRecipients);
$this->objMessage->setCharset($this->strCharset); $this->objMessage->setCharset($this->strCharset);
// Add the priority if it has been set (see #608)
if ($this->intPriority !== null)
{
$this->objMessage->setPriority($this->intPriority);
}
// Default subject // Default subject
if ($this->strSubject == '') if ($this->strSubject == '')
{ {
$this->strSubject = 'No subject'; $this->strSubject = 'No subject';
} }
$this->objMessage->setSubject($this->strSubject); $this->objMessage->setSubject($this->strSubject);
// HTML e-mail // HTML e-mail
if ($this->strHtml != '') if ($this->strHtml != '')
skipping to change at line 410 skipping to change at line 416
{ {
for ($i=0, $c=\count($arrMatches[0]); $i< $c; $i++) for ($i=0, $c=\count($arrMatches[0]); $i< $c; $i++)
{ {
$url = $arrMatches[3][$i]; $url = $arrMatches[3][$i];
// Try to remove the base URL // Try to remove the base URL
$src = str_replace($strBase, '', $url); $src = str_replace($strBase, '', $url);
$src = rawurldecode($src); // see #3713 $src = rawurldecode($src); // see #3713
// Embed the image if the URL is now relative // Embed the image if the URL is now relative
if (!preg_match('@^https?://@', $ src) && file_exists($this->strImageDir . $src)) if (!preg_match('@^https?://@', $ src) && ($objFile = new File(StringUtil::stripRootDir($this->strImageDir . $src) )) && ($objFile->exists() || $objFile->createIfDeferred()))
{ {
if (!isset($arrCid[$src]) ) if (!isset($arrCid[$src]) )
{ {
$arrCid[$src] = $ this->objMessage->embed(\Swift_EmbeddedFile::fromPath($this->strImageDir . $src) ); $arrCid[$src] = $ this->objMessage->embed(\Swift_EmbeddedFile::fromPath($this->strImageDir . $src) );
} }
$this->strHtml = str_repl ace($arrMatches[1][$i] . $arrMatches[3][$i] . $arrMatches[5][$i], $arrMatches[1] [$i] . $arrCid[$src] . $arrMatches[5][$i], $this->strHtml); $this->strHtml = str_repl ace($arrMatches[1][$i] . $arrMatches[3][$i] . $arrMatches[5][$i], $arrMatches[1] [$i] . $arrCid[$src] . $arrMatches[5][$i], $this->strHtml);
} }
} }
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)