From 5be318f7e95aed4190585e0ce77066af1ea340db Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 29 Apr 2004 01:14:32 +0000 Subject: [PATCH] Fix use of the field in RSS feed. It's not a textual comment, but rather a URL to a comments page; using the talk page in this case. If the page in question already is a talk page, it'll be the same URL as the page itself. --- includes/QueryPage.php | 9 +++------ includes/SpecialRecentchanges.php | 3 ++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/includes/QueryPage.php b/includes/QueryPage.php index b24826ff8f..da0aaa017e 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -142,12 +142,9 @@ class QueryPage { } $comments = ""; - if( isset( $row->cur_comment ) ) { - $comments = $row->cur_comment; - } elseif( isset( $row->old_comment ) ) { - $comments = $row->old_comment; - } elseif( isset( $row->rc_cur_comment ) ) { - $comments = $row->rc_cur_comment; + if( $title ) { + $talkpage = $title->getTalkPage(); + $comments = $talkpage->getFullURL(); } return new FeedItem( diff --git a/includes/SpecialRecentchanges.php b/includes/SpecialRecentchanges.php index 79cfe7bd94..9581b8c52d 100644 --- a/includes/SpecialRecentchanges.php +++ b/includes/SpecialRecentchanges.php @@ -129,13 +129,14 @@ function wfSpecialRecentchanges( $par ) $feed->outHeader(); foreach( $rows as $obj ) { $title = Title::makeTitle( $obj->rc_namespace, $obj->rc_title ); + $talkpage = $title->getTalkPage(); $item = new FeedItem( $title->getPrefixedText(), htmlspecialchars( $obj->rc_comment ), $title->getFullURL(), $obj->rc_timestamp, $obj->rc_user_text, - htmlspecialchars( $obj->rc_comment ) + $talkpage->getFullURL() ); $feed->outItem( $item ); } -- 2.20.1