Made wfShellMaintenanceCmd() not totally broken due to excess shell escaping.
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 13 Mar 2012 00:05:23 +0000 (00:05 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 13 Mar 2012 00:05:23 +0000 (00:05 +0000)
includes/GlobalFunctions.php

index 2a81c9a..2aebd61 100644 (file)
@@ -2929,8 +2929,8 @@ function wfShellMaintenanceCmd( $script, array $parameters = array(), array $opt
                $cmd[] = $options['wrapper'];
        }
        $cmd[] = $script;
-       // Escape each parameter for shell
-       return implode( " ", array_map( 'wfEscapeShellArg', array_merge( $cmd, $parameters ) ) );
+       // Build up the full command, shell escaping each parameter
+       return implode( ' ', array_merge( $cmd, array_map( 'wfEscapeShellArg', $parameters ) ) );
 }
 
 /**