[BUGFIX] Make generated thumbnails browser-cachable
[Packages/TYPO3.CMS.git] / typo3 / class.file_list.inc
index 3c1b7b1..dc1c2ec 100644 (file)
@@ -477,20 +477,22 @@ class fileList extends t3lib_recordList {
                                                                $theData[$field]=$this->makeRef($theFile);
                                                        break;
                                                        case 'file':
-                                                               $theData[$field] = $this->linkWrapFile($theFile[$field],$theFile['path'].$theFile['file']);
+                                                               $theData[$field] = $this->linkWrapFile($theFile[$field], $theFile['path'] . $theFile['file']);
                                                                        // Thumbsnails?
-                                                               if ($this->thumbs && $this->isImage($theFile['fileext']))       {
+                                                               if ($this->thumbs && $this->isImage($theFile['fileext'])) {
                                                                        $thumbData = array();
-                                                                       $theFile_R = rawurlencode($theFile['path'].$theFile['file']);
+                                                                       $theFile_R = rawurlencode($theFile['path'] . $theFile['file']);
                                                                        $titleCol = $this->fieldArray[0];
 
-                                                                       $theFile_abs = $theFile['path'].$theFile['file'];
-                                                                       $check = basename($theFile_abs).':'.filemtime($theFile_abs).':'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'];
-                                                                       $params = '&file='.$theFile_R;
-                                                                       $params.= '&md5sum='.t3lib_div::shortMD5($check);
-                                                                       $href = $this->backPath.$this->thumbScript.'?&dummy='.$GLOBALS['EXEC_TIME'].$params;
+                                                                       $theFile_abs = $theFile['path'] . $theFile['file'];
+                                                                       $check = basename($theFile_abs) . ':' . filemtime($theFile_abs) .
+                                                                                       ':' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'];
+                                                                       $params = '&file=' . $theFile_R;
+                                                                       $params.= '&md5sum=' . md5($check);
+                                                                       $href = $this->backPath . $this->thumbScript . '?' . $params;
 
-                                                                       $theData[$field] .= '<br /><img src="'.htmlspecialchars($href).'" hspace="2" title="'.htmlspecialchars(trim($theFile['file'])).'" alt="'.htmlspecialchars(trim($theFile['file'])).'" />';
+                                                                       $theData[$field] .= '<br /><img src="' . htmlspecialchars($href) . '" hspace="2" title="' .
+                                                                                       htmlspecialchars(trim($theFile['file'])) . '" alt="' . htmlspecialchars(trim($theFile['file'])) . '" />';
                                                                }
                                                        break;
                                                        default: