Make WordPress Core

Changeset 930


Ignore:
Timestamp:
02/24/2004 11:49:51 PM (20 years ago)
Author:
saxmatt
Message:

Temporary fix for next_post with GMT.

File:
1 edited

Legend:

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

    r910 r930  
    322322        }
    323323
    324         $now = date('Y-m-d H:i:s',(time() + ($time_difference * 3600)));
     324        $now = current_time('mysql');
    325325
    326326        $limitnext--;
    327327
    328         $nextpost = @$wpdb->get_row("SELECT ID,post_title FROM $tableposts WHERE post_date > '$current_post_date' AND post_date < '$now' AND post_status = 'publish' $sqlcat $sql_exclude_cats ORDER BY post_date ASC LIMIT $limitnext,1");
     328        $nextpost = @$wpdb->get_row("SELECT ID,post_title FROM $tableposts 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");
    329329        if ($nextpost) {
    330330            $string = '<a href="'.get_permalink($nextpost->ID).'">'.$next;
Note: See TracChangeset for help on using the changeset viewer.