Make WordPress Core

Ticket #1216: commentsrss.diff

File commentsrss.diff, 1.5 KB (added by mdawaffe, 21 years ago)
  • wp-commentsrss2.php

     
    3333                        comment_author_url, comment_date, comment_content, comment_post_ID,
    3434                        $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
    3535                        LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = '$id'
    36                         AND $wpdb->comments.comment_approved = '1' AND ($wpdb->posts.post_status = 'publish' OR $wpdb->posts.post_status = 'page')
     36                        AND $wpdb->comments.comment_approved = '1' AND ($wpdb->posts.post_status = 'publish' OR $wpdb->posts.post_status = 'static')
    3737                        AND post_date < '".date("Y-m-d H:i:59")."'
    3838                        ORDER BY comment_date DESC LIMIT " . get_settings('posts_per_rss') );
    3939                } else { // if no post id passed in, we'll just ue the last 10 comments.
    4040                        $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email,
    4141                        comment_author_url, comment_date, comment_content, comment_post_ID,
    4242                        $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
    43                         LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE $wpdb->posts.post_status = 'publish'
     43                        LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE ($wpdb->posts.post_status = 'publish' OR $wpdb->posts.post_status = 'static')
    4444                        AND $wpdb->comments.comment_approved = '1' AND post_date < '".date("Y-m-d H:i:s")."' 
    4545                        ORDER BY comment_date DESC LIMIT " . get_settings('posts_per_rss') );
    4646                }