Filip has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/340544 )
Change subject: Replaced deprecated Linker::link usages ...................................................................... Replaced deprecated Linker::link usages Bug: T149346 Change-Id: Ideef519362e279aba4a8a44c62690106c2fc36b5 --- M PollPage.php M SpecialAdminPoll.php M SpecialViewPoll.php 3 files changed, 16 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PollNY refs/changes/44/340544/1 diff --git a/PollPage.php b/PollPage.php index f65cbc7..25c0473 100644 --- a/PollPage.php +++ b/PollPage.php @@ -1,4 +1,5 @@ <?php +use MediaWiki\MediaWikiServices; class PollPage extends Article { @@ -144,7 +145,7 @@ $adminLinks = array(); // Poll administrators can access the poll admin panel if( $wgUser->isAllowed( 'polladmin' ) ) { - $adminLinks[] = Linker::link( + $adminLinks[] = MediaWikiServices::getInstance()->getLinkRenderer()->makeLink( SpecialPage::getTitleFor( 'AdminPoll' ), wfMessage( 'poll-admin-panel' )->text() ); diff --git a/SpecialAdminPoll.php b/SpecialAdminPoll.php index 76cde69..dff391a 100644 --- a/SpecialAdminPoll.php +++ b/SpecialAdminPoll.php @@ -5,6 +5,8 @@ * @file * @ingroup Extensions */ +use MediaWiki\MediaWikiServices; + class AdminPoll extends SpecialPage { /** @@ -248,12 +250,13 @@ $output = ''; $numofpages = $total / $perPage; $viewPoll = SpecialPage::getTitleFor( 'ViewPoll' ); + $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer(); if( $numofpages > 1 ) { $output .= '<div class="view-poll-page-nav">'; if( $page > 1 ) { - $output .= Linker::link( + $output .= $linkRenderer->makeLink( $viewPoll, $this->msg( 'poll-prev' )->text(), array(), @@ -278,7 +281,7 @@ if( $i == $page ) { $output .= ( $i . ' ' ); } else { - $output .= Linker::link( + $output .= $linkRenderer->makeLink( $viewPoll, $i, array(), @@ -292,7 +295,7 @@ if( ( $total - ( $per_page * $page ) ) > 0 ) { $output .= $this->msg( 'word-separator' )->plain() . - Linker::link( + $linkRenderer->makeLink( $viewPoll, $this->msg( 'poll-next' )->text(), array(), diff --git a/SpecialViewPoll.php b/SpecialViewPoll.php index a4ea6cf..b557616 100644 --- a/SpecialViewPoll.php +++ b/SpecialViewPoll.php @@ -4,6 +4,8 @@ * @file * @ingroup Extensions */ +use MediaWiki\MediaWikiServices; + class ViewPoll extends SpecialPage { /** @@ -22,6 +24,7 @@ $out = $this->getOutput(); $request = $this->getRequest(); $thisTitle = $this->getPageTitle(); + $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer(); // Add CSS & JS $out->addModuleStyles( 'ext.pollNY.css' ); @@ -78,7 +81,7 @@ } if ( $type == 'newest' ) { - $output .= '<p>' . Linker::link( + $output .= '<p>' . $linkRenderer->makeLink( $thisTitle, $this->msg( 'poll-view-popular' )->text(), array(), @@ -87,7 +90,7 @@ $this->msg( 'poll-view-newest' )->text() . '</b></p>'; } else { $output .= '<p><b>' . $this->msg( 'poll-view-popular' )->text() . - '</b></p><p>' . Linker::link( + '</b></p><p>' . $linkRenderer->makeLink( $thisTitle, $this->msg( 'poll-view-newest' )->text(), array(), @@ -191,7 +194,7 @@ if( $numofpages > 1 ) { $output .= '<div class="view-poll-page-nav">'; if( $page > 1 ) { - $output .= Linker::link( + $output .= $linkRenderer->makeLink( $thisTitle, $this->msg( 'poll-prev' )->text(), array(), @@ -216,7 +219,7 @@ if( $i == $page ) { $output .= ( $i . ' ' ); } else { - $output .= Linker::link( + $output .= $linkRenderer->makeLink( $thisTitle, $i, array(), @@ -229,7 +232,7 @@ } if( ( $total - ( $per_page * $page ) ) > 0 ) { - $output .= $this->msg( 'word-separator' )->plain() . Linker::link( + $output .= $this->msg( 'word-separator' )->plain() . $linkRenderer->makeLink( $thisTitle, $i, array(), -- To view, visit https://gerrit.wikimedia.org/r/340544 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ideef519362e279aba4a8a44c62690106c2fc36b5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PollNY Gerrit-Branch: master Gerrit-Owner: Filip <r...@protonmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits