From: Siebrand Mazeland Date: Sat, 22 Aug 2009 19:42:14 +0000 (+0000) Subject: * change trim() for $postFile to ltrim(). Want the trailing newline X-Git-Tag: 1.31.0-rc.0~40113 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=dfbecb7b82baf481b3693ffae0b8a67b045ea179;p=lhc%2Fweb%2Fwiklou.git * change trim() for $postFile to ltrim(). Want the trailing newline * update comments --- 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(); }