From f0483b35c70c7c3ff9666202d9dfd650cc8337cb Mon Sep 17 00:00:00 2001 From: Fomafix Date: Tue, 30 Apr 2019 12:19:51 +0200 Subject: [PATCH] Remove parameter 'options' from hook 'SkinEditSectionLinks' The generated links are now always known links. All users of the hook 'SkinEditSectionLinks' in extensions set 'options' => [ 'noclasses', 'known' ] https://gerrit.wikimedia.org/g/mediawiki/extensions/TinyMCE/+/5f48eb9acd19062a5d6e731ef34b93ef62d3e730/TinyMCE.hooks.php#291 https://gerrit.wikimedia.org/g/mediawiki/extensions/VisualEditor/+/857c1bd3d14ce3a2a98a7d9743fc6120f7d91e9e/includes/VisualEditorHooks.php#617 This change makes it easier to migrate to LinkRenderer in Ifc170abc958add28a2fe08aa0c44af83c6f7cad8 without legacy options. Change-Id: Ia5d151b81dabce9560045b45886f2c77abf975da --- docs/hooks.txt | 1 - includes/skins/Skin.php | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index b2f1e816b5..e90468dfee 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -3068,7 +3068,6 @@ $tooltip: The default tooltip. Escape before using. - text - String for the text - attribs - Array of attributes - query - Array of query parameters to add to the URL - - options - Array of options for Linker::link $lang: The language code to use for the link in the wfMessage function 'SkinGetPoweredBy': TODO diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 4f04278567..595a1e86b3 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -1623,8 +1623,7 @@ abstract class Skin extends ContextSource { 'text' => $this->msg( 'editsection' )->inLanguage( $lang )->text(), 'targetTitle' => $nt, 'attribs' => $attribs, - 'query' => [ 'action' => 'edit', 'section' => $section ], - 'options' => [ 'noclasses', 'known' ] + 'query' => [ 'action' => 'edit', 'section' => $section ] ] ]; @@ -1634,12 +1633,11 @@ abstract class Skin extends ContextSource { $linksHtml = []; foreach ( $links as $k => $linkDetails ) { - $linksHtml[] = Linker::link( + $linksHtml[] = Linker::linkKnown( $linkDetails['targetTitle'], htmlspecialchars( $linkDetails['text'] ), $linkDetails['attribs'], - $linkDetails['query'], - $linkDetails['options'] + $linkDetails['query'] ); } -- 2.20.1