* @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 );
}
/**
- * @param string $newname
+ * @inheritDoc
*/
function closeRenameAndReopen( $newname ) {
$this->closeAndRename( $newname, true );
}
/**
- * @param string $newname
- * @param bool $open
+ * @inheritDoc
*/
function closeAndRename( $newname, $open = false ) {
$newname = $this->checkRenameArgCount( $newname );
$this->renameOrException( $newname );
if ( $open ) {
$command = $this->command;
- $command .= " > " . wfEscapeShellArg( $this->filename );
+ $command .= " > " . Shell::escape( $this->filename );
$this->startCommand( $command );
}
}