From bc41bf53268265b35d853a35b08480fa2d4ddf20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 20 Mar 2020 22:49:22 +0100 Subject: [PATCH] SkinMinerva: Fix link target for transcluded pages in doEditSectionLink() Bug: T198011 Change-Id: I62caa73d9b337be8f987f077eced0b2e6ca4fa5f --- includes/skins/SkinMinerva.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index 1a0a9480b..0ba5aa355 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -216,7 +216,8 @@ class SkinMinerva extends SkinTemplate { /** * Overrides Skin::doEditSectionLink - * @param Title $nt + * @param Title $nt The title being linked to (may not be the same as + * the current page, if the section is included from a template) * @param string $section * @param string|null $tooltip * @param Language $lang @@ -228,7 +229,7 @@ class SkinMinerva extends SkinTemplate { $message = $this->msg( 'mobile-frontend-editor-edit' )->inLanguage( $lang )->text(); $html = Html::openElement( 'span', [ 'class' => 'mw-editsection' ] ); $html .= Html::element( 'a', [ - 'href' => $this->getTitle()->getLocalURL( [ 'action' => 'edit', 'section' => $section ] ), + 'href' => $nt->getLocalURL( [ 'action' => 'edit', 'section' => $section ] ), 'title' => $this->msg( 'editsectionhint', $tooltip )->inLanguage( $lang )->text(), 'data-section' => $section, // Note visibility of the edit section link button is controlled by .edit-page in ui.less so