Ignore:
Timestamp:
Dec 8, 2011, 5:19:34 PM (9 years ago)
Author:
patdenice
Message:

Check md5sum for thumbnail cache.
Compatibility with RV Thumbnails Scroller.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GThumb/main.inc.php

    r12678 r12705  
    1919
    2020add_event_handler('loc_begin_index', 'GThumb_init', 60);
     21add_event_handler('loc_end_index_thumbnails', 'process_GThumb', 50, 2);
    2122add_event_handler('ws_add_methods', 'add_gthumb_thumbnails_method');
    2223add_event_handler('get_admin_plugin_menu_links', 'GThumb_admin_menu');
     
    3132  $page['nb_image_page'] = $conf['GThumb']['nb_image_page'];
    3233
    33   add_event_handler('loc_end_index_thumbnails', 'process_GThumb', 50, 2);
    34 
    3534  if (is_dir(GTHUMB_CACHE_DIR) and !is_dir(GTHUMB_CACHE_DIR.'/'.$conf['GThumb']['height']))
    3635  {
     
    4443{
    4544  global $template, $conf;
     45
     46  if (isset($_GET['rvts']))
     47  {
     48    $conf['GThumb']['big_thumb'] = false;
     49  }
    4650
    4751  $template->set_filename( 'index_thumbnails', realpath(GTHUMB_PATH.'template/gthumb.tpl'));
     
    137141
    138142  $new_height = $size == 'small' ? $conf['GThumb']['height'] : $conf['GThumb']['height'] * 2 + $conf['GThumb']['margin'];
    139   $file = GTHUMB_CACHE_DIR.'/'.$new_height.'/'.md5($picture['path']).'.'.$picture['tn_ext'];
     143  $file = GTHUMB_CACHE_DIR.'/'.$new_height.'/'.md5($picture['path'].(!empty($picture['md5sum']) ? $picture['md5sum'] : '')).'.'.$picture['tn_ext'];
    140144
    141145  if (file_exists($file))
Note: See TracChangeset for help on using the changeset viewer.