X-Git-Url: http://git.cyclocoop.org/%28?a=blobdiff_plain;f=includes%2Fexport%2FDumpPipeOutput.php;h=0521c5a13152884e2b4728f4d5f3ed99de7d49d8;hb=260a734173bcc6b414aafb92de559505fe47bafc;hp=ce899ed396ac3effd71755b4a2ae7293061f0524;hpb=f43fa6f4f0e2cb60b8543daad661b48a3e0653a9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/export/DumpPipeOutput.php b/includes/export/DumpPipeOutput.php index ce899ed396..0521c5a131 100644 --- a/includes/export/DumpPipeOutput.php +++ b/includes/export/DumpPipeOutput.php @@ -25,20 +25,23 @@ * @file */ +use MediaWiki\Shell\Shell; + /** * @ingroup Dump */ class DumpPipeOutput extends DumpFileOutput { protected $command, $filename; + /** @var resource|bool */ protected $procOpenResource = false; /** * @param string $command - * @param string $file + * @param string|null $file */ function __construct( $command, $file = null ) { if ( !is_null( $file ) ) { - $command .= " > " . wfEscapeShellArg( $file ); + $command .= " > " . Shell::escape( $file ); } $this->startCommand( $command ); @@ -94,7 +97,7 @@ class DumpPipeOutput extends DumpFileOutput { $this->renameOrException( $newname ); if ( $open ) { $command = $this->command; - $command .= " > " . wfEscapeShellArg( $this->filename ); + $command .= " > " . Shell::escape( $this->filename ); $this->startCommand( $command ); } }