Changeset 423
- Timestamp:
- 07/03/06 00:04:53 (2 years ago)
- Files:
-
- devel/_icons/icon.php (modified) (2 diffs)
- devel/lib/filelib.php (modified) (2 diffs)
- devel/lib/phpthumb/phpThumb.config.php (modified) (1 diff)
- devel/units/files/weblogs_posts_add_fields.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/_icons/icon.php
r421 r423 36 36 $filepath = $CFG->dirroot.'_icons/data/default.png'; 37 37 $mimetype = 'image/png'; 38 header("Cache-Control: public");39 38 } else { 40 39 $mimetype = mimeinfo('type', $file->filename); 41 // "Cache-Control: private" to allow a user's browser to cache the file, but not a shared proxy42 // Also to override PHP's default "DON'T EVER CACHE THIS EVER" header43 header("Cache-Control: private");44 40 } 41 45 42 46 43 // Then output some appropriate headers and send the file data! … … 63 60 } 64 61 62 // user icons are public 63 header("Cache-Control: public"); 64 65 65 if (!empty($phpthumb)) { 66 66 // let phpthumb manipulate the image devel/lib/filelib.php
r421 r423 476 476 $lm = gmdate("D, d M Y H:i:s", $tstamp) . " GMT"; 477 477 478 $timenow = time(); 479 480 // Send last-modified header to enable if-modified-since requests 481 if ($tstamp < $timenow) { 482 header("Last-Modified: " . $lm); 483 } 484 485 if ($tstamp < ($timenow - 3600)) { 486 header('Expires: ' . gmdate("D, d M Y H:i:s", ($timenow+3600)) . " GMT"); 487 } 488 478 489 // Send 304s where possible, rather than spitting out the file each time 479 490 if (array_key_exists('HTTP_IF_MODIFIED_SINCE',$_SERVER)) { … … 485 496 } 486 497 487 // Send last-modified header to enable if-modified-since requests488 if ($tstamp < time()) {489 header("Last-Modified: " . $lm);490 }491 492 498 if ($mimetype) { 493 499 header("Content-type: $mimetype"); devel/lib/phpthumb/phpThumb.config.php
r422 r423 49 49 50 50 //$PHPTHUMB_CONFIG['cache_maxsize'] = null; // never delete cached thumbnails based on byte size of cache directory 51 $PHPTHUMB_CONFIG['cache_maxsize'] = 10 * 1024 * 1024; // delete least-recently-accessed cached thumbnails when more than [10MB] of cached files are present (value is maximum bytesize of all cached files)51 $PHPTHUMB_CONFIG['cache_maxsize'] = 20 * 1024 * 1024; // delete least-recently-accessed cached thumbnails when more than [10MB] of cached files are present (value is maximum bytesize of all cached files) 52 52 53 53 //$PHPTHUMB_CONFIG['cache_maxfiles'] = null; // never delete cached thumbnails based on number of cached files 54 $PHPTHUMB_CONFIG['cache_maxfiles'] = 1000 ; // delete least-recently-accessed cached thumbnails when more than [500] cached files are present (value is maximum number of cached files to keep)54 $PHPTHUMB_CONFIG['cache_maxfiles'] = 10000; // delete least-recently-accessed cached thumbnails when more than [500] cached files are present (value is maximum number of cached files to keep) 55 55 56 56 devel/units/files/weblogs_posts_add_fields.php
r269 r423 52 52 $embedFile = sprintf(gettext("Embed a file from your %s file storage:"), $sitename); 53 53 $run_result .= <<< END 54 <script language="javascript" >54 <script language="javascript" type="text/javascript"> 55 55 <!-- 56 56
