[BUGFIX] Make generated thumbnails browser-cachable
[Packages/TYPO3.CMS.git] / typo3 / show_item.php
index a3acbad..53eaafe 100644 (file)
@@ -401,15 +401,16 @@ class SC_show_item {
                        }
 
                                // Font files:
-                       if ($ext=='ttf')        {
+                       if ($ext == 'ttf') {
                                $thumbScript = 'thumbs.php';
-                               $check = basename($this->file).':'.filemtime($this->file).':'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'];
-                               $params = '&file='.rawurlencode($this->file);
-                               $params.= '&md5sum='.t3lib_div::shortMD5($check);
-                               $url = $thumbScript.'?&dummy='.$GLOBALS['EXEC_TIME'].$params;
+                               $check = basename($this->file) . ':' . filemtime($this->file) . ':' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'];
+                               $params = '&file=' . rawurlencode($this->file);
+                               $params .= '&md5sum=' . md5($check);
+                               $url = $thumbScript . '?' . $params;
                                $thumb = '<br />
-                                       <div align="center">'.$returnLinkTag.'<img src="'.htmlspecialchars($url).'" border="0" title="'.htmlspecialchars(trim($this->file)).'" alt="" /></a></div>';
-                               $this->content.= $this->doc->section('',$thumb);
+                                       <div align="center">' . $returnLinkTag . '<img src="' . htmlspecialchars($url) .
+                                       '" border="0" title="' . htmlspecialchars(trim($this->file)) . '" alt="" /></a></div>';
+                               $this->content .= $this->doc->section('', $thumb);
                        }
                }