WordPress.org

Make WordPress Core

Changeset 4483


Ignore:
Timestamp:
11/18/2006 08:46:43 PM (13 years ago)
Author:
ryan
Message:

Base last modified time for comment feeds on comments, not the post. Props mdawaffe. fixes #137

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/classes.php

    r4460 r4483  
    22
    33class WP {
    4     var $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 's', 'search', 'exact', 'sentence', 'debug', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'comments_popup', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots');
     4    var $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'debug', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'comments_popup', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots');
    55
    66    var $private_query_vars = array('offset', 'posts_per_page', 'posts_per_archive_page', 'what_to_show', 'showposts', 'nopaging', 'post_type');
     
    179179        } else {
    180180            // We're showing a feed, so WP is indeed the only thing that last changed
    181             if ( $this->query_vars['withcomments'] )
     181            if ( $this->query_vars['withcomments']
     182                || ( !$this->query_vars['withoutcomments']
     183                    && ( $this->query_vars['p']
     184                        || $this->query_vars['name']
     185                        || $this->query_vars['page_id']
     186                        || $this->query_vars['pagename']
     187                        || $this->query_vars['attachment']
     188                        || $this->query_vars['attachment_id']
     189                    )
     190                )
     191            )
    182192                $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastcommentmodified('GMT'), 0).' GMT';
    183193            else
  • trunk/wp-includes/functions.php

    r4472 r4483  
    816816
    817817    $for_comments = false;
    818     if ( is_singular() || get_query_var('withcomments') == 1 || $feed == 'comments-rss2' ) {
     818    if ( 1 != get_query_var('withoutcomments') && ( is_singular() || get_query_var('withcomments') == 1 || $feed == 'comments-rss2' ) ) {
    819819        $feed = 'rss2';
    820820        $for_comments = true;   
Note: See TracChangeset for help on using the changeset viewer.