Added feature #16283: Optimize stdWrap usage for TypoScript content element IMG_RESOU...
authorErnesto Baschny <ernst@cron-it.de>
Tue, 16 Nov 2010 21:15:31 +0000 (21:15 +0000)
committerErnesto Baschny <ernst@cron-it.de>
Tue, 16 Nov 2010 21:15:31 +0000 (21:15 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9413 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/content/class.tslib_content_imageresource.php

index d9a7786..1bad598 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,7 @@
 
        * Added feature #15668: TYPO3 Backend should display flags for translations as sprite icons (Thanks to Steffen Ritter)
        * Follow-up to #16111: Fixed display of group/db selector getting displayed below since this feature (e.g. sys_template.baseOn)
+       * Added feature #16283: Optimize stdWrap usage for TypoScript content element IMG_RESOURCE (Thanks to Joey Hasenau)
 
 2010-11-16  Sebastian Kurfuerst  <sebastian@typo3.org>
 
index d4bb5da..d59016f 100644 (file)
@@ -42,8 +42,17 @@ class tslib_content_ImageResource extends tslib_content_Abstract {
         * @return      string          Output
         */
        public function render($conf = array()) {
+
                $GLOBALS['TSFE']->lastImgResourceInfo = $this->cObj->getImgResource($conf['file'], $conf['file.']);
-               return $this->cObj->stdWrap($GLOBALS['TSFE']->lastImgResourceInfo[3], $conf['stdWrap.']);
+
+               $imageResource = $GLOBALS['TSFE']->lastImgResourceInfo[3];
+
+               $theValue = isset($conf['stdWrap.'])
+                       ? $this->cObj->stdWrap($imageResource, $conf['stdWrap.'])
+                       : $imageResource;
+
+               return $theValue;
+
        }
 
 }