From 605fde161db71961a611d56346e591cbf7ef1ed9 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 13 Mar 2008 10:59:03 +0000 Subject: [PATCH] Hide deleted items in feeds --- includes/SpecialRecentchanges.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/includes/SpecialRecentchanges.php b/includes/SpecialRecentchanges.php index 2fee735bd9..8d53bc3f85 100644 --- a/includes/SpecialRecentchanges.php +++ b/includes/SpecialRecentchanges.php @@ -430,7 +430,7 @@ function rcDoOutputFeed( $rows, &$feed ) { rcFormatDiff( $obj ), $title->getFullURL( 'diff=' . $obj->rc_this_oldid . '&oldid=prev' ), $obj->rc_timestamp, - $obj->rc_user_text, + ($obj->rc_deleted & Revision::DELETED_USER) ? wfMsgHtml('rev-deleted-user') : $obj->rc_user_text, $talkpage->getFullURL() ); $feed->outItem( $item ); @@ -639,15 +639,18 @@ function rcFormatDiff( $row ) { return rcFormatDiffRow( $titleObj, $row->rc_last_oldid, $row->rc_this_oldid, $timestamp, - $row->rc_comment ); + ($row->rc_deleted & Revision::DELETED_COMMENT) ? wfMsgHtml('rev-deleted-comment') : $row->rc_comment, + ($row->rc_deleted & LogPage::DELETED_ACTION) ? wfMsgHtml('rev-deleted-event') : $row->rc_actiontext ); } -function rcFormatDiffRow( $title, $oldid, $newid, $timestamp, $comment ) { +function rcFormatDiffRow( $title, $oldid, $newid, $timestamp, $comment, $actiontext='' ) { global $wgFeedDiffCutoff, $wgContLang, $wgUser; $fname = 'rcFormatDiff'; wfProfileIn( $fname ); $skin = $wgUser->getSkin(); + # log enties + if( $actiontext ) $comment = "$actiontext $comment"; $completeText = '

' . $skin->formatComment( $comment ) . "

\n"; //NOTE: Check permissions for anonymous users, not current user. -- 2.20.1