From 88bc5565de61524e5aa57211b17627119009f1ee Mon Sep 17 00:00:00 2001 From: umherirrender Date: Wed, 14 Jan 2015 19:09:55 +0100 Subject: [PATCH] Remove form when including empty Special:WhatLinksHere Included special pages should never show a form, because a included special page is designed to show the result of something, not allow starting a search (where than Special:WhatLinksHere is opened instead of showing the result within the wiki page). On no input Special:WhatLinksHere would output nothing, like a transcluded Special:Contributions would do. Bug: T67779 Change-Id: I289fd8fe6bbd4238581035770a472b1c7b9f2643 --- includes/specials/SpecialWhatlinkshere.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index 40cce5e34d..0b3175a61d 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -73,7 +73,9 @@ class SpecialWhatLinksHere extends IncludableSpecialPage { $this->target = Title::newFromURL( $opts->getValue( 'target' ) ); if ( !$this->target ) { - $out->addHTML( $this->whatlinkshereForm() ); + if ( !$this->including() ) { + $out->addHTML( $this->whatlinkshereForm() ); + } return; } -- 2.20.1