Changeset 268
- Timestamp:
- 07/23/2003 09:04:25 PM (23 years ago)
- File:
-
- 1 edited
-
trunk/b2-include/b2template.functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/b2-include/b2template.functions.php
r259 r268 619 619 620 620 $limitprev--; 621 $lastpost = @$wpdb->get_row("SELECT ID, post_title FROM $tableposts WHERE post_date < '$current_post_date' AND post_category > 0 $sqlcat $sql_exclude_cats ORDER BY post_date DESC LIMIT $limitprev, 1");621 $lastpost = @$wpdb->get_row("SELECT ID, post_title FROM $tableposts WHERE post_date < '$current_post_date' AND post_category > 0 AND post_status = 'publish' $sqlcat $sql_exclude_cats ORDER BY post_date DESC LIMIT $limitprev, 1"); 622 622 ++$querycount; 623 623 if ($lastpost) { … … 660 660 $limitnext--; 661 661 662 $nextpost = @$wpdb->get_row("SELECT ID,post_title FROM $tableposts WHERE post_date > '$current_post_date' AND post_date < '$now' AND post_category > 0 $sqlcat $sql_exclude_cats ORDER BY post_date ASC LIMIT $limitnext,1");662 $nextpost = @$wpdb->get_row("SELECT ID,post_title FROM $tableposts WHERE post_date > '$current_post_date' AND post_date < '$now' AND post_category > 0 AND post_status = 'publish' $sqlcat $sql_exclude_cats ORDER BY post_date ASC LIMIT $limitnext,1"); 663 663 ++$querycount; 664 664 if ($nextpost) {
Note: See TracChangeset
for help on using the changeset viewer.