jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364160 )
Change subject: Use LogFormatter::getLinkRenderer in LogFormatter extensions ...................................................................... Use LogFormatter::getLinkRenderer in LogFormatter extensions This raises MediaWiki version requirement to 1.30.0. Change-Id: I8b0f415b87f1d3b7e5ea14af1813afa380c8657e --- M extension.json M includes/GlobalRename/GlobalRenameLogFormatter.php M includes/GlobalRename/GlobalUserMergeLogFormatter.php 3 files changed, 11 insertions(+), 6 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 597a041..5d8bda6 100644 --- a/extension.json +++ b/extension.json @@ -6,7 +6,7 @@ "license-name": "GPL-2.0", "type": "specialpage", "requires": { - "MediaWiki": ">= 1.29.0" + "MediaWiki": ">= 1.30.0" }, "GroupPermissions": { "steward": { diff --git a/includes/GlobalRename/GlobalRenameLogFormatter.php b/includes/GlobalRename/GlobalRenameLogFormatter.php index 84f8bef..992a252 100644 --- a/includes/GlobalRename/GlobalRenameLogFormatter.php +++ b/includes/GlobalRename/GlobalRenameLogFormatter.php @@ -23,7 +23,7 @@ /** * @param string $name - * @return array + * @return array|string */ protected function getCentralAuthLink( $name ) { $title = Title::makeTitle( NS_SPECIAL, 'CentralAuth/' . $name ); @@ -31,9 +31,14 @@ return "[[{$title->getPrefixedText()}]]"; } - return Message::rawParam( Linker::link( $title, htmlspecialchars( $name ) ) ); + return Message::rawParam( $this->getLinkRenderer()->makeLink( $title, $name ) ); } + /** + * @param string $name + * @param string $wiki + * @return array|string + */ protected function getLocalWikiLink( $name, $wiki ) { $text = "User:$name@$wiki"; if ( $this->plaintext ) { diff --git a/includes/GlobalRename/GlobalUserMergeLogFormatter.php b/includes/GlobalRename/GlobalUserMergeLogFormatter.php index 4c3e478..da38dab 100644 --- a/includes/GlobalRename/GlobalUserMergeLogFormatter.php +++ b/includes/GlobalRename/GlobalUserMergeLogFormatter.php @@ -23,15 +23,15 @@ /** * @param string $name - * @return array + * @return array|Title */ protected function getCentralAuthLink( $name ) { if ( $this->plaintext ) { return Title::newFromText( 'CentralAuth/' . $name, NS_SPECIAL ); } else { - return Linker::linkKnown( + return $this->getLinkRenderer()->makeKnownLink( SpecialPage::getTitleFor( 'CentralAuth', $name ), - htmlspecialchars( $name ) + $name ); } } -- To view, visit https://gerrit.wikimedia.org/r/364160 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8b0f415b87f1d3b7e5ea14af1813afa380c8657e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Matěj Suchánek <matejsuchane...@gmail.com> Gerrit-Reviewer: Brion VIBBER <br...@wikimedia.org> Gerrit-Reviewer: Legoktm <lego...@member.fsf.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits