X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22config_fonctions%22%2C%20%22image_process=%24process%22%29%20.%20%22?a=blobdiff_plain;f=maintenance%2F7zip.inc;h=6a763f2e1b6eb2be543df9b04901fa0729c7f953;hb=761e704d6e59b611241e6c83ea37dca3ab90e9e0;hp=751a131168cc82d0e0acc53ec5334ec139ef1acb;hpb=280cb03b4d87e864a723686daf5d1699b3566ec1;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/7zip.inc b/maintenance/7zip.inc index 751a131168..6a763f2e1b 100644 --- a/maintenance/7zip.inc +++ b/maintenance/7zip.inc @@ -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 );