From 96c25ea554902a35976a520ede7c332abb8fa57c Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Fri, 27 Feb 2009 09:07:08 +0000 Subject: [PATCH] Tweak outputHeader to allow overriding of summary message key. Useful for extensions to stick with the naming conventions of message keys: 'extensionname-xxx' --- includes/SpecialPage.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 70938e636c..c44f44d8b3 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -753,10 +753,22 @@ class SpecialPage } } - function outputHeader() { + /** + * Outputs a summary message on top of special pages + * Per default the message key is the canonical name of the special page + * May be overriden, i.e. by extensions to stick with the naming conventions + * for message keys: 'extensionname-xxx' + * + * @param string message key of the summary + */ + function outputHeader( $summaryMessageKey = '' ) { global $wgOut, $wgContLang; - $msg = $wgContLang->lc( $this->name() ) . '-summary'; + if( $summaryMessageKey == '' ) { + $msg = $wgContLang->lc( $this->name() ) . '-summary'; + } else { + $msg = $summaryMessageKey; + } $out = wfMsgNoTrans( $msg ); if ( ! wfEmptyMsg( $msg, $out ) and $out !== '' and ! $this->including() ) { $wgOut->wrapWikiMsg( "
\n$1
", $msg ); -- 2.20.1