Follow-up to feature #5835: Fix formatting and remove superfluous wrap in tslib_conte...
authorOliver Hader <oliver.hader@typo3.org>
Sat, 20 Dec 2008 14:22:26 +0000 (14:22 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Sat, 20 Dec 2008 14:22:26 +0000 (14:22 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4578 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_content.php

index 9dce899..3ee36a5 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-20  Oliver Hader  <oliver@typo3.org>
+
+       * Follow-up to feature #5835: Fix formatting and remove superfluous wrap in tslib_content::wrapSpace()
+
 2008-12-19  Steffen Kamper  <info@sk-typo3.de>
 
        * Fixed bug #9964: Missing file icon PPT
 2008-12-19  Steffen Kamper  <info@sk-typo3.de>
 
        * Fixed bug #9964: Missing file icon PPT
@@ -22,7 +26,7 @@
 
 2008-12-18  Thorsten Kahler  <thorsten.kahler@dkd.de>
 
 
 2008-12-18  Thorsten Kahler  <thorsten.kahler@dkd.de>
 
-       * Fixed bug #5835: get rid of clear.gif with space (thanks to Susanne Moog)
+       * Added feature #5835: get rid of clear.gif with space (thanks to Susanne Moog)
 
 2008-12-18  Ernesto Baschny  <ernst@cron-it.de>
 
 
 2008-12-18  Ernesto Baschny  <ernst@cron-it.de>
 
index da856a7..5042395 100755 (executable)
@@ -5959,28 +5959,28 @@ class tslib_cObj {
         * @param       array           Configuration from TypoScript
         * @return      string          Wrapped string
         */
         * @param       array           Configuration from TypoScript
         * @return      string          Wrapped string
         */
-       function wrapSpace($content, $wrap, $conf='')   {
-               $result = $content;
+       function wrapSpace($content, $wrap, array $conf = NULL) {
                if (trim($wrap)) {
                        $wrapArray = explode('|',$wrap);
                        $wrapBefore = intval($wrapArray[0]);
                        $wrapAfter = intval($wrapArray[1]);
                if (trim($wrap)) {
                        $wrapArray = explode('|',$wrap);
                        $wrapBefore = intval($wrapArray[0]);
                        $wrapAfter = intval($wrapArray[1]);
+                       $useDivTag = (isset($conf['useDiv']) && $conf['useDiv']);
                        if ($wrapBefore) {
                        if ($wrapBefore) {
-                               if($conf['useDiv']) {
-                                       $result = $this->wrap($wrapBefore, '<div class="content-spacer spacer-before" style="height:|px;"></div>') . $result;
+                               if($useDivTag) {
+                                       $content = '<div class="content-spacer spacer-before" style="height:' . $wrapBefore . 'px;"></div>' . $content;
                                } else {
                                } else {
-                                       $result = '<img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="1" height="'.$wrapBefore.'"'.$this->getBorderAttr(' border="0"').' class="spacer-gif" alt="" title="" /><br />'.$result;
+                                       $content = '<img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="1" height="' . $wrapBefore . '"' . $this->getBorderAttr(' border="0"') . ' class="spacer-gif" alt="" title="" /><br />' . $content;
                                }
                        }
                        if ($wrapAfter) {
                                }
                        }
                        if ($wrapAfter) {
-                               if($conf['useDiv']) {
-                                       $result = $result . $this->wrap($wrapAfter, '<div class="content-spacer spacer-after" style="height:|px;"></div>');
+                               if($useDivTag) {
+                                       $content.= '<div class="content-spacer spacer-after" style="height:' . $wrapAfter . 'px;"></div>';
                                } else {
                                } else {
-                                       $result.='<img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="1" height="'.$wrapAfter.'"'.$this->getBorderAttr(' border="0"').' class="spacer-gif" alt="" title="" /><br />';
+                                       $content.= '<img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="1" height="' . $wrapAfter . '"' . $this->getBorderAttr(' border="0"') . ' class="spacer-gif" alt="" title="" /><br />';
                                }
                        }
                }
                                }
                        }
                }
-               return $result;
+               return $content;
        }
 
        /**
        }
 
        /**