Skip to content

Commit

Permalink
Rename to createIfDeferred()
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Sep 2, 2019
1 parent 59dcfd1 commit e4f807d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core-bundle/src/Resources/contao/library/Contao/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ public function sendTo()
$src = rawurldecode($src); // see #3713

// Embed the image if the URL is now relative
if (!preg_match('@^https?://@', $src) && ($objFile = new File(StringUtil::stripRootDir($this->strImageDir . $src))) && ($objFile->exists() || $objFile->createDeferredImage()))
if (!preg_match('@^https?://@', $src) && ($objFile = new File(StringUtil::stripRootDir($this->strImageDir . $src))) && ($objFile->exists() || $objFile->createIfDeferred()))
{
if (!isset($arrCid[$src]))
{
Expand Down
4 changes: 2 additions & 2 deletions core-bundle/src/Resources/contao/library/Contao/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ public function getModel()
*
* @return bool True if a deferred image was resized otherwise false
*/
public function createDeferredImage()
public function createIfDeferred()
{
if (!$this->exists())
{
Expand Down Expand Up @@ -634,7 +634,7 @@ public function createDeferredImage()
*/
public function getContent()
{
$this->createDeferredImage();
$this->createIfDeferred();

$strContent = file_get_contents($this->strRootDir . '/' . ($this->strTmp ?: $this->strFile));

Expand Down

0 comments on commit e4f807d

Please sign in to comment.