From: Bartosz DziewoƄski Date: Fri, 8 Aug 2014 22:38:14 +0000 (+0200) Subject: Never display empty sections on Special:Version X-Git-Tag: 1.31.0-rc.0~14488^2 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=c99a288724eb59e4398d49ade90417aed7cd784e;p=lhc%2Fweb%2Fwiklou.git Never display empty sections on Special:Version Follow-up to d423112b. Change-Id: I44c8bfe6f4ca1350a7e35a253785f772602353c1 --- diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 50929a9ba6..318ceb148e 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -428,7 +428,11 @@ class SpecialVersion extends SpecialPage { function getExtensionCredits() { global $wgExtensionCredits; - if ( !count( $wgExtensionCredits ) ) { + if ( + count( $wgExtensionCredits ) === 0 || + // Skins are displayed separately, see getSkinCredits() + ( count( $wgExtensionCredits ) === 1 && isset( $wgExtensionCredits['skin'] ) ) + ) { return ''; } @@ -476,6 +480,11 @@ class SpecialVersion extends SpecialPage { * @return string Wikitext */ function getSkinCredits() { + global $wgExtensionCredits; + if ( !isset( $wgExtensionCredits['skin'] ) || count( $wgExtensionCredits['skin'] ) === 0 ) { + return ''; + } + $out = Xml::element( 'h2', array( 'id' => 'mw-version-skin' ),