Index: t3lib/class.t3lib_befunc.php
===================================================================
--- t3lib/class.t3lib_befunc.php (revision 10241)
+++ t3lib/class.t3lib_befunc.php (working copy)
@@ -1907,9 +1907,23 @@
$onClick = 'top.launchView(\'' . $theFile . '\',\'\',\'' . $backPath . '\');return false;';
$thumbData .= ' ';
} else {
- $icon = self::getFileIcon($ext);
- $url = 'gfx/fileicons/' . $icon;
- $thumbData .= ' ';
+ // Icon
+ $theFile_abs = PATH_site . ($uploaddir ? $uploaddir . '/' : '') . trim($theFile);
+ $theFile = ($abs ? '' : '../') . ($uploaddir ? $uploaddir . '/' : '') . trim($theFile);
+
+ $fileIcon = t3lib_iconWorks::getSpriteIconForFile(
+ strtolower($ext),
+ array('title' => htmlspecialchars(trim($theFile)))
+ );
+
+ $check = basename($theFile_abs) . ':' . filemtime($theFile_abs) . ':' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'];
+ $params = '&file=' . rawurlencode($theFile);
+ $params .= $size ? '&size=' . $size : '';
+ $params .= '&md5sum=' . t3lib_div::shortMD5($check);
+
+ $url = $thumbScript . '?&dummy=' . $GLOBALS['EXEC_TIME'] . $params;
+ $onClick = 'top.launchView(\'' . $theFile . '\',\'\',\'' . $backPath . '\');return false;';
+ $thumbData .= '' . $fileIcon . ' ';
}
}
}
Index: t3lib/class.t3lib_tceforms.php
===================================================================
--- t3lib/class.t3lib_tceforms.php (revision 10241)
+++ t3lib/class.t3lib_tceforms.php (working copy)
@@ -2226,25 +2226,7 @@
$rowCopy = array();
$rowCopy[$field] = $imgPath;
- // Icon + clickmenu:
- $absFilePath = t3lib_div::getFileAbsFileName($config['uploadfolder'] ? $config['uploadfolder'] . '/' . $imgPath : $imgPath);
-
- $fI = pathinfo($imgPath);
- $fileIcon = t3lib_iconWorks::getSpriteIconForFile(
- strtolower($fI['extension']),
- array(
- 'title' => htmlspecialchars(
- $fI['basename'] .
- ($absFilePath && @is_file($absFilePath)
- ? ' (' . t3lib_div::formatSize(filesize($absFilePath)) . 'bytes)' :
- ' - FILE NOT FOUND!'
- )
- )
- )
- );
-
$imgs[] = '' . t3lib_BEfunc::thumbCode($rowCopy, $table, $field, $this->backPath, 'thumbs.php', $config['uploadfolder'], 0, ' align="middle"') .
- ($absFilePath ? $this->getClickMenu($fileIcon, $absFilePath) : $fileIcon) .
$imgPath .
'';
}