http://www.mediawiki.org/wiki/Special:Code/MediaWiki/56777

Revision: 56777
Author:   avar
Date:     2009-09-22 17:41:06 +0000 (Tue, 22 Sep 2009)

Log Message:
-----------
Single quote the perl so it looks better for syckLoad

Modified Paths:
--------------
    trunk/extensions/Translate/utils/TranslateYaml.php

Modified: trunk/extensions/Translate/utils/TranslateYaml.php
===================================================================
--- trunk/extensions/Translate/utils/TranslateYaml.php  2009-09-22 17:32:32 UTC 
(rev 56776)
+++ trunk/extensions/Translate/utils/TranslateYaml.php  2009-09-22 17:41:06 UTC 
(rev 56777)
@@ -41,10 +41,12 @@
                file_put_contents( $tf, $data );
 
                $cmd = "perl -MYAML::Syck=LoadFile 
-MPHP::Serialization=serialize -wle '" .
-                      "my \$yaml = LoadFile(\"$tf\");" .
-                      "open my \$fh, q[>], q[$tf.serialized] or die qq[Can not 
open $tf.serialized];" .
-                      "print \$fh serialize(\$yaml);" .
-                      "close(\$fh);' 2>&1";
+                          'my $tf = q[' . $tf . '];' .
+                      'my $yaml = LoadFile($tf);' .
+                      'open my $fh, ">", "$tf.serialized" or die qq[Can not 
open "$tf.serialized"];' .
+                      'print $fh serialize($yaml);' .
+                      'close($fh);' .
+                          "' 2>&1";
                $out = wfShellExec( $cmd, &$ret );
                if ( $ret != 0 ) {
                        wfDebugDieBacktrace("The command '$cmd' died in 
execution with exit code '$ret': $out");



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to