Changeset 2519
- Timestamp:
- 06/06/08 06:38:41 (20 months ago)
- Files:
-
- 1 modified
-
branches/release-39/php/lib/mtdb_base.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-39/php/lib/mtdb_base.php
r2503 r2519 488 488 $args['lastn'] = $args['limit']; 489 489 } elseif (!isset($args['days']) && !isset($args['lastn'])) { 490 if ($days = $blog['blog_days_on_index']) { 491 if (!isset($args['recently_commented_on'])) { 492 $args['days'] = $days; 493 } 494 } elseif ($posts = $blog['blog_entries_on_index']) { 495 $args['lastn'] = $posts; 490 # if ($days = $blog['blog_days_on_index']) { 491 # if (!isset($args['recently_commented_on'])) { 492 # $args['days'] = $days; 493 # } 494 # } elseif ($posts = $blog['blog_entries_on_index']) { 495 # $args['lastn'] = $posts; 496 # } 497 if ($posts = $blog['blog_entries_on_index']) { 498 $limit = $posts; 496 499 } 497 500 } … … 721 724 $day_filter = 'and ' . $this->limit_by_day_sql('entry_authored_on', intval($args['days'])); 722 725 } else { 726 $found_valid_args = 0; 727 foreach ( array( 728 'lastn', 'days', 729 'category', 'categories', 'category_id', 730 'tag', 'tags', 731 'author', 732 'min_score', 'max_score', 733 'min_rate', 'max_rate', 734 'min_count', 'max_count' 735 ) as $valid_key ) 736 { 737 if (array_key_exists($valid_key, $args)) { 738 $found_valid_args = 1; 739 break; 740 } 741 } 723 742 if ((!isset($args['current_timestamp']) && 724 743 !isset($args['current_timestamp_end'])) && 725 744 ($limit <= 0) && 726 (!isset($args['category'])) && 727 (!isset($args['categories'])) && 728 (!isset($args['category_id'])) && 745 (!$found_valid_args) && 729 746 (isset($blog))) { 730 747 if ($days = $blog['blog_days_on_index']) {
