jenkins-bot has submitted this change and it was merged. Change subject: Avoid a wfMessage() call ......................................................................
Avoid a wfMessage() call Change-Id: I83d5e8235548a62f154b83ae4a3a284fa97fd9ce --- M frontend/FlaggedRevsUI.hooks.php 1 file changed, 5 insertions(+), 4 deletions(-) Approvals: Florianschmidtwelzow: Looks good to me, approved jenkins-bot: Verified diff --git a/frontend/FlaggedRevsUI.hooks.php b/frontend/FlaggedRevsUI.hooks.php index fcd07bc..0abe3be 100644 --- a/frontend/FlaggedRevsUI.hooks.php +++ b/frontend/FlaggedRevsUI.hooks.php @@ -427,7 +427,7 @@ } elseif ( isset( $row->fr_quality ) ) { if ( !( $row->rev_deleted & Revision::DELETED_TEXT ) ) { # Add link to stable version of *this* rev, if any - list( $link, $class ) = self::markHistoryRow( $title, $row ); + list( $link, $class ) = self::markHistoryRow( $history, $title, $row ); # Space out and demark the stable revision if ( $revId == $history->fr_stableRevId && $history->fr_pendingRevs ) { $liClasses[] = 'fr-hist-stable-margin'; @@ -443,11 +443,12 @@ /** * Make stable version link and return the css + * @param IContextSource $ctx * @param Title $title - * @param Row $row, from history page + * @param stdClass $row, from history page * @return array (string,string) */ - protected static function markHistoryRow( Title $title, $row ) { + protected static function markHistoryRow( IContextSource $ctx, Title $title, $row ) { if ( !isset( $row->fr_quality ) ) { return array( "", "" ); // not reviewed } @@ -470,7 +471,7 @@ } $name = isset( $row->reviewer ) ? $row->reviewer : User::whoIs( $row->fr_user ); - $link = wfMessage( $msg, $title->getPrefixedDBkey(), $row->rev_id, $name )->parse(); + $link = $ctx->msg( $msg, $title->getPrefixedDBkey(), $row->rev_id, $name )->parse(); $link = "<span class='$css plainlinks'>[$link]</span>"; return array( $link, $liCss ); } -- To view, visit https://gerrit.wikimedia.org/r/311044 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I83d5e8235548a62f154b83ae4a3a284fa97fd9ce Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FlaggedRevs Gerrit-Branch: master Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: Chad <ch...@wikimedia.org> Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com> Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits