Index: trunk/extensions/LocalisationUpdate/LocalisationUpdate.class.php |
— | — | @@ -27,7 +27,6 @@ |
28 | 28 | |
29 | 29 | // Update all Extension messages |
30 | 30 | foreach ( $wgExtensionMessagesFiles as $extension => $locFile ) { |
31 | | - var_dump( $locFile ); |
32 | 31 | $result += self::updateExtensionMessages( $locFile, $extension, $verbose ); |
33 | 32 | } |
34 | 33 | |
— | — | @@ -41,14 +40,20 @@ |
42 | 41 | public static function updateExtensionMessages( $file, $extension, $verbose ) { |
43 | 42 | global $IP, $wgLocalisationUpdateSVNURL; |
44 | 43 | |
| 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 | + |
45 | 50 | // Create a full path |
46 | | - $localfile = $IP . "/" . $file; // note $file should start with "extensions/" |
| 51 | + $localfile = "$IP/extensions/$relfile"; |
47 | 52 | |
48 | 53 | // Get the full SVN directory path |
49 | | - $svndir = "$wgLocalisationUpdateSVNURL/$file"; |
| 54 | + $svnfile = "$wgLocalisationUpdateSVNURL/extensions/$relfile"; |
50 | 55 | |
51 | 56 | // 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 ); |
53 | 58 | return $result; |
54 | 59 | } |
55 | 60 | |