Index: trunk/phase3/maintenance/mergeMessageFileList.php |
— | — | @@ -40,11 +40,25 @@ |
41 | 41 | include_once( $fileName ); |
42 | 42 | } |
43 | 43 | fwrite( STDERR, "\n" ); |
44 | | -$s = '$wgExtensionMessagesFiles = ' . var_export( $wgExtensionMessagesFiles, true ) . ";\n\n" . |
| 44 | +$s = |
| 45 | + "<" . "?php\n" . |
| 46 | + "## This file is generated by mergeMessageFileList.php. Do not edit it directly.\n\n" . |
| 47 | + '$wgExtensionMessagesFiles = ' . var_export( $wgExtensionMessagesFiles, true ) . ";\n\n" . |
45 | 48 | '$wgExtensionAliasesFiles = ' . var_export( $wgExtensionAliasesFiles, true ) . ";\n"; |
46 | 49 | |
47 | | -$s = preg_replace( "/'" . preg_quote( $IP, '/' ) . "([^']*)'/", |
48 | | - '"$IP/\1"', $s ); |
| 50 | +$dirs = array( |
| 51 | + $IP, |
| 52 | + dirname( dirname( __FILE__ ) ), |
| 53 | + realpath( $IP ) |
| 54 | +); |
| 55 | + |
| 56 | +foreach ( $dirs as $dir ) { |
| 57 | + $s = preg_replace( |
| 58 | + "/'" . preg_quote( $dir, '/' ) . "([^']*)'/", |
| 59 | + '"$IP\1"', |
| 60 | + $s ); |
| 61 | +} |
| 62 | + |
49 | 63 | if ( isset( $mmfl['output'] ) ) { |
50 | 64 | file_put_contents( $mmfl['output'], $s ); |
51 | 65 | } else { |