r104326 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104325‎ | r104326 | r104327 >
Date:23:55, 26 November 2011
Author:jeroendedauw
Status:reverted
Tags:
Comment:
use getLanguage instead of getLang
Modified paths:
  • /trunk/extensions/Reviews/includes/ReviewPager.php (modified) (history)
  • /trunk/extensions/Reviews/specials/SpecialReviews.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Reviews/specials/SpecialReviews.php
@@ -160,8 +160,8 @@
161161
162162 $stats['title'] = htmlspecialchars( $review->getField( 'title' ) );
163163 $stats['page'] = Linker::link( $review->getTitle() );
164 - $stats['posted'] = htmlspecialchars( $this->getLang()->timeanddate( $review->getField( 'post_time' ), true ) );
165 - $stats['edited'] = htmlspecialchars( $this->getLang()->timeanddate( $review->getField( 'edit_time' ), true ) );
 164+ $stats['posted'] = htmlspecialchars( $this->getLanguage()->timeanddate( $review->getField( 'post_time' ), true ) );
 165+ $stats['edited'] = htmlspecialchars( $this->getLanguage()->timeanddate( $review->getField( 'edit_time' ), true ) );
166166
167167 $user = $review->getUser();
168168 $stats['user'] = Linker::userLink( $user->getId(), $user->getName() ) .
@@ -170,7 +170,7 @@
171171 $stats['state'] = $review->getStateControl( $this->getUser() );
172172
173173 // TODO: might want to display stars here as well.
174 - $stats['rating'] = htmlspecialchars( $this->getLang()->formatNum( $review->getField( 'rating' ) ) );
 174+ $stats['rating'] = htmlspecialchars( $this->getLanguage()->formatNum( $review->getField( 'rating' ) ) );
175175
176176 return $stats;
177177 }
Index: trunk/extensions/Reviews/includes/ReviewPager.php
@@ -68,8 +68,8 @@
6969 *
7070 * @return Language
7171 */
72 - public function getLang() {
73 - return version_compare( $GLOBALS['wgVersion'], '1.18', '>' ) ? parent::getLang() : $GLOBALS['wgLang'];
 72+ public function getLanguage() {
 73+ return version_compare( $GLOBALS['wgVersion'], '1.18', '>' ) ? parent::getLanguage() : $GLOBALS['wgLang'];
7474 }
7575
7676 /**
@@ -81,7 +81,7 @@
8282 * @return User
8383 */
8484 public function getUser() {
85 - return version_compare( $GLOBALS['wgUser'], '1.18', '>' ) ? parent::getLang() : $GLOBALS['wgUser'];
 85+ return version_compare( $GLOBALS['wgUser'], '1.18', '>' ) ? parent::getUser() : $GLOBALS['wgUser'];
8686 }
8787
8888 /**
@@ -135,7 +135,7 @@
136136 public function formatValue( $name, $value ) {
137137 switch ( $name ) {
138138 case 'review_post_time':
139 - $value = $this->getLang()->timeanddate( $value, true );
 139+ $value = $this->getLanguage()->timeanddate( $value, true );
140140 break;
141141 case 'review_state':
142142 $value = $this->currentReview->getStateControl( $this->getUser() );
@@ -159,7 +159,7 @@
160160 break;
161161 case 'review_rating':
162162 // TODO: might want to display stars here as well.
163 - $value = $this->getLang()->formatNum( $value );
 163+ $value = $this->getLanguage()->formatNum( $value );
164164 break;
165165 }
166166

Status & tagging log