Revert "[BUGFIX] IMG_RESOURCE does not prepend absRefPrefix" 31/44631/7
authorAndreas Allacher <andreas.allacher@gmx.at>
Mon, 9 Nov 2015 11:55:35 +0000 (12:55 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Mon, 9 Nov 2015 12:39:32 +0000 (13:39 +0100)
This reverts commit 23df34dc7bd995a5a7ad5f8ee65cde7c828674b2.
Due to this change in various instances the absRefPrefix was appended twice because of this commit.
If one wants to fix the issue one could modify
\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::setAbsRefPrefix()
to also e.g. include single quotes.

Change-Id: Iba731a6bd44ebef71d1bca8c77ebc1c166cd175e
Releases: master, 6.2
Resolves: #71435
Resolves: #70718
Reverts: #69516
Reviewed-on: https://review.typo3.org/44631
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/frontend/Classes/ContentObject/ImageResourceContentObject.php

index a68df7a..3a41db4 100644 (file)
@@ -23,17 +23,14 @@ class ImageResourceContentObject extends AbstractContentObject
      * Rendering the cObject, IMG_RESOURCE
      *
      * @param array $conf Array of TypoScript properties
+     *
      * @return string Output
      */
-    public function render($conf = array())
+    public function render($conf = [])
     {
         $GLOBALS['TSFE']->lastImgResourceInfo = $this->cObj->getImgResource($conf['file'], $conf['file.']);
         if ($GLOBALS['TSFE']->lastImgResourceInfo) {
-            $urlPrefix = '';
-            if (parse_url($GLOBALS['TSFE']->lastImgResourceInfo[3], PHP_URL_HOST) === null) {
-                $urlPrefix = $GLOBALS['TSFE']->absRefPrefix;
-            }
-            $imageResource = $urlPrefix . $GLOBALS['TSFE']->lastImgResourceInfo[3];
+            $imageResource = $GLOBALS['TSFE']->lastImgResourceInfo[3];
             $theValue = isset($conf['stdWrap.']) ? $this->cObj->stdWrap($imageResource, $conf['stdWrap.']) : $imageResource;
         } else {
             $theValue = '';