Skip to content

Commit

Permalink
Minor fix & settings change for phpThumb
Browse files Browse the repository at this point in the history
  • Loading branch information
dleffler committed Nov 22, 2011
1 parent d833af6 commit a10ddb2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions external/phpThumb/phpThumb.config.php
Expand Up @@ -62,8 +62,9 @@


// * Source image cache configuration
$PHPTHUMB_CONFIG['cache_source_enabled'] = false; // if true, source images obtained via HTTP are cached to $PHPTHUMB_CONFIG['cache_source_directory']
$PHPTHUMB_CONFIG['cache_source_directory'] = dirname(__FILE__).'/cache/source/'; // set the cache directory for unprocessed source images
$PHPTHUMB_CONFIG['cache_source_enabled'] = true; // if true, source images obtained via HTTP are cached to $PHPTHUMB_CONFIG['cache_source_directory']
//$PHPTHUMB_CONFIG['cache_source_directory'] = dirname(__FILE__).'/cache/source/'; // set the cache directory for unprocessed source images
$PHPTHUMB_CONFIG['cache_source_directory'] = $PHPTHUMB_CONFIG['cache_directory']; // set to same as cache directory

// * cache source modification date configuration
$PHPTHUMB_CONFIG['cache_source_filemtime_ignore_local'] = false; // if true, local source images will not be checked for modification date and cached image will be used if available, even if source image is changed or removed
Expand Down
2 changes: 1 addition & 1 deletion external/phpThumb/phpthumb.class.php
Expand Up @@ -692,7 +692,7 @@ function CleanUpCacheDirectory() {
$CacheDirOldFilesSize = array();
$AllFilesInCacheDirectory = phpthumb_functions::GetAllFilesInSubfolders($this->config_cache_directory);
foreach ($AllFilesInCacheDirectory as $fullfilename) {
if (preg_match('#^'.preg_quote($this->config_cache_prefix).'#i', $fullfilename) && file_exists($fullfilename)) {
if (preg_match('#'.preg_quote($this->config_cache_prefix).'#i', $fullfilename) && file_exists($fullfilename)) {
$CacheDirOldFilesAge[$fullfilename] = @fileatime($fullfilename);
if ($CacheDirOldFilesAge[$fullfilename] == 0) {
$CacheDirOldFilesAge[$fullfilename] = @filemtime($fullfilename);
Expand Down

0 comments on commit a10ddb2

Please sign in to comment.