Changeset 2687

Show
Ignore:
Timestamp:
07/03/08 00:38:50 (20 months ago)
Author:
bchoate
Message:

Fixed lastn attribute for comments tag so that it forces descending order if specified (behaving like Perl version).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-41/php/lib/mtdb_base.php

    r2666 r2687  
    21962196                $order = $query_order = 'asc'; 
    21972197            } 
    2198         } elseif (isset($blog) && isset($blog['blog_sort_order_comments'])) { 
     2198        } elseif ((isset($blog) && isset($blog['blog_sort_order_comments'])) && !isset($args['lastn'])) { 
    21992199            if ($blog['blog_sort_order_comments'] == 'ascend') { 
    22002200                $order = $query_order = 'asc'; 
    22012201            } 
    22022202        } 
    2203         if ($order == 'asc' && (isset($args['lastn']) || isset($args['offset']))) { 
     2203        if (($order == 'asc') && (isset($args['lastn']) || isset($args['offset']))) { 
    22042204            $reorder = 1; 
    22052205            $query_order = 'desc';