r105988 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105987‎ | r105988 | r105989 >
Date:05:37, 13 December 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
getLang -> getLanguage
Modified paths:
  • /trunk/extensions/Contest/includes/ContestantPager.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContest.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContestPage.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContestant.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContests.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialEditContest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/specials/SpecialContestPage.php
@@ -180,7 +180,7 @@
181181 $subPage = $this->subPage;
182182 }
183183
184 - $this->getOutput()->addHTML( self::getNavigation( $subPage, $this->getUser(), $this->getLang(), $this->getName() ) );
 184+ $this->getOutput()->addHTML( self::getNavigation( $subPage, $this->getUser(), $this->getLanguage(), $this->getName() ) );
185185 }
186186
187187 }
Index: trunk/extensions/Contest/specials/SpecialContest.php
@@ -118,13 +118,13 @@
119119
120120 $stats['name'] = $contest->getField( 'name' );
121121 $stats['status'] = Contest::getStatusMessage( $contest->getStatus() );
122 - $stats['submissioncount'] = $this->getLang()->formatNum( $contest->getField( 'submission_count' ) );
 122+ $stats['submissioncount'] = $this->getLanguage()->formatNum( $contest->getField( 'submission_count' ) );
123123
124124 $stats['end'] = wfMsgExt(
125125 $contest->getDaysLeft() < 0 ? 'contest-contest-days-ago' : 'contest-contest-days-left',
126126 'parsemag',
127 - $this->getLang()->timeanddate( $contest->getField( 'end' ), true ),
128 - $this->getLang()->formatNum( abs( $contest->getDaysLeft() ) )
 127+ $this->getLanguage()->timeanddate( $contest->getField( 'end' ), true ),
 128+ $this->getLanguage()->formatNum( abs( $contest->getDaysLeft() ) )
129129 );
130130
131131 return $stats;
Index: trunk/extensions/Contest/specials/SpecialContestant.php
@@ -214,11 +214,11 @@
215215 $stats['rating'] = htmlspecialchars( wfMsgExt(
216216 'contest-contestant-rating',
217217 'parsemag',
218 - $this->getLang()->formatNum( $contestant->getField( 'rating' ) / 100 ),
219 - $this->getLang()->formatNum( $contestant->getField( 'rating_count' ) )
 218+ $this->getLanguage()->formatNum( $contestant->getField( 'rating' ) / 100 ),
 219+ $this->getLanguage()->formatNum( $contestant->getField( 'rating_count' ) )
220220 ) );
221221
222 - $stats['comments'] = htmlspecialchars( $this->getLang()->formatNum( $contestant->getField( 'comments' ) ) );
 222+ $stats['comments'] = htmlspecialchars( $this->getLanguage()->formatNum( $contestant->getField( 'comments' ) ) );
223223
224224 return $stats;
225225 }
@@ -248,7 +248,7 @@
249249 $message = wfMsgExt(
250250 'contest-contestant-voted',
251251 'parsemag',
252 - $this->getLang()->formatNum( $vote->getField( 'value' ) )
 252+ $this->getLanguage()->formatNum( $vote->getField( 'value' ) )
253253 );
254254
255255 $out->addHTML( Html::hidden( 'contestant-vote-id', $vote->getId() ) );
@@ -276,7 +276,7 @@
277277 Html::element(
278278 'label',
279279 array( 'for' => 'contestant-rating-' . $value ),
280 - $this->getLang()->formatNum( $value )
 280+ $this->getLanguage()->formatNum( $value )
281281 )
282282 );
283283 }
@@ -348,12 +348,12 @@
349349 'contest-contestant-comment-by',
350350 Linker::userLink( $comment->getField( 'user_id' ), $user->getName() ) .
351351 Linker::userToolLinks( $comment->getField( 'user_id' ), $user->getName() )
352 - ) . '&#160;&#160;&#160;' . htmlspecialchars( $this->getLang()->timeanddate( $comment->getField( 'time' ), true ) )
 352+ ) . '&#160;&#160;&#160;' . htmlspecialchars( $this->getLanguage()->timeanddate( $comment->getField( 'time' ), true ) )
353353 );
354354
355355 $html .= Html::rawElement(
356356 'div',
357 - array( 'class' => 'contestant-comment-text mw-content-' . $this->getLang()->getDir() . '' ),
 357+ array( 'class' => 'contestant-comment-text mw-content-' . $this->getLanguage()->getDir() . '' ),
358358 $this->getOutput()->parse( $comment->getField( 'text' ) )
359359 );
360360
Index: trunk/extensions/Contest/specials/SpecialContests.php
@@ -188,7 +188,7 @@
189189 $fields[] = Html::element(
190190 'td',
191191 array(),
192 - $this->getLang()->formatNum( $contest->getField( 'submission_count' ) )
 192+ $this->getLanguage()->formatNum( $contest->getField( 'submission_count' ) )
193193 );
194194
195195 $links = array();
@@ -247,7 +247,7 @@
248248 $fields[] = Html::rawElement(
249249 'td',
250250 array(),
251 - $this->getLang()->pipeList( $links )
 251+ $this->getLanguage()->pipeList( $links )
252252 );
253253
254254 $out->addHTML( '<tr>' . implode( '', $fields ) . '</tr>' );
Index: trunk/extensions/Contest/specials/SpecialEditContest.php
@@ -124,7 +124,7 @@
125125 else {
126126 if ( !$isNew ) {
127127 $this->getOutput()->addHTML(
128 - SpecialContestPage::getNavigation( $contest->getField( 'name' ), $this->getUser(), $this->getLang(), $this->getName() )
 128+ SpecialContestPage::getNavigation( $contest->getField( 'name' ), $this->getUser(), $this->getLanguage(), $this->getName() )
129129 );
130130 }
131131
Index: trunk/extensions/Contest/includes/ContestantPager.php
@@ -111,8 +111,8 @@
112112 *
113113 * @return Language
114114 */
115 - public function getLang() {
116 - return version_compare( $GLOBALS['wgVersion'], '1.18', '>' ) ? parent::getLang() : $GLOBALS['wgLang'];
 115+ public function getLanguage() {
 116+ return version_compare( $GLOBALS['wgVersion'], '1.18', '>' ) ? parent::getLanguage() : $GLOBALS['wgLang'];
117117 }
118118
119119 /**
@@ -213,14 +213,14 @@
214214 $value = htmlspecialchars( wfMsg( 'contest-contestant-' . ( $value === '1' ? 'yes' : 'no' ) ) );
215215 break;
216216 case 'contestant_comments':
217 - $value = htmlspecialchars( $this->getLang()->formatNum( $value ) );
 217+ $value = htmlspecialchars( $this->getLanguage()->formatNum( $value ) );
218218 break;
219219 case 'contestant_rating':
220220 $value = '<div style="white-space:nowrap;">' . htmlspecialchars( wfMsgExt(
221221 'contest-contestant-rating',
222222 'parsemag',
223 - $this->getLang()->formatNum( $value / 100 ),
224 - $this->getLang()->formatNum( $this->mCurrentRow->contestant_rating_count )
 223+ $this->getLanguage()->formatNum( $value / 100 ),
 224+ $this->getLanguage()->formatNum( $this->mCurrentRow->contestant_rating_count )
225225 ) ) . '</div>';
226226 break;
227227 case 'contestant_submission':

Status & tagging log