Changeset 2002

Show
Ignore:
Timestamp:
04/21/08 09:33:04 (7 months ago)
Author:
takayama
Message:

Fixed BugId:79405
* Added sort order

Files:

Legend:

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

    r1998 r2002  
    51145114        my $col = lc($args->{sort_by} || 'created_on'); 
    51155115        @$comments = $so eq 'ascend' ? 
    5116             sort { $a->$col() cmp $b->$col() } @$comments : 
    5117             sort { $b->$col() cmp $a->$col() } @$comments; 
    5118         $no_resort = 1; 
     5116            sort { $a->created_on cmp $b->created_on } @$comments : 
     5117            sort { $b->created_on cmp $a->created_on } @$comments; 
     5118        $no_resort = 1 
     5119            unless $args->{sort_order} || $args->{sort_by}; 
    51195120        if (@filters) { 
    51205121            my $offset = $args->{offset} || 0; 
     
    51395140                @comments = @$comments; 
    51405141            } 
    5141             $no_resort = 1 
    5142                 unless $args->{sort_order} || $args->{sort_by}; 
    51435142        } 
    51445143        if ($n) { 
  • branches/release-35/tmpl/cms/widget/blog_stats_comment.tmpl

    r1309 r2002  
    3131        <h4 class="tab-panel-header"><__trans phrase="Most Recent Comments"></h4> 
    3232 
    33         <MTComments
     33        <MTComments sort_order="descend"
    3434        <div id="comment-<$MTCommentID$>" class="comment comment-<mt:if name="__odd__">odd<mt:else>even</mt:if> comment-<MTCommentIfModerated>status-publish<MTElse>status-pending</MTCommentIfModerated>"> 
    3535            <div class="comment-inner">