Changeset 2167

Show
Ignore:
Timestamp:
04/30/08 22:39:10 (7 months ago)
Author:
bchoate
Message:

Fixed case where ArchiveList was failing to publish the complete list in an archive context of the same type. BugId:69884,79411

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-37/lib/MT/Template/ContextHandlers.pm

    r2161 r2167  
    1062710627    my $at = $blog->archive_type; 
    1062810628    return '' if !$at || $at eq 'None'; 
    10629     if (my $arg_at = $args->{type} || $args->{archive_type}) { 
     10629    my $arg_at; 
     10630    if ($arg_at = $args->{type} || $args->{archive_type}) { 
    1063010631        $at = $arg_at; 
    1063110632    } elsif ($blog->archive_type_preferred) { 
     
    1063710638    my $archiver = MT->publisher->archiver($at); 
    1063810639    return '' unless $archiver; 
     10640 
     10641    my $save_stamps; 
     10642 
     10643    if ($ctx->{current_archive_type} && $arg_at && ($ctx->{current_archive_type} eq $arg_at)) { 
     10644        $save_stamps = 1; 
     10645    } 
    1063910646 
    1064010647    local $ctx->{current_archive_type} = $at; 
     
    1065610663    my $save_tse; 
    1065710664    my $tmpl = $ctx->stash('template'); 
     10665 
    1065810666    if ( ($tmpl && $tmpl->type eq 'archive') 
    1065910667         && $archiver->date_based) 
     
    1066110669        my $uncompiled = $ctx->stash('uncompiled') || ''; 
    1066210670        if ($uncompiled =~ /<mt:?archivelist>?/i) { 
    10663             $save_ts = $ctx->{current_timestamp}; 
    10664             $save_tse = $ctx->{current_timestamp_end}; 
    10665             $ctx->{current_timestamp} = undef; 
    10666             $ctx->{current_timestamp_end} = undef; 
    10667         } 
     10671            $save_stamps = 1; 
     10672        } 
     10673    } 
     10674 
     10675    if ($save_stamps) { 
     10676        $save_ts = $ctx->{current_timestamp}; 
     10677        $save_tse = $ctx->{current_timestamp_end}; 
     10678        $ctx->{current_timestamp} = undef; 
     10679        $ctx->{current_timestamp_end} = undef; 
    1066810680    } 
    1066910681