From: umherirrender Date: Wed, 14 Jan 2015 18:09:55 +0000 (+0100) Subject: Remove form when including empty Special:WhatLinksHere X-Git-Tag: 1.31.0-rc.0~11793^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=88bc5565de61524e5aa57211b17627119009f1ee;p=lhc%2Fweb%2Fwiklou.git 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 --- 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; }