From: Kunal Mehta Date: Wed, 1 Jun 2016 03:41:22 +0000 (-0700) Subject: SpecialMovepage: Use LinkRenderer instead of Linker::link() X-Git-Tag: 1.31.0-rc.0~6541^2 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=ac1440ca4c613b96522c5c558f1153c22b01f970;p=lhc%2Fweb%2Fwiklou.git SpecialMovepage: Use LinkRenderer instead of Linker::link() Change-Id: I3b50354e62f47557a3a8ab1ec19a28f687887810 --- diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index f49d730009..20a508d47e 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -601,13 +601,14 @@ class MovePageForm extends UnlistedSpecialPage { $out = $this->getOutput(); $out->setPageTitle( $this->msg( 'pagemovedsub' ) ); - $oldLink = Linker::link( + $linkRenderer = $this->getLinkRenderer(); + $oldLink = $linkRenderer->makeLink( $ot, null, [ 'id' => 'movepage-oldlink' ], [ 'redirect' => 'no' ] ); - $newLink = Linker::linkKnown( + $newLink = $linkRenderer->makeKnownLink( $nt, null, [ 'id' => 'movepage-newlink' ] @@ -723,7 +724,7 @@ class MovePageForm extends UnlistedSpecialPage { # be longer than 255 characters. $newSubpage = Title::makeTitleSafe( $newNs, $newPageName ); if ( !$newSubpage ) { - $oldLink = Linker::linkKnown( $oldSubpage ); + $oldLink = $linkRenderer->makeKnownLink( $oldSubpage ); $extraOutput[] = $this->msg( 'movepage-page-unmoved' )->rawParams( $oldLink ) ->params( Title::makeName( $newNs, $newPageName ) )->escaped(); continue; @@ -731,7 +732,7 @@ class MovePageForm extends UnlistedSpecialPage { # This was copy-pasted from Renameuser, bleh. if ( $newSubpage->exists() && !$oldSubpage->isValidMoveTarget( $newSubpage ) ) { - $link = Linker::linkKnown( $newSubpage ); + $link = $linkRenderer->makeKnownLink( $newSubpage ); $extraOutput[] = $this->msg( 'movepage-page-exists' )->rawParams( $link )->escaped(); } else { $success = $oldSubpage->moveTo( $newSubpage, true, $this->reason, $createRedirect ); @@ -740,14 +741,14 @@ class MovePageForm extends UnlistedSpecialPage { if ( $this->fixRedirects ) { DoubleRedirectJob::fixRedirects( 'move', $oldSubpage, $newSubpage ); } - $oldLink = Linker::link( + $oldLink = $linkRenderer->makeLink( $oldSubpage, null, [], [ 'redirect' => 'no' ] ); - $newLink = Linker::linkKnown( $newSubpage ); + $newLink = $linkRenderer->makeKnownLink( $newSubpage ); $extraOutput[] = $this->msg( 'movepage-page-moved' ) ->rawParams( $oldLink, $newLink )->escaped(); ++$count; @@ -759,8 +760,8 @@ class MovePageForm extends UnlistedSpecialPage { break; } } else { - $oldLink = Linker::linkKnown( $oldSubpage ); - $newLink = Linker::link( $newSubpage ); + $oldLink = $linkRenderer->makeKnownLink( $oldSubpage ); + $newLink = $linkRenderer->makeLink( $newSubpage ); $extraOutput[] = $this->msg( 'movepage-page-unmoved' ) ->rawParams( $oldLink, $newLink )->escaped(); } @@ -804,8 +805,9 @@ class MovePageForm extends UnlistedSpecialPage { $out->addWikiMsg( 'movesubpagetext', $this->getLanguage()->formatNum( $count ) ); $out->addHTML( "\n" );