Show
Ignore:
Timestamp:
03/25/08 07:09:37 (20 months ago)
Author:
fumiakiy
Message:

Fixed MTCategoryArchiveLink for performance. Loading an entry and pass it as the first argument is not needed in the archive_file method of MT::ArchiveType::Category. BugId:70251

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-32/lib/MT/Template/ContextHandlers.pm

    r1561 r1573  
    63486348    } 
    63496349 
    6350     my @entries = MT::Entry->load({ status => MT::Entry::RELEASE() }, 
    6351         { join => [ 'MT::Placement', 'entry_id', { category_id => $cat->id }, { unqiue => 1 } ] } ); 
    6352     my $entry = $entries[0] if @entries; 
    63536350    my $arch = $blog->archive_url; 
    63546351    $arch .= '/' unless $arch =~ m!/$!; 
    6355     $arch = $arch . archive_file_for($entry, $blog, 'Category', $cat); 
     6352    $arch = $arch . archive_file_for(undef, $blog, 'Category', $cat); 
    63566353    $arch = MT::Util::strip_index($arch, $blog) unless $_[1]->{with_index}; 
    63576354    $arch;