[TYPO3-core] RFC #13461: bugfix: wrong image-path returned in class.t3lib_tceforms.php if TYPO3-source is symlinked (backend-redesign)

Steffen Gebert steffen at steffen-gebert.de
Sun Mar 28 13:43:54 CEST 2010


Am 11.03.2010, 13:32 Uhr, schrieb Stephan N Kellermayr  
<stephan.kellermayr at t3x.at>:

> bugtracker references:
> http://bugs.typo3.org/view.php?id=13461
>
> branches:
> trunk, current branch
>
> problem:
> if an extension is installed in 'typo3conf/ext/' and overrides BE-icons,
> the result of 't3lib_iconWorks::skinImg' (line:4008 in
> class.t3lib_tceforms.php) is i.e.
> "../typo3conf/ext/myextension/icons/gfx/i/pages.gif".
> thats correct, but if we use a symlinked TYPO3-source we get an
> incorrect path to the imagefile and so we do not get the correct
> image-dimensions from 'getimagesize' (line:4010)!
> ...
> solution:
> if 't3lib_iconWorks::skinImg' returns a filename beginning with '../'
> resolve the absolute path to the file and then get the correct
> image-dimensions.
>

Hi Stephan,

thanks for your patch.

Please follow the Coding Guidelines.
This line
> if (substr($selIconFile,0,3)=='../')	{
has to be
> if (substr($selIconFile, 0, 3) == '../') {

Shouldn't it be possible without the if-clause?
Just to have sth. like
> getimagesize(t3lib_div::resolveBackPath(PATH_typo3 . $selIconFile));

This would simplify the code.

Bye
Steffen


More information about the TYPO3-team-core mailing list