Changeset 4757 for extensions/pLoader/trunk
- Timestamp:
- Jan 26, 2010, 7:50:43 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pLoader/trunk/src/Uploader/ImageList.pm
r4747 r4757 430 430 } 431 431 432 sub RemoveImage {433 my ( $self, $index ) = @_;434 435 return if (! defined $self->image_selection );436 return if (! defined $index );437 438 $self->DeleteImage($index);439 splice @{$self->sums}, $index, 1 ;440 $self->wx_thumb_imglist->Remove($index);441 442 }443 432 444 433 # used for display in GUI. has to fit a square box ( wxImageList ) … … 809 798 1+$self->count 810 799 ); 811 # remove thumbnail, resized , HD files800 # remove thumbnail, resized 812 801 # to make sure everything is clean 813 map{ 814 unlink $self->current_image->$_ if -e $self->current_image->$_; 815 } 816 qw/ site_resized_file site_high_file site_thumb_file/; 802 # keep site_high_file because it can be the original !!! 803 $self->_remove_resized_from_cache; 817 804 } 818 805 … … 823 810 824 811 $self->_upload_selection_final_log(); 812 } 813 814 815 sub _remove_resized_from_cache { 816 my ( $self ) = @_; 817 818 unlink $self->current_image->site_thumb_file if -e $self->current_image->site_thumb_file; 819 820 map { 821 my $file = File::Spec->catfile( 822 $self->site_resized_dir, 823 sprintf( 824 "%s.%s", 825 $_, 826 $self->type, 827 ) 828 ); 829 unlink $file if -e $file; 830 } qw /resized high/; 831 832 825 833 } 826 834 … … 1017 1025 $self->site_resized_dir, 1018 1026 sprintf( 1019 "%s_%sx%s.%s", 1020 # $filename, 1027 "%s.%s", 1021 1028 'resized', 1022 $self->resize_w,1023 $self->resize_h,1024 1029 $self->type, 1025 1030 ) … … 1195 1200 sprintf( 1196 1201 "%s.%s", 1197 'high _file',1202 'high', 1198 1203 $self->type, 1199 1204 ) … … 1244 1249 my ( $self ) = @_; 1245 1250 1246 1251 # set default values only if not defined 1252 # || operator is not used because 0 is a choice value 1253 $self->reupload_action_files(1) 1254 unless defined $self->reupload_action_files; 1255 1256 $self->pwg->reupload_action_properties(1) 1257 unless defined $self->pwg->reupload_action_properties; 1258 1259 $self->pwg->reupload_action_properties_m(1) 1260 unless defined $self->pwg->reupload_action_properties_m; 1261 1247 1262 $self->pwg->reupload_action_files( 1248 $self->reupload_action_files ||11263 $self->reupload_action_files 1249 1264 ); 1250 1265 $self->pwg->reupload_action_properties( 1251 $self->reupload_action_properties ||21266 $self->reupload_action_properties 1252 1267 ); 1253 1268 1254 1269 $self->pwg->reupload_action_properties_m( 1255 $self->reupload_action_properties_m ||11270 $self->reupload_action_properties_m 1256 1271 ); 1257 1272
Note: See TracChangeset
for help on using the changeset viewer.