r106505 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106504‎ | r106505 | r106506 >
Date:13:24, 17 December 2011
Author:ialex
Status:ok
Tags:
Comment:
Use local context to get messages
Modified paths:
  • /trunk/phase3/includes/specials/SpecialComparePages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialComparePages.php
@@ -96,7 +96,7 @@
9797 'name' => 'unhide',
9898 ),
9999 ), $this->getContext(), 'compare' );
100 - $form->setSubmitText( wfMsg( 'compare-submit' ) );
 100+ $form->setSubmitTextMsg( 'compare-submit' );
101101 $form->suppressReset();
102102 $form->setMethod( 'get' );
103103 $form->setSubmitCallback( array( __CLASS__, 'showDiff' ) );
@@ -140,10 +140,10 @@
141141 }
142142 $title = Title::newFromText( $value );
143143 if ( !$title instanceof Title ) {
144 - return wfMsgExt( 'compare-invalid-title', 'parse' );
 144+ return $this->msg( 'compare-invalid-title' )->parseAsBlock();
145145 }
146146 if ( !$title->exists() ) {
147 - return wfMsgExt( 'compare-title-not-exists', 'parse' );
 147+ return $this->msg( 'compare-title-not-exists' )->parseAsBlock();
148148 }
149149 return true;
150150 }
@@ -154,7 +154,7 @@
155155 }
156156 $revision = Revision::newFromId( $value );
157157 if ( $revision === null ) {
158 - return wfMsgExt( 'compare-revision-not-exists', 'parse' );
 158+ return $this->msg( 'compare-revision-not-exists' )->parseAsBlock();
159159 }
160160 return true;
161161 }

Status & tagging log