Project

General

Profile

Bug #19596 » 9773_fallback.diff

Administrator Admin, 2008-11-11 23:49

View differences:

t3lib/class.t3lib_iconworks.php (working copy)
$fExt = $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['forceFileExtension'];
$scaleFactor = $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['scaleFactor'] ? $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['scaleFactor'] : 1; // Scaling factor
$lookUpName = $fExt ? ereg_replace('\.[[:alnum:]]+$', '', $srcKey).'.'.$fExt : $srcKey; // Set filename to look for
if ($fExt && !@is_file($GLOBALS['TBE_STYLES']['skinImgAutoCfg']['absDir'] . $lookUpName)) {
// fallback to original filename if icon with forced extension doesn't exists
$lookUpName = $srcKey;
}
// If file is found:
if (@is_file($GLOBALS['TBE_STYLES']['skinImgAutoCfg']['absDir'].$lookUpName)) { // If there is a file...
$iInfo = @getimagesize($GLOBALS['TBE_STYLES']['skinImgAutoCfg']['absDir'].$lookUpName); // Get width/height:
(3-3/3)