r56582 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56581‎ | r56582 | r56583 >
Date:05:23, 18 September 2009
Author:tstarling
Status:ok
Tags:
Comment:
Assorted tweaks.
Modified paths:
  • /trunk/phase3/maintenance/mergeMessageFileList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/mergeMessageFileList.php
@@ -40,11 +40,25 @@
4141 include_once( $fileName );
4242 }
4343 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" .
4548 '$wgExtensionAliasesFiles = ' . var_export( $wgExtensionAliasesFiles, true ) . ";\n";
4649
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+
4963 if ( isset( $mmfl['output'] ) ) {
5064 file_put_contents( $mmfl['output'], $s );
5165 } else {

Status & tagging log