r99051 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99050‎ | r99051 | r99052 >
Date:20:41, 5 October 2011
Author:aaron
Status:ok
Tags:
Comment:
Fixed fatals in r99047 by just using Linker class
Modified paths:
  • /trunk/extensions/FlaggedRevs/presentation/FlaggedPageView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/presentation/FlaggedPageView.php
@@ -1503,7 +1503,6 @@
15041504 protected static function diffToStableLink(
15051505 FlaggedPage $article, $oldRev, Revision $newRev
15061506 ) {
1507 - $reqUser = $this->getUser();
15081507 $srev = $article->getStableRev();
15091508 if ( !$srev ) {
15101509 return ''; // nothing to do
@@ -1515,7 +1514,7 @@
15161515 # Make a link to the full diff-to-stable if:
15171516 # (a) Actual revs are pending and (b) We are not viewing the full diff-to-stable
15181517 if ( $article->revsArePending() && !$fullStableDiff ) {
1519 - $review = $reqUser->getSkin()->linkKnown(
 1518+ $review = Linker::linkKnown(
15201519 $article->getTitle(),
15211520 wfMsgHtml( 'review-diff2stable' ),
15221521 array(),
@@ -1578,8 +1577,6 @@
15791578 // Fetch template changes for a reviewed revision since review
15801579 // @return array
15811580 protected static function fetchTemplateChanges( FlaggedRevision $frev, $newTemplates = null ) {
1582 - $reqUser = $this->getUser();
1583 - $skin = $reqUser->getSkin();
15841581 $diffLinks = array();
15851582 if ( $newTemplates === null ) {
15861583 $changes = $frev->findPendingTemplateChanges();
@@ -1588,7 +1585,7 @@
15891586 }
15901587 foreach ( $changes as $tuple ) {
15911588 list( $title, $revIdStable, $hasStable ) = $tuple;
1592 - $link = $skin->linkKnown(
 1589+ $link = Linker::linkKnown(
15931590 $title,
15941591 htmlspecialchars( $title->getPrefixedText() ),
15951592 array(),
@@ -1604,8 +1601,6 @@
16051602 // Fetch file changes for a reviewed revision since review
16061603 // @return array
16071604 protected static function fetchFileChanges( FlaggedRevision $frev, $newFiles = null ) {
1608 - $reqUser = $this->getUser();
1609 - $skin = $reqUser->getSkin();
16101605 $diffLinks = array();
16111606 if ( $newFiles === null ) {
16121607 $changes = $frev->findPendingFileChanges( 'noForeign' );
@@ -1615,7 +1610,7 @@
16161611 foreach ( $changes as $tuple ) {
16171612 list( $title, $revIdStable, $hasStable ) = $tuple;
16181613 // @TODO: change when MW has file diffs
1619 - $link = $skin->link( $title, htmlspecialchars( $title->getPrefixedText() ) );
 1614+ $link = Linker::link( $title, htmlspecialchars( $title->getPrefixedText() ) );
16201615 if ( !$hasStable ) {
16211616 $link = "<strong>$link</strong>";
16221617 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99047Made FlaggedPageView extend ContextSource and removed some global usageaaron20:29, 5 October 2011

Status & tagging log