Changeset 2350

Show
Ignore:
Timestamp:
05/15/08 23:51:38 (21 months ago)
Author:
bchoate
Message:

Fix for async publishing so individual archive for comment is published when received (other pages are left to publish based on established rules).

Location:
branches/release-38/lib/MT
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/release-38/lib/MT/App/Comments.pm

    r2263 r2350  
    970970 
    971971    if ( $comment->visible ) { 
    972  
     972        $app->publisher->start_time(time); 
    973973        # Rebuild the entry synchronously so that if the user gets 
    974974        # redirected to the indiv. page it will be up-to-date. 
    975         $app->rebuild_entry( Entry => $entry->id ) 
     975        $app->rebuild_entry( Entry => $entry->id, Force => 1, PreferredArchiveOnly => 1 ) 
    976976          or return $app->handle_error( 
    977977            $app->translate( "Publish failed: [_1]", $app->errstr ) ); 
     
    991991    MT::Util::start_background_task( 
    992992        sub { 
    993             $app->rebuild_indexes( Blog => $blog ) 
    994               or return $app->errtrans( "Publish failed: [_1]", $app->errstr ); 
     993            $app->rebuild_entry( Entry => $entry->id, BuildDependencies => 1 ) 
     994              or return $app->handle_error( 
     995                $app->translate( "Publish failed: [_1]", $app->errstr ) ); 
     996 
    995997            $app->_send_comment_notification( $comment, $comment_link, $entry, 
    996998                $blog, $commenter ); 
  • branches/release-38/lib/MT/WeblogPublisher.pm

    r2343 r2350  
    414414                    : (), 
    415415                    NoStatic => $param{NoStatic}, 
    416                     # Force    => ($param{Force} ? 1 : 0), 
     416                    Force    => ($param{Force} ? 1 : 0), 
    417417                    Author   => $entry->author, 
    418418                ) or return; 
     
    18031803    return 1 if $throttle->{type} != MT::PublishOption::ASYNC(); 
    18041804 
     1805    return 1 if $args{force}; # if async, but force is used, publish 
     1806 
    18051807    require MT::TheSchwartz; 
    18061808    require TheSchwartz::Job;