r100029 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100028‎ | r100029 | r100030 >
Date:14:17, 17 October 2011
Author:ialex
Status:ok
Tags:
Comment:
Use local context to get messages
Modified paths:
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialPage.php
@@ -558,7 +558,7 @@
559559 } else {
560560 $msg = $summaryMessageKey;
561561 }
562 - if ( !wfMessage( $msg )->isBlank() and ! $this->including() ) {
 562+ if ( !$this->msg( $msg )->isBlank() && !$this->including() ) {
563563 $this->getOutput()->wrapWikiMsg(
564564 "<div class='mw-specialpage-summary'>\n$1\n</div>", $msg );
565565 }
@@ -576,7 +576,7 @@
577577 * @return String
578578 */
579579 function getDescription() {
580 - return wfMsg( strtolower( $this->mName ) );
 580+ return $this->msg( strtolower( $this->mName ) )->text();
581581 }
582582
583583 /**
@@ -742,9 +742,9 @@
743743
744744 $form = new HTMLForm( $this->fields, $this->getContext() );
745745 $form->setSubmitCallback( array( $this, 'onSubmit' ) );
746 - $form->setWrapperLegend( wfMessage( strtolower( $this->getName() ) . '-legend' ) );
 746+ $form->setWrapperLegend( $this->msg( strtolower( $this->getName() ) . '-legend' ) );
747747 $form->addHeaderText(
748 - wfMessage( strtolower( $this->getName() ) . '-text' )->parseAsBlock() );
 748+ $this->msg( strtolower( $this->getName() ) . '-text' )->parseAsBlock() );
749749
750750 // Retain query parameters (uselang etc)
751751 $params = array_diff_key(

Status & tagging log