Ignore:
Timestamp:
Dec 14, 2011, 1:32:52 PM (9 years ago)
Author:
patdenice
Message:

Double thumbnail is generated without ajax

File:
1 edited

Legend:

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

    r12712 r12732  
    7777      'height' => $ft['TN_HEIGHT'],
    7878    );
     79
    7980    if (empty($small_thumb['src']))
    8081    {
    81       $small_thumb['src'] = 'ws.php?method=pwg.images.getGThumbPlusThumbnail&image_id='.$small_thumb['id'].'&return=true';
     82      include_once(GTHUMB_PATH.'functions.inc.php');
     83      $data = get_gthumb_data($pictures[0]);
     84      $result = make_gthumb_image($pictures[0], $data);
     85      $small_thumb['src'] = $result['destination'];
    8286    }
    8387
     
    9195      'height' => $data['height'],
    9296    );
    93     if (empty($data['src']))
     97    if (empty($big_thumb['src']))
    9498    {
    95       $big_thumb['src'] = 'ws.php?method=pwg.images.getGThumbPlusThumbnail&image_id='.$ft['ID'].'&size=big&return=true';
     99      if ($conf['GThumb']['cache_big_thumb'])
     100      {
     101        include_once(GTHUMB_PATH.'functions.inc.php');
     102        $result = make_gthumb_image($pictures[0], $data);
     103        $big_thumb['src'] = $result['destination'];
     104      }
     105      else
     106      {
     107        $big_thumb['src'] = 'ws.php?method=pwg.images.getGThumbPlusThumbnail&image_id='.$ft['ID'].'&size=big&return=true';
     108      }
    96109    }
    97110
     
    177190  $result['use_high'] = $use_high;
    178191  $result['cache_path'] = GTHUMB_CACHE_DIR.'/'.$new_height.'/';
     192  $result['size'] = $size;
    179193
    180194  return $result;
Note: See TracChangeset for help on using the changeset viewer.