Make WordPress Core

Changeset 2255


Ignore:
Timestamp:
02/11/2005 01:27:10 AM (21 years ago)
Author:
saxmatt
Message:

Don't show posts from the future

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-links.php

    r2239 r2255  
    356356        }
    357357
    358         $now = current_time('mysql');
     358        $now = current_time('mysql', 1);
    359359
    360360        $limitnext--;
    361361
    362         $nextpost = @$wpdb->get_row("SELECT ID,post_title FROM $wpdb->posts WHERE post_date > '$current_post_date' AND post_date < '$now' AND post_status = 'publish' $sqlcat $sql_exclude_cats AND ID != $post->ID ORDER BY post_date ASC LIMIT $limitnext,1");
     362        $nextpost = @$wpdb->get_row("SELECT ID,post_title FROM $wpdb->posts WHERE post_date > '$current_post_date' AND post_date_gmt < '$now' AND post_status = 'publish' $sqlcat $sql_exclude_cats AND ID != $post->ID ORDER BY post_date ASC LIMIT $limitnext,1");
    363363        if ($nextpost) {
    364364            $string = '<a href="'.get_permalink($nextpost->ID).'">'.$next;
Note: See TracChangeset for help on using the changeset viewer.