jenkins-bot has submitted this change and it was merged. (
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, 12 insertions(+), 9 deletions(-)
Approvals:
Jack Phoenix: Looks good to me, approved
SamanthaNguyen: Looks good to me, but someone else must approve
jenkins-bot: Verified
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..e5ab874 100644
--- a/SpecialAdminPoll.php
+++ b/SpecialAdminPoll.php
@@ -248,12 +248,13 @@
$output = '';
$numofpages = $total / $perPage;
$viewPoll = SpecialPage::getTitleFor( 'ViewPoll' );
+ $linkRenderer = $this->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 +279,7 @@
if( $i == $page ) {
$output .= ( $i . ' ' );
} else {
- $output .= Linker::link(
+ $output .= $linkRenderer->makeLink(
$viewPoll,
$i,
array(),
@@ -292,7 +293,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..00cda1c 100644
--- a/SpecialViewPoll.php
+++ b/SpecialViewPoll.php
@@ -22,6 +22,7 @@
$out = $this->getOutput();
$request = $this->getRequest();
$thisTitle = $this->getPageTitle();
+ $linkRenderer = $this->getLinkRenderer();
// Add CSS & JS
$out->addModuleStyles( 'ext.pollNY.css' );
@@ -78,7 +79,7 @@
}
if ( $type == 'newest' ) {
- $output .= '<p>' . Linker::link(
+ $output .= '<p>' . $linkRenderer->makeLink(
$thisTitle,
$this->msg( 'poll-view-popular' )->text(),
array(),
@@ -87,7 +88,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 +192,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 +217,7 @@
if( $i == $page ) {
$output .= ( $i . ' ' );
} else {
- $output .= Linker::link(
+ $output .= $linkRenderer->makeLink(
$thisTitle,
$i,
array(),
@@ -229,7 +230,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: merged
Gerrit-Change-Id: Ideef519362e279aba4a8a44c62690106c2fc36b5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PollNY
Gerrit-Branch: master
Gerrit-Owner: Filip <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: MtDu <[email protected]>
Gerrit-Reviewer: SamanthaNguyen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits