Changeset 1829

Show
Ignore:
Timestamp:
04/10/08 02:57:41 (8 months ago)
Author:
fumiakiy
Message:

Square thumbnails now has appropriate file name. BugId:79235

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-34/lib/MT/Asset/Image.pm

    r1174 r1829  
    101101            Width => $i_w, Height => $i_h ); 
    102102        ($i_h, $i_w) = @square{qw( Size Size )}; 
     103        if ( $param{Width} && !$param{Height} ) { 
     104            $param{Height} = $param{Width}; 
     105        } 
     106        elsif ( !$param{Width} && $param{Height} ) { 
     107            $param{Width} = $param{Height}; 
     108        } 
    103109    } 
    104110 
     
    116122      _get_dimension( $i_h, $i_w, $param{Height}, $param{Width} ); 
    117123 
    118     my $file = $asset->thumbnail_filename(@_) or return; 
     124    my $file = $asset->thumbnail_filename(%param) or return; 
    119125    my $thumbnail = File::Spec->catfile( $asset_cache_path, $file ); 
    120126    my @thumbinfo = stat($thumbnail);