maintenance: Script to rename titles for Unicode uppercasing changes
[lhc/web/wiklou.git] / maintenance / 7zip.inc
index 751a131..6a763f2 100644 (file)
@@ -24,6 +24,8 @@
  * @ingroup Maintenance
  */
 
+use MediaWiki\Shell\Shell;
+
 /**
  * Stream wrapper around 7za filter program.
  * Required since we can't pass an open file resource to XMLReader->open()
@@ -48,7 +50,7 @@ class SevenZipStream {
                } else {
                        return false;
                }
-               $arg = wfEscapeShellArg( $this->stripPath( $path ) );
+               $arg = Shell::escape( $this->stripPath( $path ) );
                $command = "7za $options $arg";
                if ( !wfIsWindows() ) {
                        // Suppress the stupid messages on stderr
@@ -93,4 +95,4 @@ class SevenZipStream {
        }
 }
 
-stream_wrapper_register( 'mediawiki.compress.7z', 'SevenZipStream' );
+stream_wrapper_register( 'mediawiki.compress.7z', SevenZipStream::class );