Ignore:
Timestamp:
Apr 2, 2011, 7:57:27 PM (13 years ago)
Author:
patdenice
Message:

Minor bug corrected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/regenerateThumbnails/ws_functions.inc.php

    r9934 r9997  
    2727
    2828  $query='
    29 SELECT id, path
     29SELECT id, path, tn_ext
    3030FROM '.IMAGES_TABLE.'
    3131WHERE id = '.(int)$params['image_id'].'
     
    4242  if (!$params['square'])
    4343    remove_event_handler('upload_thumbnail_resize', 'upload_square_resize', 40);
    44  
    45   trigger_event(
    46     'upload_thumbnail_resize',
    47     false,
    48     $image['path'],
    49     file_path_for_type($image['path'], 'thumb'),
    50     $params['maxwidth'],
    51     $params['maxheight'],
    52     $params['quality'],
    53     true
    54     );
    5544
    56   return true;
     45  if (!empty( $image['tn_ext'] ))
     46  {
     47    trigger_event(
     48      'upload_thumbnail_resize',
     49      false,
     50      $image['path'],
     51      get_thumbnail_path($image),
     52      $params['maxwidth'],
     53      $params['maxheight'],
     54      $params['quality'],
     55      true
     56      );
     57
     58    return true;
     59  }
     60  return false;
    5761}
    5862
Note: See TracChangeset for help on using the changeset viewer.