Changeset 2167
- Timestamp:
- 04/30/08 22:39:10 (7 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/release-37/lib/MT/Template/ContextHandlers.pm
r2161 r2167 10627 10627 my $at = $blog->archive_type; 10628 10628 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}) { 10630 10631 $at = $arg_at; 10631 10632 } elsif ($blog->archive_type_preferred) { … … 10637 10638 my $archiver = MT->publisher->archiver($at); 10638 10639 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 } 10639 10646 10640 10647 local $ctx->{current_archive_type} = $at; … … 10656 10663 my $save_tse; 10657 10664 my $tmpl = $ctx->stash('template'); 10665 10658 10666 if ( ($tmpl && $tmpl->type eq 'archive') 10659 10667 && $archiver->date_based) … … 10661 10669 my $uncompiled = $ctx->stash('uncompiled') || ''; 10662 10670 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; 10668 10680 } 10669 10681
