Changeset 2588

Show
Ignore:
Timestamp:
06/17/08 07:00:45 (17 months ago)
Author:
takayama
Message:

Fixed BugId:80146
* Applied patch

Files:
1 modified

Legend:

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

    r2521 r2588  
    493493            $args['lastn'] = $args['limit']; 
    494494        } elseif (!isset($args['days']) && !isset($args['lastn'])) { 
    495         #    if ($days = $blog['blog_days_on_index']) { 
    496         #        if (!isset($args['recently_commented_on'])) { 
    497         #            $args['days'] = $days; 
    498         #        } 
    499         #    } elseif ($posts = $blog['blog_entries_on_index']) { 
    500         #        $args['lastn'] = $posts; 
    501         #    } 
     495            if ($days = $blog['blog_days_on_index']) { 
     496                if (!isset($args['recently_commented_on'])) { 
     497                    $args['days'] = $days; 
     498                } 
     499            } elseif ($posts = $blog['blog_entries_on_index']) { 
     500                $args['lastn'] = $posts; 
     501            } 
    502502        } 
    503503        if ($args['limit'] == 'auto') { 
     
    898898            $no_resort = 1; 
    899899        } elseif ( !is_null($total_count) ) { 
    900             $orig_limit = $limit; 
    901             $orig_offset = $offset; 
     900            $orig_offset = $post_select_offset ? $post_select_offset : $orig_offset; 
     901            $orig_limit = $post_select_limit ? $post_select_limit : $limit; 
    902902        } else { 
    903903            $sql = $this->apply_limit_sql($sql . " <LIMIT>", $limit, $offset);