diff -r -U 2 wordpress/wp-blog-header.php wordpress-modified/wp-blog-header.php
|
old
|
new
|
|
| 115 | 115 | } else { |
| 116 | 116 | // We're showing a feed, so WP is indeed the only thing that last changed |
| 117 | | $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastpostmodified('GMT'), 0).' GMT'; |
| | 117 | if ($withcomments) { |
| | 118 | $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastcommentmodified('GMT'), 0).' GMT'; |
| | 119 | } else { |
| | 120 | $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastpostmodified('GMT'), 0).' GMT'; |
| | 121 | } |
| 118 | 122 | $wp_etag = '"' . md5($wp_last_modified) . '"'; |
| 119 | 123 | @header('Last-Modified: '.$wp_last_modified); |
diff -r -U 2 wordpress/wp-commentsrss2.php wordpress-modified/wp-commentsrss2.php
|
old
|
new
|
|
| 1 | 1 | <?php |
| 2 | 2 | if (! $feed) { |
| | 3 | $withcomments = 1; |
| 3 | 4 | require('wp-blog-header.php'); |
| 4 | 5 | } |
diff -r -U 2 wordpress/wp-includes/functions.php wordpress-modified/wp-includes/functions.php
|
old
|
new
|
|
| 142 | 142 | } |
| 143 | 143 | |
| | 144 | function get_lastcommentmodified($timezone = 'server') { |
| | 145 | global $tablecomments, $cache_lastcommentmodified, $pagenow, $wpdb; |
| | 146 | $add_seconds_blog = get_settings('gmt_offset') * 3600; |
| | 147 | $add_seconds_server = date('Z'); |
| | 148 | $now = current_time('mysql', 1); |
| | 149 | if ( !isset($cache_lastcommentmodified[$timezone]) ) { |
| | 150 | switch(strtolower($timezone)) { |
| | 151 | case 'gmt': |
| | 152 | $lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $tablecomments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1"); |
| | 153 | break; |
| | 154 | case 'blog': |
| | 155 | $lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $tablecomments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1"); |
| | 156 | break; |
| | 157 | case 'server': |
| | 158 | $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"); |
| | 159 | break; |
| | 160 | } |
| | 161 | $cache_lastcommentmodified[$timezone] = $lastcommentmodified; |
| | 162 | } else { |
| | 163 | $lastcommentmodified = $cache_lastcommentmodified[$timezone]; |
| | 164 | } |
| | 165 | return $lastcommentmodified; |
| | 166 | } |
| | 167 | |
| 144 | 168 | function user_pass_ok($user_login,$user_pass) { |
| 145 | 169 | global $cache_userdata; |