diff --ignore-all-space -ru typo3_src_trunk.orig/t3lib/class.t3lib_stdgraphic.php typo3_src_trunk.new/t3lib/class.t3lib_stdgraphic.php --- typo3_src_trunk.orig/t3lib/class.t3lib_stdgraphic.php 2011-01-16 07:46:33.000000000 +0300 +++ typo3_src_trunk.new/t3lib/class.t3lib_stdgraphic.php 2011-01-16 09:36:52.000000000 +0300 @@ -2357,8 +2357,8 @@ */ function cacheImageDimensions($identifyResult) { global $TYPO3_DB; - // Create a md5 hash of the filename - $md5Hash = md5_file($identifyResult[3]); + // Create a md5 hash of the filemtime and filesize + $md5Hash = md5(filemtime($identifyResult[3]) . filesize($identifyResult[3])); if ($md5Hash) { $fieldArr = array( 'md5hash' => $md5Hash, @@ -2385,9 +2385,8 @@ */ function getCachedImageDimensions($imageFile) { global $TYPO3_DB; - // Create a md5 hash of the filename - $md5Hash = md5_file($imageFile); - preg_match('/([^\.]*)$/', $imageFile, $reg); + // Create a md5 hash of the filemtime and filesize + $md5Hash = md5(filemtime($imageFile) . filesize($imageFile)); $res = $TYPO3_DB->exec_SELECTquery('md5hash, imagewidth, imageheight', 'cache_imagesizes', 'md5filename=' . $TYPO3_DB->fullQuoteStr(md5($imageFile), 'cache_imagesizes')); if ($res) { if ($row = $TYPO3_DB->sql_fetch_assoc($res)) { @@ -2395,6 +2394,7 @@ // file has changed, delete the row $TYPO3_DB->exec_DELETEquery('cache_imagesizes', 'md5hash=' . $TYPO3_DB->fullQuoteStr($row['md5hash'], 'cache_imagesizes')); } else { + preg_match('/([^\.]*)$/', $imageFile, $reg); return (array((int) $row['imagewidth'], (int) $row['imageheight'], strtolower($reg[0]), $imageFile)); } } Only in typo3_src_trunk.new/t3lib: class.t3lib_stdgraphic.php.orig