r82241 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82240‎ | r82241 | r82242 >
Date:13:28, 16 February 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r82198
Modified paths:
  • /trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php
@@ -200,7 +200,7 @@
201201 }
202202 }
203203
204 - function intToMonth( $int ) {
 204+ protected static function intToMonth( $int ) {
205205 $months = array(
206206 '1' => 'january',
207207 '2' => 'february',
@@ -216,7 +216,7 @@
217217 '12' => 'december',
218218 );
219219
220 - return wfMsg( array_key_exists( $int, $months ) ? $months[$int] : 'january' );
 220+ return wfMsgForContent( array_key_exists( $int, $months ) ? $months[$int] : 'january' );
221221 }
222222
223223 function formatDateStr( $object ) {
@@ -291,7 +291,7 @@
292292 }
293293 }
294294
295 - $cur_month = SRFCalendar::intToMonth( $cur_month_num );
 295+ $cur_month = self::intToMonth( $cur_month_num );
296296 $cur_year = date( 'Y', time() );
297297 if ( $wgRequest->getCheck( 'year' ) ) {
298298 $query_year = $wgRequest->getVal( 'year' );
@@ -360,7 +360,7 @@
361361
362362 END;
363363 for ( $i = 1; $i <= 12; $i++ ) {
364 - $month_name = SRFCalendar::intToMonth( $i );
 364+ $month_name = self::intToMonth( $i );
365365 $selected_str = ( $i == $cur_month_num ) ? "selected" : "";
366366 $text .= "<option value=\"$i\" $selected_str>$month_name</option>\n";
367367 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82198Some cleanupjeroendedauw22:03, 15 February 2011

Status & tagging log