r56777 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56776‎ | r56777 | r56778 >
Date:17:41, 22 September 2009
Author:avar
Status:deferred
Tags:
Comment:
Single quote the perl so it looks better for syckLoad
Modified paths:
  • /trunk/extensions/Translate/utils/TranslateYaml.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/TranslateYaml.php
@@ -41,10 +41,12 @@
4242 file_put_contents( $tf, $data );
4343
4444 $cmd = "perl -MYAML::Syck=LoadFile -MPHP::Serialization=serialize -wle '" .
45 - "my \$yaml = LoadFile(\"$tf\");" .
46 - "open my \$fh, q[>], q[$tf.serialized] or die qq[Can not open $tf.serialized];" .
47 - "print \$fh serialize(\$yaml);" .
48 - "close(\$fh);' 2>&1";
 45+ 'my $tf = q[' . $tf . '];' .
 46+ 'my $yaml = LoadFile($tf);' .
 47+ 'open my $fh, ">", "$tf.serialized" or die qq[Can not open "$tf.serialized"];' .
 48+ 'print $fh serialize($yaml);' .
 49+ 'close($fh);' .
 50+ "' 2>&1";
4951 $out = wfShellExec( $cmd, &$ret );
5052 if ( $ret != 0 ) {
5153 wfDebugDieBacktrace("The command '$cmd' died in execution with exit code '$ret': $out");

Status & tagging log