* @file
*/
+use MediaWiki\Shell\Shell;
+
/**
* @ingroup Dump
*/
class DumpPipeOutput extends DumpFileOutput {
protected $command, $filename;
+ /** @var resource|bool */
protected $procOpenResource = false;
/**
*/
function __construct( $command, $file = null ) {
if ( !is_null( $file ) ) {
- $command .= " > " . wfEscapeShellArg( $file );
+ $command .= " > " . Shell::escape( $file );
}
$this->startCommand( $command );
$this->renameOrException( $newname );
if ( $open ) {
$command = $this->command;
- $command .= " > " . wfEscapeShellArg( $this->filename );
+ $command .= " > " . Shell::escape( $this->filename );
$this->startCommand( $command );
}
}