From: Amir E. Aharoni Date: Tue, 22 May 2012 10:25:47 +0000 (+0300) Subject: bug 37015: Allow disabling special page summary X-Git-Tag: 1.31.0-rc.0~23485^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=d4dd8419b964e22e1334274df9376ad3de367327;p=lhc%2Fweb%2Fwiklou.git bug 37015: Allow disabling special page summary Replaced isBlank() with isDisabled() in SpecialPage::outputHeader. This allows disabling the default headers (*-summary). Patch set 2: Hid recentchangestext if nothing is written there. Change-Id: Id3ec2aeb1fab00344908b7bff01929bdafbfd08f --- diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 7a6c0befb9..9e6717fa50 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -626,7 +626,7 @@ class SpecialPage { } else { $msg = $summaryMessageKey; } - if ( !$this->msg( $msg )->isBlank() && !$this->including() ) { + if ( !$this->msg( $msg )->isDisabled() && !$this->including() ) { $this->getOutput()->wrapWikiMsg( "
\n$1\n
", $msg ); } diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 46dd115a5e..bb384d415d 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -635,7 +635,7 @@ class SpecialRecentChanges extends IncludableSpecialPage { global $wgContLang; $message = $this->msg( 'recentchangestext' )->inContentLanguage(); - if ( $message->exists() ) { + if ( !$message->isDisabled() ) { $this->getOutput()->addWikiText( Html::rawElement( 'p', array( 'lang' => $wgContLang->getCode(), 'dir' => $wgContLang->getDir() ),