Eflyjason has uploaded a new change for review. https://gerrit.wikimedia.org/r/325254
Change subject: Replace Linker::link() & Linker::linkKnown() with LinkRenderer ...................................................................... Replace Linker::link() & Linker::linkKnown() with LinkRenderer Change-Id: I1350819165095d9be79aea8d9189760a4dbddd40 --- M includes/specials/pagers/AllMessagesTablePager.php M includes/specials/pagers/BlockListPager.php M includes/specials/pagers/ContribsPager.php M includes/specials/pagers/DeletedContribsPager.php M includes/specials/pagers/ImageListPager.php 5 files changed, 22 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/54/325254/1 diff --git a/includes/specials/pagers/AllMessagesTablePager.php b/includes/specials/pagers/AllMessagesTablePager.php index 5609310..eda2b6c 100644 --- a/includes/specials/pagers/AllMessagesTablePager.php +++ b/includes/specials/pagers/AllMessagesTablePager.php @@ -313,9 +313,9 @@ ); if ( $this->mCurrentRow->am_customised ) { - $title = Linker::linkKnown( $title, $this->getLanguage()->lcfirst( $value ) ); + $title = $this->getLinkRenderer()->makeKnownLink( $title, $this->getLanguage()->lcfirst( $value ) ); } else { - $title = Linker::link( + $title = $this->getLinkRenderer()->makeLink( $title, $this->getLanguage()->lcfirst( $value ), [], @@ -324,9 +324,9 @@ ); } if ( $this->mCurrentRow->am_talk_exists ) { - $talk = Linker::linkKnown( $talk, $this->talk ); + $talk = $this->getLinkRenderer()->makeKnownLink( $talk, $this->talk ); } else { - $talk = Linker::link( + $talk = $this->getLinkRenderer()->makeLink( $talk, $this->talk, [], diff --git a/includes/specials/pagers/BlockListPager.php b/includes/specials/pagers/BlockListPager.php index d822976..69d63dc 100644 --- a/includes/specials/pagers/BlockListPager.php +++ b/includes/specials/pagers/BlockListPager.php @@ -117,18 +117,18 @@ ) ); if ( $this->getUser()->isAllowed( 'block' ) ) { if ( $row->ipb_auto ) { - $links[] = Linker::linkKnown( + $links[] = $this->getLinkRenderer()->makeKnownLink( SpecialPage::getTitleFor( 'Unblock' ), $msg['unblocklink'], [], [ 'wpTarget' => "#{$row->ipb_id}" ] ); } else { - $links[] = Linker::linkKnown( + $links[] = $this->getLinkRenderer()->makeKnownLink( SpecialPage::getTitleFor( 'Unblock', $row->ipb_address ), $msg['unblocklink'] ); - $links[] = Linker::linkKnown( + $links[] = $this->getLinkRenderer()->makeKnownLink( SpecialPage::getTitleFor( 'Block', $row->ipb_address ), $msg['change-blocklink'] ); diff --git a/includes/specials/pagers/ContribsPager.php b/includes/specials/pagers/ContribsPager.php index a145e45..fbceffe 100644 --- a/includes/specials/pagers/ContribsPager.php +++ b/includes/specials/pagers/ContribsPager.php @@ -367,9 +367,9 @@ $classes = []; $page = Title::newFromRow( $row ); - $link = Linker::link( + $link = $this->getLinkRenderer()->makeLink( $page, - htmlspecialchars( $page->getPrefixedText() ), + $page->getPrefixedText(), [ 'class' => 'mw-contributions-title' ], $page->isRedirect() ? [ 'redirect' => 'no' ] : [] ); @@ -389,7 +389,7 @@ } # Is there a visible previous revision? if ( $rev->userCan( Revision::DELETED_TEXT, $user ) && $rev->getParentId() !== 0 ) { - $difftext = Linker::linkKnown( + $difftext = $this->getLinkRenderer()->makeKnownLink( $page, $this->messages['diff'], [], @@ -401,7 +401,7 @@ } else { $difftext = $this->messages['diff']; } - $histlink = Linker::linkKnown( + $histlink = $this->getLinkRenderer()->makeKnownLink( $page, $this->messages['hist'], [], @@ -434,7 +434,7 @@ $comment = $lang->getDirMark() . Linker::revComment( $rev, false, true ); $date = $lang->userTimeAndDate( $row->rev_timestamp, $user ); if ( $rev->userCan( Revision::DELETED_TEXT, $user ) ) { - $d = Linker::linkKnown( + $d = $this->getLinkRenderer()->makeKnownLink( $page, htmlspecialchars( $date ), [ 'class' => 'mw-changeslist-date' ], diff --git a/includes/specials/pagers/DeletedContribsPager.php b/includes/specials/pagers/DeletedContribsPager.php index 1acbba1..72bb307 100644 --- a/includes/specials/pagers/DeletedContribsPager.php +++ b/includes/specials/pagers/DeletedContribsPager.php @@ -254,7 +254,7 @@ $undelete = SpecialPage::getTitleFor( 'Undelete' ); $logs = SpecialPage::getTitleFor( 'Log' ); - $dellog = Linker::linkKnown( + $dellog = $this->getLinkRenderer()->makeKnownLink( $logs, $this->messages['deletionlog'], [], @@ -264,7 +264,7 @@ ] ); - $reviewlink = Linker::linkKnown( + $reviewlink = $this->getLinkRenderer()->makeKnownLink( SpecialPage::getTitleFor( 'Undelete', $page->getPrefixedDBkey() ), $this->messages['undeleteviewlink'] ); @@ -272,7 +272,7 @@ $user = $this->getUser(); if ( $user->isAllowed( 'deletedtext' ) ) { - $last = Linker::linkKnown( + $last = $this->getLinkRenderer()->makeKnownLink( $undelete, $this->messages['diff'], [], @@ -293,7 +293,7 @@ if ( !$user->isAllowed( 'undelete' ) || !$rev->userCan( Revision::DELETED_TEXT, $user ) ) { $link = $date; // unusable link } else { - $link = Linker::linkKnown( + $link = $this->getLinkRenderer()->makeKnownLink( $undelete, $date, [ 'class' => 'mw-changeslist-date' ], @@ -308,7 +308,7 @@ $link = '<span class="history-deleted">' . $link . '</span>'; } - $pagelink = Linker::link( + $pagelink = $this->getLinkRenderer()->makeLink( $page, null, [ 'class' => 'mw-changeslist-title' ] diff --git a/includes/specials/pagers/ImageListPager.php b/includes/specials/pagers/ImageListPager.php index 7fc4a95..e9368cb 100644 --- a/includes/specials/pagers/ImageListPager.php +++ b/includes/specials/pagers/ImageListPager.php @@ -449,9 +449,9 @@ // Weird files can maybe exist? Bug 22227 $filePage = Title::makeTitleSafe( NS_FILE, $value ); if ( $filePage ) { - $link = Linker::linkKnown( + $link = $this->getLinkRenderer()->makeKnownLink( $filePage, - htmlspecialchars( $filePage->getText() ) + $filePage->getText() ); $download = Xml::element( 'a', [ 'href' => wfLocalFile( $filePage )->getUrl() ], @@ -464,7 +464,7 @@ if ( $filePage->userCan( 'delete', $this->getUser() ) ) { $deleteMsg = $this->msg( 'listfiles-delete' )->escaped(); - $delete = Linker::linkKnown( + $delete = $this->getLinkRenderer()->makeKnownLink( $filePage, $deleteMsg, [], [ 'action' => 'delete' ] ); $delete = $this->msg( 'parentheses' )->rawParams( $delete )->escaped(); @@ -479,9 +479,9 @@ case 'img_user_text': if ( $this->mCurrentRow->img_user ) { $name = User::whoIs( $this->mCurrentRow->img_user ); - $link = Linker::link( + $link = $this->getLinkRenderer()->makeLink( Title::makeTitle( NS_USER, $name ), - htmlspecialchars( $name ) + $name ); } else { $link = htmlspecialchars( $value ); -- To view, visit https://gerrit.wikimedia.org/r/325254 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1350819165095d9be79aea8d9189760a4dbddd40 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Eflyjason <eflyja...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits