Changeset 423

Show
Ignore:
Timestamp:
07/03/06 00:04:53 (2 years ago)
Author:
sven
Message:

icons: more phpthumb fiddling
html validation fix

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/_icons/icon.php

    r421 r423  
    3636    $filepath = $CFG->dirroot.'_icons/data/default.png'; 
    3737    $mimetype = 'image/png'; 
    38     header("Cache-Control: public"); 
    3938} else { 
    4039    $mimetype = mimeinfo('type', $file->filename); 
    41     // "Cache-Control: private" to allow a user's browser to cache the file, but not a shared proxy 
    42     // Also to override PHP's default "DON'T EVER CACHE THIS EVER" header 
    43     header("Cache-Control: private"); 
    4440} 
     41 
    4542 
    4643// Then output some appropriate headers and send the file data! 
     
    6360} 
    6461 
     62// user icons are public 
     63header("Cache-Control: public"); 
     64 
    6565if (!empty($phpthumb)) { 
    6666    // let phpthumb manipulate the image 
  • devel/lib/filelib.php

    r421 r423  
    476476        $lm = gmdate("D, d M Y H:i:s", $tstamp) . " GMT"; 
    477477             
     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         
    478489        // Send 304s where possible, rather than spitting out the file each time 
    479490        if (array_key_exists('HTTP_IF_MODIFIED_SINCE',$_SERVER)) { 
     
    485496        } 
    486497         
    487         // Send last-modified header to enable if-modified-since requests 
    488         if ($tstamp < time()) { 
    489             header("Last-Modified: " . $lm); 
    490         } 
    491      
    492498        if ($mimetype) { 
    493499            header("Content-type: $mimetype"); 
  • devel/lib/phpthumb/phpThumb.config.php

    r422 r423  
    4949 
    5050//$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) 
    5252 
    5353//$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) 
    5555 
    5656 
  • devel/units/files/weblogs_posts_add_fields.php

    r269 r423  
    5252    $embedFile = sprintf(gettext("Embed a file from your %s file storage:"), $sitename);     
    5353    $run_result .= <<< END 
    54 <script language="javascript"
     54<script language="javascript" type="text/javascript"
    5555<!-- 
    5656