From dfbecb7b82baf481b3693ffae0b8a67b045ea179 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Sat, 22 Aug 2009 19:42:14 +0000 Subject: [PATCH] * change trim() for $postFile to ltrim(). Want the trailing newline * update comments --- js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php b/js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php index 2e19b813fa..6760f54684 100644 --- a/js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php +++ b/js2/mwEmbed/php/maintenance/mergeJavascriptMsg.php @@ -27,7 +27,7 @@ $mergeToPhp = false; $mergeToJS = true; if ( $mergeToPhp && $mergeToJS ) -die( 'please only set either $mergeToPhp or $mergeToJS' ); +die( 'Please only set either $mergeToPhp or $mergeToJS' ); if ( $mergeToPhp ) print "Will merge *Javascript to PHP* in 3 seconds "; @@ -47,7 +47,7 @@ $rawLangFile = file_get_contents( $mwLangFilePath ); $startInx = strpos( $rawLangFile, $mwSTART_MSG_KEY ) + strlen( $mwSTART_MSG_KEY ); $endInx = strpos( $rawLangFile, $mwEND_MSG_KEY ) + 1; if ( $startInx === false || $endInx === false ) { - print "Could not find $mwSTART_MSG_KEY or $mwEND_MSG_KEY in mwEmbed.i18n.php \n"; + print "Could not find $mwSTART_MSG_KEY or $mwEND_MSG_KEY in mwEmbed.i18n.php\n"; exit(); } @@ -77,7 +77,7 @@ foreach ( $objects as $fname => $object ) { } // rebuild and output to single php file if mergeToPHP is on if ( $mergeToPhp ) { - if ( file_put_contents( $mwLangFilePath, trim( $preFile ) . "\n\t" . trim( $msgSet ) . "\n" . trim( $postFile ) ) ) { + if ( file_put_contents( $mwLangFilePath, trim( $preFile ) . "\n\t" . trim( $msgSet ) . "\n" . ltrim( $postFile ) ) ) { print "updated $mwLangFilePath file\n"; exit(); } -- 2.20.1