From: Alexandre Emsenhuber Date: Mon, 17 Oct 2011 14:17:52 +0000 (+0000) Subject: Use local context to get messages X-Git-Tag: 1.31.0-rc.0~27048 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=e057fb79b008cb43f5ca6bd2eeaa1031cf2bd37e;p=lhc%2Fweb%2Fwiklou.git Use local context to get messages --- diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 5ee1e1ca8c..fca8c060d5 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -558,7 +558,7 @@ class SpecialPage { } else { $msg = $summaryMessageKey; } - if ( !wfMessage( $msg )->isBlank() and ! $this->including() ) { + if ( !$this->msg( $msg )->isBlank() && !$this->including() ) { $this->getOutput()->wrapWikiMsg( "
\n$1\n
", $msg ); } @@ -576,7 +576,7 @@ class SpecialPage { * @return String */ function getDescription() { - return wfMsg( strtolower( $this->mName ) ); + return $this->msg( strtolower( $this->mName ) )->text(); } /** @@ -742,9 +742,9 @@ abstract class FormSpecialPage extends SpecialPage { $form = new HTMLForm( $this->fields, $this->getContext() ); $form->setSubmitCallback( array( $this, 'onSubmit' ) ); - $form->setWrapperLegend( wfMessage( strtolower( $this->getName() ) . '-legend' ) ); + $form->setWrapperLegend( $this->msg( strtolower( $this->getName() ) . '-legend' ) ); $form->addHeaderText( - wfMessage( strtolower( $this->getName() ) . '-text' )->parseAsBlock() ); + $this->msg( strtolower( $this->getName() ) . '-text' )->parseAsBlock() ); // Retain query parameters (uselang etc) $params = array_diff_key(