[TYPO3-core] RFC: fix bug: 6561 imgMax and imgStart (IMGTEXT) not working properly

Ingmar Schlecht ingmar at typo3.org
Mon Oct 29 22:44:11 CET 2007


Hi Helmut,

thanks for the follow up!

Helmut Hummel wrote:
> Thank you, but I'm very sorry, that I have to admit, that I' ve overseen
> something important. 

Well, those things happen, no problem.

> The images are now shown correctly, but the title,
> captions, links, etc. are wrongly calculated.
> 
> Solution: fill the IMAGE_NUM_CURRENT register with the right index
> number (see attached patch).

IMAGE_NUM and IMAGE_NUM_CURRENT used to be the same. Do you (or Ernesto,
maybe) know what the difference between them is and whether or not
IMAGE_NUM should also be set to the new value? I was just wondering
about that when I was checking the code. I couldn't find any other
occurence of IMAGE_NUM in the code but only some documentation at [1].

Relevant lines:
>  			$GLOBALS['TSFE']->register['IMAGE_NUM'] = $a;
> -			$GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $a;
> +			$GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $a+$imgStart;
>  			$GLOBALS['TSFE']->register['ORIG_FILENAME'] = $totalImagePath;

cheers
Ingmar

[1]
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/8/16/#id3657493



More information about the TYPO3-team-core mailing list