From 3329ef57fda3855cd4ff035c69c0c091af305c93 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 16 Jan 2006 20:03:56 +0000 Subject: [PATCH] Use ->comments instead of . fixes #2294 git-svn-id: https://develop.svn.wordpress.org/trunk@3442 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/comment-functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/comment-functions.php b/wp-includes/comment-functions.php index 7bbbaacf17..8b9c30e5af 100644 --- a/wp-includes/comment-functions.php +++ b/wp-includes/comment-functions.php @@ -543,20 +543,20 @@ function pings_open() { // Non-template functions function get_lastcommentmodified($timezone = 'server') { - global $tablecomments, $cache_lastcommentmodified, $pagenow, $wpdb; + global $cache_lastcommentmodified, $pagenow, $wpdb; $add_seconds_blog = get_settings('gmt_offset') * 3600; $add_seconds_server = date('Z'); $now = current_time('mysql', 1); if ( !isset($cache_lastcommentmodified[$timezone]) ) { switch(strtolower($timezone)) { case 'gmt': - $lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $tablecomments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1"); + $lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1"); break; case 'blog': - $lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $tablecomments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1"); + $lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1"); break; case 'server': - $lastcommentmodified = $wpdb->get_var("SELECT DATE_ADD(comment_date_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $tablecomments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1"); + $lastcommentmodified = $wpdb->get_var("SELECT DATE_ADD(comment_date_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1"); break; } $cache_lastcommentmodified[$timezone] = $lastcommentmodified;