[BUGFIX] Avoid double wrap in css_styled_content 64/21364/3
authorFrancois Suter <francois@typo3.org>
Wed, 12 Jun 2013 09:38:47 +0000 (11:38 +0200)
committerFrancois Suter <francois@typo3.org>
Wed, 12 Jun 2013 13:07:28 +0000 (15:07 +0200)
Since TYPO3 6.0, USER objects have stdWrap property. The
various render methods of css_styled_content still call
stdWrap themselves, resulting in a double wrap.

Remove the stdWrap calls in css_styled_content render methods.

Resolves: #49051
Releases: 6.0, 6.1, 6.2
Change-Id: I3092990a4d1efb12597dc543c222a727135d63ec
Reviewed-on: https://review.typo3.org/21364
Reviewed-by: Francois Suter
Tested-by: Francois Suter
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php

index f43178a..dc41aff 100644 (file)
@@ -100,10 +100,6 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                        $out = '
                                <ul class="csc-bulletlist csc-bulletlist-' . $type . '">' . implode('', $lines) . '
                                </ul>';
-                       // Calling stdWrap:
-                       if ($conf['stdWrap.']) {
-                               $out = $this->cObj->stdWrap($out, $conf['stdWrap.']);
-                       }
                        // Return value
                        return $out;
                }
@@ -230,10 +226,6 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                        $out = '
                                <table ' . \TYPO3\CMS\Core\Utility\GeneralUtility::implodeAttributes($tableTagParams) . '>' . $tableContents . '
                                </table>';
-                       // Calling stdWrap:
-                       if ($conf['stdWrap.']) {
-                               $out = $this->cObj->stdWrap($out, $conf['stdWrap.']);
-                       }
                        // Return value
                        return $out;
                }
@@ -370,10 +362,6 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                                // Compile it all into table tags:
                                $out = $this->cObj->wrap(implode('', $outputEntries), $outerWrap);
                        }
-                       // Calling stdWrap:
-                       if ($conf['stdWrap.']) {
-                               $out = $this->cObj->stdWrap($out, $conf['stdWrap.']);
-                       }
                        // Return value
                        return $out;
                }
@@ -483,9 +471,6 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                $imgList = trim($this->cObj->stdWrap($conf['imgList'], $conf['imgList.']));
                if (!$imgList) {
                        // No images, that's easy
-                       if (is_array($conf['stdWrap.'])) {
-                               return $this->cObj->stdWrap($content, $conf['stdWrap.']);
-                       }
                        return $content;
                }
                $imgs = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $imgList);
@@ -1024,9 +1009,6 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                $output = str_replace('###TEXT###', $content, $output);
                $output = str_replace('###IMAGES###', $images, $output);
                $output = str_replace('###CLASSES###', $class, $output);
-               if ($conf['stdWrap.']) {
-                       $output = $this->cObj->stdWrap($output, $conf['stdWrap.']);
-               }
                return $output;
        }