Fixed bug #6561: imgMax and imgStart (IMGTEXT) not working properly
authorIngmar Schlecht <ingmar.schlecht@typo3.org>
Sat, 27 Oct 2007 18:24:05 +0000 (18:24 +0000)
committerIngmar Schlecht <ingmar.schlecht@typo3.org>
Sat, 27 Oct 2007 18:24:05 +0000 (18:24 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-1@2624 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php

index 145cdfd..131d49a 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * Fixed bug #1940: "OPEN DOCUMENTS" causes 404 error (Thanks to Christian Trabold)
        * Fixed bug #5082: Clean up a nested htmlspecialchars() in class.db_list_extra.inc (Thanks to Christian Kuhn)
+       * Fixed bug #6561: imgMax and imgStart (IMGTEXT) not working properly (Thanks to Helmut Hummel)
 
 2007-10-26  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
 
index 1d9190c..5770462 100755 (executable)
@@ -548,7 +548,7 @@ class tx_cssstyledcontent_pi1 extends tslib_pibase {
                $splitArr = $GLOBALS['TSFE']->tmpl->splitConfArray($splitArr, $imgCount);
 
                $imageRowsFinalWidths = Array();        // contains the width of every image row
-               $imgsTag = array();
+               $imgsTag = array();             // array index 0 will be the first shown image
                $origImages = array();
                for ($a=0; $a<$imgCount; $a++)  {
                        $imgKey = $a+$imgStart;
@@ -632,14 +632,14 @@ class tx_cssstyledcontent_pi1 extends tslib_pibase {
                                                $imgConf['emptyTitleHandling'] = 'removeAttr';
                                        }
                                }
-                               $imgsTag[$imgKey] = $this->cObj->IMAGE($imgConf);
+                               $imgsTag[$a] = $this->cObj->IMAGE($imgConf);
                        } else {
-                               $imgsTag[$imgKey] = $this->cObj->IMAGE(Array('file' => $totalImagePath));       // currentValKey !!!
+                               $imgsTag[$a] = $this->cObj->IMAGE(Array('file' => $totalImagePath));    // currentValKey !!!
                        }
                                // Restore our ATagParams
                        $GLOBALS['TSFE']->ATagParams = $oldATagParms;
                                // Store the original filepath
-                       $origImages[$imgKey] = $GLOBALS['TSFE']->lastImageInfo;
+                       $origImages[$a] = $GLOBALS['TSFE']->lastImageInfo;
 
                        $imageRowsFinalWidths[floor($a/$colCount)] += $GLOBALS['TSFE']->lastImageInfo[0];
                }