Changeset 3442 for trunk/wp-includes/comment-functions.php
- Timestamp:
- 01/16/2006 08:03:56 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-functions.php
r3427 r3442 544 544 545 545 function get_lastcommentmodified($timezone = 'server') { 546 global $ tablecomments, $cache_lastcommentmodified, $pagenow, $wpdb;546 global $cache_lastcommentmodified, $pagenow, $wpdb; 547 547 $add_seconds_blog = get_settings('gmt_offset') * 3600; 548 548 $add_seconds_server = date('Z'); … … 551 551 switch(strtolower($timezone)) { 552 552 case 'gmt': 553 $lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $ tablecomments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1");553 $lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1"); 554 554 break; 555 555 case 'blog': 556 $lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $ tablecomments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1");556 $lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1"); 557 557 break; 558 558 case 'server': 559 $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");559 $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"); 560 560 break; 561 561 }
Note: See TracChangeset
for help on using the changeset viewer.