Make WordPress Core

Ticket #25358: 25358.patch

File 25358.patch, 856 bytes (added by joeybvi, 13 years ago)

Patch

  • wp-includes/class-wp.php

    diff --git wp-includes/class-wp.php wp-includes/class-wp.php
    index dc77688..7511bcf 100644
    class WP { 
    347347                                        )
    348348                                )
    349349                        )
    350                                 $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastcommentmodified('GMT'), 0).' GMT';
    351                         else
    352                                 $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastpostmodified('GMT'), 0).' GMT';
     350                                $comment_last_modified = strtotime(get_lastcommentmodified('GMT'));
     351                        $post_last_modified = strtotime(get_lastpostmodified('GMT'));
     352                        $wp_last_modified = date('D, d M Y H:i:s', isset($comment_last_modified) && $comment_last_modified > $post_last_modified ? $comment_last_modified : $post_last_modified).' GMT';
    353353                        $wp_etag = '"' . md5($wp_last_modified) . '"';
    354354                        $headers['Last-Modified'] = $wp_last_modified;
    355355                        $headers['ETag'] = $wp_etag;