r24691 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24690‎ | r24691 | r24692 >
Date:23:08, 8 August 2007
Author:brion
Status:old
Tags:
Comment:
* glob() is horribly unreliable and doesn't work on some systems, including
free.fr shared hosting. No longer using it in Language::getLanguageNames()
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/Language.php
@@ -338,9 +338,9 @@
339339 }
340340
341341 global $IP;
342 - $messageFiles = glob( "$IP/languages/messages/Messages*.php" );
343342 $names = array();
344 - foreach ( $messageFiles as $file ) {
 343+ $dir = opendir( "$IP/languages/messages" );
 344+ while( false !== ( $file = readdir( $dir ) ) ) {
345345 $m = array();
346346 if( preg_match( '/Messages([A-Z][a-z_]+)\.php$/', $file, $m ) ) {
347347 $code = str_replace( '_', '-', strtolower( $m[1] ) );
@@ -349,6 +349,7 @@
350350 }
351351 }
352352 }
 353+ closedir( $dir );
353354 return $names;
354355 }
355356
Index: trunk/phase3/RELEASE-NOTES
@@ -369,6 +369,8 @@
370370 * Fix comments in contributions and log pages for RTL languages
371371 * Make installer include_path-independent, so it should work on hosts which
372372 disable user setting of PHP include_path setting
 373+* glob() is horribly unreliable and doesn't work on some systems, including
 374+ free.fr shared hosting. No longer using it in Language::getLanguageNames()
373375
374376
375377 == API changes since 1.10 ==

Follow-up revisions

RevisionCommit summaryAuthorDate
r24705Merged revisions 24632-24693 via svnmerge from...david19:15, 9 August 2007

Status & tagging log