Temporary fix for next_post with GMT.

git-svn-id: http://svn.automattic.com/wordpress/trunk@930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-02-24 23:49:51 +00:00
parent 0e243c3510
commit 672ded938d
1 changed files with 2 additions and 2 deletions

View File

@ -321,11 +321,11 @@ function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat=
}
}
$now = date('Y-m-d H:i:s',(time() + ($time_difference * 3600)));
$now = current_time('mysql');
$limitnext--;
$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");
$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");
if ($nextpost) {
$string = '<a href="'.get_permalink($nextpost->ID).'">'.$next;
if ($title=='yes') {