[BUGFIX] Prevent duplicate stdWrap for media content
authorAlexander Stehlik <alexander.stehlik@googlemail.com>
Thu, 9 Jun 2011 22:17:14 +0000 (00:17 +0200)
committerGeorg Ringer <mail@ringerge.org>
Wed, 8 Feb 2012 06:39:10 +0000 (07:39 +0100)
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: I4a8214d789721b68a0f9e5f55e4a27fc91a0e7cf
Fixes: #25277
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/7121
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/cms/tslib/content/class.tslib_content_media.php

index 802c4e3..97b9c76 100644 (file)
@@ -38,8 +38,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 = $mmFile = '';
@@ -230,10 +230,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;