Show
Ignore:
Timestamp:
10/03/08 01:07:01 (14 months ago)
Author:
bchoate
Message:

Merging fireball branch changes to-date to trunk: svn merge -r2974:3081 http://code.sixapart.com/svn/movabletype/branches/fireball .

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/MT/Asset/Image.pm

    r2635 r3082  
    231231 
    232232    require MT::Util; 
    233     my $format = $param{Format} || MT->translate('%f-thumb-%wx%h%x'); 
     233    my $format = $param{Format} || MT->translate('%f-thumb-%wx%h-%i%x'); 
    234234    my $width  = $param{Width}  || 'auto'; 
    235235    my $height = $param{Height} || 'auto'; 
     
    550550                    $app->translate( "Invalid basename '[_1]'", $rel_path ) ); 
    551551            } 
     552            $rel_path .= '-' . $asset->id; 
    552553            my $ext = $blog->file_extension || ''; 
    553554            $ext = '.' . $ext if $ext ne ''; 
     
    567568              File::Spec->catfile( $root_path, $rel_path . $ext ); 
    568569 
    569             ## If the popup filename already exists, we don't want to overwrite 
    570             ## it, because it could contain valuable data; so we'll just make 
    571             ## sure to generate the name uniquely. 
    572570            my ( $i, $rel_path_ext ) = ( 0, $rel_path . $ext ); 
    573             while ( $fmgr->exists($abs_file_path) ) { 
    574                 $rel_path_ext = $rel_path . ++$i . $ext; 
    575                 $abs_file_path = 
    576                   File::Spec->catfile( $root_path, $rel_path_ext ); 
    577             } 
    578571            $pseudo_path = File::Spec->catfile( $pseudo_path, $rel_path_ext ); 
    579572            my ( $vol, $dirs, $basename ) = 
     
    600593                $original   = $asset_html->clone; 
    601594                $asset_html->blog_id($blog_id); 
    602                 $asset_html->url($pseudo_path); 
     595                my $pseudo_url = $pseudo_path; 
     596                $pseudo_url  =~ s!\\!/!g; 
     597                $asset_html->url($pseudo_url); 
    603598                $asset_html->label($app->translate("Popup Page for [_1]", $asset->label || $asset->file_name)); 
    604599                $asset_html->file_path($pseudo_path); 
     
    610605            } else { 
    611606                $original   = $asset_html->clone; 
    612             }                 
     607            } 
    613608 
    614609            # Select back the real URL for callbacks