Index: trunk/phase3/includes/FeedUtils.php |
— | — | @@ -57,18 +57,17 @@ |
58 | 58 | $timestamp = wfTimestamp( TS_MW, $row->rc_timestamp ); |
59 | 59 | $actiontext = ''; |
60 | 60 | if( $row->rc_type == RC_LOG ) { |
61 | | - if( $row->rc_deleted & LogPage::DELETED_ACTION ) { |
62 | | - $actiontext = wfMsgHtml('rev-deleted-event'); |
63 | | - } else { |
64 | | - $actiontext = LogPage::actionText( $row->rc_log_type, $row->rc_log_action, |
65 | | - $titleObj, RequestContext::getMain()->getSkin(), LogPage::extractParams($row->rc_params,true,true) ); |
66 | | - } |
| 61 | + $rcRow = (array)$row; // newFromRow() only accepts arrays for RC rows |
| 62 | + $actiontext = LogFormatter::newFromRow( $rcRow )->getActionText(); |
67 | 63 | } |
68 | 64 | return self::formatDiffRow( $titleObj, |
69 | 65 | $row->rc_last_oldid, $row->rc_this_oldid, |
70 | 66 | $timestamp, |
71 | | - ($row->rc_deleted & Revision::DELETED_COMMENT) ? wfMsgHtml('rev-deleted-comment') : $row->rc_comment, |
72 | | - $actiontext ); |
| 67 | + ($row->rc_deleted & Revision::DELETED_COMMENT) |
| 68 | + ? wfMsgHtml('rev-deleted-comment') |
| 69 | + : $row->rc_comment, |
| 70 | + $actiontext |
| 71 | + ); |
73 | 72 | } |
74 | 73 | |
75 | 74 | /** |