[BUGFIX] Avoid double wrap in css_styled_content 58/21358/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 11:36:28 +0000 (13:36 +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/21358
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Francois Suter
Tested-by: Francois Suter
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php

index 9478a19..3a06f7c 100644 (file)
@@ -97,10 +97,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;
                }
@@ -229,10 +225,6 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                        $out = '
                                <table ' . GeneralUtility::implodeAttributes($tableTagParams) . '>' . $tableContents . '
                                </table>';
-                       // Calling stdWrap:
-                       if ($conf['stdWrap.']) {
-                               $out = $this->cObj->stdWrap($out, $conf['stdWrap.']);
-                       }
                        // Return value
                        return $out;
                }
@@ -374,10 +366,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;
                }
@@ -490,9 +478,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 = GeneralUtility::trimExplode(',', $imgList);
@@ -1049,9 +1034,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;
        }