Changeset 2382

Show
Ignore:
Timestamp:
05/18/08 02:41:05 (21 months ago)
Author:
auno
Message:

Fixed to redirect same screen after publishing for archive template. BugzID:79797

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

Legend:

Unmodified
Added
Removed
  • branches/release-38/lib/MT/CMS/Common.pm

    r2301 r2382  
    355355                # archive rebuild support 
    356356                $q->param( 'id', $obj->id ); 
     357                $q->param( 'reedit', $obj->id ); 
    357358                return $app->forward( 'publish_archive_templates' ); 
    358359            } 
  • branches/release-38/lib/MT/CMS/Template.pm

    r2361 r2382  
    20632063    require MT::CMS::Blog; 
    20642064    my $return_args; 
     2065    my $reedit = $app->param('reedit'); 
    20652066    if (@ids) { 
    20662067        # we have more to do after this, so save the list 
     
    20722073                blog_id => scalar $app->param('blog_id'), 
    20732074                id => join(",", @ids), 
     2075                reedit => $reedit, 
    20742076            } 
    20752077        ); 
    20762078    } else { 
    2077         # nothing left after this publish operation; just return 
    2078         # to the edit screen. 
     2079        my $mode = $reedit ? 'view' : 'list'; 
    20792080        $return_args = $app->uri_params( 
    2080             mode => 'view', 
     2081            mode => $mode, 
    20812082            args => { 
    20822083                _type     => 'template', 
    20832084                blog_id   => scalar $app->param('blog_id'), 
    20842085                published => 1, 
    2085                 id        => $tmpl_id, 
    20862086                saved     => 1, 
     2087                ( $reedit ? ( id => $reedit ) : () ), 
    20872088            } 
    20882089        );