r98278 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98277‎ | r98278 | r98279 >
Date:22:47, 27 September 2011
Author:tstarling
Status:ok
Tags:
Comment:
Revert r92572: Language::isValidBuiltInCode() only rejected the empty string since r95646, so the check is necessary in this backwards-compatible extension. Needs backport per bug 31203.
Modified paths:
  • /trunk/extensions/ParserFunctions/ParserFunctions_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ParserFunctions/ParserFunctions_body.php
@@ -505,7 +505,7 @@
506506 return '<strong class="error">' . wfMsgForContent( 'pfunc_time_too_long' ) . '</strong>';
507507 } else {
508508 if ( $ts < 100000000000000 ) { // Language can't deal with years after 9999
509 - if ( Language::isValidBuiltInCode( $language ) ) {
 509+ if ( $language !== '' && Language::isValidBuiltInCode( $language ) ) {
510510 // use whatever language is passed as a parameter
511511 $langObject = Language::factory( $language );
512512 $result = $langObject->sprintfDate( $format, $ts );

Follow-up revisions

RevisionCommit summaryAuthorDate
r98282MFT r98278: fix #time default languagetstarling22:51, 27 September 2011
r98766REL1_18 MFT r98110, r98208, r98278, r98301reedy14:18, 3 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92572follow up to r87308 - fix redundancykaldari20:31, 19 July 2011
r95646In Language::isValidBuiltInCode(), reject the empty string per Nikerabbit's r...tstarling04:01, 29 August 2011

Status & tagging log