Make WordPress Core


Ignore:
Timestamp:
03/17/2006 01:16:22 AM (18 years ago)
Author:
ryan
Message:

Comment feed fixes from David House. fixes #2570

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-commentsrss2.php

    r3543 r3644  
    3232            comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID,
    3333            $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
    34             LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = '$id'
     34            LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = '" . get_the_ID() . "'
    3535            AND $wpdb->comments.comment_approved = '1' AND $wpdb->posts.post_status = 'publish'
    3636            AND post_date_gmt < '" . gmdate("Y-m-d H:i:59") . "'
     
    4747        if ($comments) {
    4848            foreach ($comments as $comment) {
     49                $GLOBALS['comment'] =& $comment;
    4950                // Some plugins may need to know the metadata
    5051                // associated with this comment's post:
     
    7879    </item>
    7980<?php
    80             }
     81            } 
    8182        }
    8283    }
Note: See TracChangeset for help on using the changeset viewer.