Changeset 1801
- Timestamp:
- 04/08/08 07:44:21 (8 months ago)
- Files:
-
- branches/release-34/lib/MT/CMS/Entry.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/release-34/lib/MT/CMS/Entry.pm
r1778 r1801 2309 2309 $app->translate( "Permission denied: [_1]", $app->errstr() ) ); 2310 2310 2311 # Remove Individual archive file. 2312 if ( $app->config('DeleteFilesAtRebuild') ) { 2313 $app->publisher->remove_entry_archive_file( Entry => $obj, ); 2314 } 2311 2315 if ( $app->config('RebuildAtDelete') 2312 2316 || $app->config('DeleteFilesAtRebuild') ) 2313 2317 { 2314 # Remove Induvidual archive file.2315 if ( $app->config('DeleteFilesAtRebuild') ) {2316 $app->publisher->remove_entry_archive_file( Entry => $obj, );2317 }2318 2319 2318 for my $at (@at) { 2320 2319 my $archiver = $app->publisher->archiver($at); … … 2322 2321 2323 2322 # Remove archive file if archive file has not entries. 2324 my $deleted = 0; 2325 if ( $app->config('DeleteFilesAtRebuild') ) { 2326 my $count = 2327 $archiver->can('archive_entries_count') 2328 ? $archiver->archive_entries_count( $blog, $at, $obj ) 2329 : 0; 2330 if ( $count == 1 ) { 2331 $app->publisher->remove_entry_archive_file( 2332 Entry => $obj, 2333 ArchiveType => $at 2334 ); 2335 $deleted = 1; 2336 } 2323 my $to_delete = 2324 ( $archiver->archive_entries_count( $blog, $at, $obj ) == 1 ) ? 1 : 0 2325 if $archiver->can('archive_entries_count'); 2326 if ( $to_delete && $app->config('DeleteFilesAtRebuild') ) { 2327 $app->publisher->remove_entry_archive_file( 2328 Entry => $obj, 2329 ArchiveType => $at 2330 ); 2337 2331 } 2332 next if $to_delete; 2338 2333 2339 2334 # Make rebuild recip 2340 if ( $app->config('DeleteFilesAtRebuild') ) { 2341 next if $deleted; 2342 2335 if ( $app->config('RebuildAtDelete') ) { 2343 2336 my ( $start, $end ) = $archiver->date_range( $obj->authored_on ) 2344 2337 if $archiver->date_based() && $archiver->can('date_range');
