https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114162
Revision: 114162
Author: aaron
Date: 2012-03-19 18:28:47 +0000 (Mon, 19 Mar 2012)
Log Message:
-----------
Reverted r113688, r113691 per CR and filed #61440 upstream.
Modified Paths:
--------------
trunk/phase3/includes/GlobalFunctions.php
trunk/phase3/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
Modified: trunk/phase3/includes/GlobalFunctions.php
===================================================================
--- trunk/phase3/includes/GlobalFunctions.php 2012-03-19 18:17:29 UTC (rev
114161)
+++ trunk/phase3/includes/GlobalFunctions.php 2012-03-19 18:28:47 UTC (rev
114162)
@@ -2929,8 +2929,8 @@
$cmd[] = $options['wrapper'];
}
$cmd[] = $script;
- // Build up the full command, shell escaping each parameter
- return implode( ' ', array_merge( $cmd, array_map( 'wfEscapeShellArg',
$parameters ) ) );
+ // Escape each parameter for shell
+ return implode( " ", array_map( 'wfEscapeShellArg', array_merge( $cmd,
$parameters ) ) );
}
/**
Modified: trunk/phase3/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
===================================================================
--- trunk/phase3/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
2012-03-19 18:17:29 UTC (rev 114161)
+++ trunk/phase3/tests/phpunit/includes/GlobalFunctions/GlobalTest.php
2012-03-19 18:28:47 UTC (rev 114162)
@@ -600,16 +600,16 @@
global $wgPhpCli;
return array(
array( 'eval.php', array( '--help', '--test' ), array(),
- "$wgPhpCli eval.php '--help' '--test'",
+ "'$wgPhpCli' 'eval.php' '--help' '--test'",
"Called eval.php --help --test" ),
array( 'eval.php', array( '--help', '--test space' ),
array('php' => 'php5'),
- "php5 eval.php '--help' '--test space'",
+ "'php5' 'eval.php' '--help' '--test space'",
"Called eval.php --help --test with php option"
),
array( 'eval.php', array( '--help', '--test', 'X' ),
array('wrapper' => 'MWScript.php'),
- "$wgPhpCli MWScript.php eval.php '--help'
'--test' 'X'",
+ "'$wgPhpCli' 'MWScript.php' 'eval.php' '--help'
'--test' 'X'",
"Called eval.php --help --test with wrapper
option" ),
array( 'eval.php', array( '--help', '--test', 'y' ),
array('php' => 'php5', 'wrapper' => 'MWScript.php'),
- "php5 MWScript.php eval.php '--help' '--test'
'y'",
+ "'php5' 'MWScript.php' 'eval.php' '--help'
'--test' 'y'",
"Called eval.php --help --test with wrapper and
php option" ),
);
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs