Changeset 2777 for branches/1.5/wp-includes/comment-functions.php
- Timestamp:
- 08/12/05 07:03:13 (3 years ago)
- Files:
-
- branches/1.5/wp-includes/comment-functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.5/wp-includes/comment-functions.php
r2575 r2777 356 356 357 357 function get_lastcommentmodified($timezone = 'server') { 358 global $ tablecomments, $cache_lastcommentmodified, $pagenow, $wpdb;358 global $cache_lastcommentmodified, $pagenow, $wpdb; 359 359 $add_seconds_blog = get_settings('gmt_offset') * 3600; 360 360 $add_seconds_server = date('Z'); … … 363 363 switch(strtolower($timezone)) { 364 364 case 'gmt': 365 $lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $ tablecomments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1");365 $lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1"); 366 366 break; 367 367 case 'blog': 368 $lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $ tablecomments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1");368 $lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1"); 369 369 break; 370 370 case 'server': 371 $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");371 $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"); 372 372 break; 373 373 }
