Skip to content

Commit

Permalink
Corrected warning that $ext was being unnecessarily reinitialized in …
Browse files Browse the repository at this point in the history
…MT::CMS::Asset::_upload_file at line 1343.

This is an unrelated part that was included in the MTOS checkin the previous commit was based on (http://code.sixapart.com/trac/movabletype/changeset/5365) but missing from the previous commit itself.
  • Loading branch information
Open Melody Software Group committed Jul 14, 2010
1 parent e9215bc commit dee9a01
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/MT/CMS/Asset.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1289,10 +1289,12 @@ sub _upload_file {
$ext = $1; ## Those characters are the file extension

my ($w, $h, $id, $write_file) = MT::Image->check_upload(
Fh => $fh, Fmgr => $fmgr, Local => $local_file,
Max => $upload_param{max_size},
MaxDim => $upload_param{max_image_dimension},
ext => $ext,
Fh => $fh,
Fmgr => $fmgr,
Local => $local_file,
Max => $upload_param{max_size},
MaxDim => $upload_param{max_image_dimension},
ext => $ext,
LocalBase => $local_base
);

Expand Down Expand Up @@ -1346,7 +1348,7 @@ sub _upload_file {

require File::Basename;
my $local_basename = File::Basename::basename($local_file);
my $ext =
$ext =
( File::Basename::fileparse( $local_file, qr/[A-Za-z0-9]+$/ ) )[2];

require MT::Asset;
Expand Down

0 comments on commit dee9a01

Please sign in to comment.