r81343 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81342‎ | r81343 | r81344 >
Date:23:00, 1 February 2011
Author:tstarling
Status:ok
Tags:
Comment:
MFT r81340: relax Language::isValidCode() restrictions
Modified paths:
  • /branches/REL1_17/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/phase3/languages/Language.php
@@ -192,7 +192,7 @@
193193 * not it exists.
194194 */
195195 public static function isValidCode( $code ) {
196 - return (bool)preg_match( '/^[a-z-]+$/', $code );
 196+ return strcspn( $code, "/\\\000" ) === strlen( $code );
197197 }
198198
199199 /**
Property changes on: branches/REL1_17/phase3/languages/Language.php
___________________________________________________________________
Added: svn:mergeinfo
200200 Merged /branches/REL1_17/phase3/languages/Language.php:r81340
201201 Merged /branches/sqlite/languages/Language.php:r58211-58321
202202 Merged /trunk/phase3/languages/Language.php:r79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,81340
203203 Merged /branches/new-installer/phase3/languages/Language.php:r43664-66004
204204 Merged /branches/REL1_15/phase3/languages/Language.php:r51646

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81340Relax Language::isValidCode() to avoid breaking uselang hackststarling22:54, 1 February 2011

Status & tagging log