Changeset 2993

Show
Ignore:
Timestamp:
08/27/08 06:36:30 (3 months ago)
Author:
takayama
Message:

Fixed BugId:81254
* Added an routine of index templates rebuilding

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/MT/AtomServer.pm

    r2839 r2993  
    793793        Blog  => $blog); 
    794794 
    795     # Rebuild archives 
    796     $app->rebuild_archives( 
    797         Blog             => $blog, 
    798         Recip            => \%recip, 
    799     ) or die _fault($app->errstr); 
    800  
    801795    # Remove object 
    802796    $entry->remove 
    803797        or return $app->error(500, $entry->errstr); 
     798 
     799    # Rebuild archives 
     800    if (%recip) { 
     801        $app->rebuild_archives( 
     802            Blog             => $blog, 
     803            Recip            => \%recip, 
     804        ) or die _fault($app->errstr); 
     805    } 
     806 
     807    # Rebuild index files 
     808    if ( $app->config('RebuildAtDelete') ) { 
     809        $app->rebuild_indexes( Blog => $blog ) 
     810            or die _fault($app->errstr); 
     811    } 
     812 
    804813    ''; 
    805814} 
  • trunk/lib/MT/XMLRPCServer.pm

    r2841 r2993  
    697697        Blog  => $blog); 
    698698 
    699     # Rebuild archives 
    700     $mt->rebuild_archives( 
    701         Blog             => $blog, 
    702         Recip            => \%recip, 
    703     ) or die _fault($class->errstr); 
    704  
    705699    # Remove object 
    706700    $entry->remove; 
     701 
     702    # Rebuild archives 
     703    if ( %recip ) { 
     704        $mt->rebuild_archives( 
     705            Blog             => $blog, 
     706            Recip            => \%recip, 
     707        ) or die _fault($class->errstr); 
     708    } 
     709 
     710    # Rebuild index files 
     711    if ( $mt->config('RebuildAtDelete') ) { 
     712        $mt->rebuild_indexes( Blog => $blog ) 
     713            or die _fault($class->errstr); 
     714    } 
    707715 
    708716    $mt->log({