[BUGFIX] Prevent duplicate stdWrap for media content
authorAlexander Stehlik <alexander.stehlik@googlemail.com>
Thu, 9 Jun 2011 22:17:14 +0000 (00:17 +0200)
committerJigal van Hemert <jigal@xs4all.nl>
Fri, 7 Oct 2011 13:02:53 +0000 (15:02 +0200)
All the standard renderers handle stdWrap themselves, so the general stdWrap
handling should be moved to the customMediaRenderer block to prevent duplicate
calls to stdWrap.

Change-Id: Ic0db017ad1d037636f1cb40994695686a2904c76
Fixes: #25277
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/2620
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
typo3/sysext/cms/tslib/content/class.tslib_content_media.php

index 0a359dd..e7cf96f 100644 (file)
@@ -37,8 +37,8 @@ class tslib_content_Media extends tslib_content_Abstract {
        /**
         * Rendering the cObject, MEDIA
         *
-        * @param       array           Array of TypoScript properties
-        * @return      string          Output
+        * @param $conf array Array of TypoScript properties
+        * @return string Output
         */
        public function render($conf = array()) {
                $content = '';
@@ -228,10 +228,9 @@ class tslib_content_Media extends tslib_content_Abstract {
                                                $content = $hookObj->customMediaRender($renderType, $conf, $this);
                                        }
                                }
-               }
-
-               if (isset($conf['stdWrap.'])) {
-                       $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
+                               if (isset($conf['stdWrap.'])) {
+                                       $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
+                               }
                }
 
                return $content;