[BUGFIX] Set currentVal in 2nd rendering loop of IMGTEXT
authorChristian Welzel <gawain@camlann.de>
Tue, 15 Nov 2011 15:16:06 +0000 (16:16 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Sun, 18 Dec 2011 10:42:02 +0000 (11:42 +0100)
Set the currentVal to the current filename during rendering of
HTML in the second rendering loop. This makes current=1 useful for
rendering captions.

Change-Id: I335bb2f744f9352428f6b0d1931ccf2d80f45bb6
Fixes: #28794
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/6676
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php

index 477bff1..a8a6dd8 100755 (executable)
@@ -864,6 +864,7 @@ class tx_cssstyledcontent_pi1 extends tslib_pibase {
 
                                                        // Register IMAGE_NUM_CURRENT for the caption
                                                $GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $imageKey;
+                                               $this->cObj->data[$this->cObj->currentValKey] = $origImages[$imageKey]['origFile'];
 
                                                        // Get the image if not an empty cell
                                                if (isset($imgsTag[$imageKey])) {