From 4ccf5a9a907c2338c85a179f5bde0d3561cba8ba Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 7 Feb 2012 23:57:33 +0000 Subject: [PATCH] r96546: Made FeedUtils::formatDiff() use the new LogFormatter class rather than a broken LogPage::actionText() call (the tag only had the log action name in it). This change means that log actions in feeds now have the user name in them, unlike 1.18. Also, broke a long code line. --- includes/FeedUtils.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php index 8df4745031..cf42329b72 100644 --- a/includes/FeedUtils.php +++ b/includes/FeedUtils.php @@ -57,18 +57,17 @@ class FeedUtils { $timestamp = wfTimestamp( TS_MW, $row->rc_timestamp ); $actiontext = ''; if( $row->rc_type == RC_LOG ) { - if( $row->rc_deleted & LogPage::DELETED_ACTION ) { - $actiontext = wfMsgHtml('rev-deleted-event'); - } else { - $actiontext = LogPage::actionText( $row->rc_log_type, $row->rc_log_action, - $titleObj, RequestContext::getMain()->getSkin(), LogPage::extractParams($row->rc_params,true,true) ); - } + $rcRow = (array)$row; // newFromRow() only accepts arrays for RC rows + $actiontext = LogFormatter::newFromRow( $rcRow )->getActionText(); } return self::formatDiffRow( $titleObj, $row->rc_last_oldid, $row->rc_this_oldid, $timestamp, - ($row->rc_deleted & Revision::DELETED_COMMENT) ? wfMsgHtml('rev-deleted-comment') : $row->rc_comment, - $actiontext ); + ($row->rc_deleted & Revision::DELETED_COMMENT) + ? wfMsgHtml('rev-deleted-comment') + : $row->rc_comment, + $actiontext + ); } /** -- 2.20.1