r54964 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54963‎ | r54964 | r54965 >
Date:19:35, 13 August 2009
Author:brion
Status:deferred
Tags:
Comment:
fix my dumb-dumb mistakes (used wrong path; left in a var_dump)
Modified paths:
  • /trunk/extensions/LocalisationUpdate/LocalisationUpdate.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LocalisationUpdate/LocalisationUpdate.class.php
@@ -27,7 +27,6 @@
2828
2929 // Update all Extension messages
3030 foreach ( $wgExtensionMessagesFiles as $extension => $locFile ) {
31 - var_dump( $locFile );
3231 $result += self::updateExtensionMessages( $locFile, $extension, $verbose );
3332 }
3433
@@ -41,14 +40,20 @@
4241 public static function updateExtensionMessages( $file, $extension, $verbose ) {
4342 global $IP, $wgLocalisationUpdateSVNURL;
4443
 44+ $relfile = wfRelativePath( $file, "$IP/extensions" );
 45+ if( substr( $relfile, 0, 2 ) == ".." ) {
 46+ self::myLog( "Skipping $file; not in $IP/extensions\n" );
 47+ return false;
 48+ }
 49+
4550 // Create a full path
46 - $localfile = $IP . "/" . $file; // note $file should start with "extensions/"
 51+ $localfile = "$IP/extensions/$relfile";
4752
4853 // Get the full SVN directory path
49 - $svndir = "$wgLocalisationUpdateSVNURL/$file";
 54+ $svnfile = "$wgLocalisationUpdateSVNURL/extensions/$relfile";
5055
5156 // Compare the 2 files
52 - $result = self::compareExtensionFiles( $extension, $svndir . "/" . basename( $file ), $file, $verbose, false, true );
 57+ $result = self::compareExtensionFiles( $extension, $svnfile, $file, $verbose, false, true );
5358 return $result;
5459 }
5560

Status & tagging log