X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateImageSha1.php;h=a71abb61ec7a5b6abe98ad9da7013ebd8e96cfd8;hb=d85ef6f05656be61fccd6ec448bcf23a34b1e284;hp=84b65ee7ac9835f09be32065d326429997fdf0fa;hpb=6f680554ceb988f3895184167d5006d722a0afb3;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateImageSha1.php b/maintenance/populateImageSha1.php index 84b65ee7ac..a71abb61ec 100644 --- a/maintenance/populateImageSha1.php +++ b/maintenance/populateImageSha1.php @@ -21,6 +21,8 @@ * @ingroup Maintenance */ +use MediaWiki\Shell\Shell; + require_once __DIR__ . '/Maintenance.php'; /** @@ -107,9 +109,9 @@ class PopulateImageSha1 extends LoggedUpdateMaintenance { // in the pipe buffer. This can improve performance by up to a // factor of 2. global $wgDBuser, $wgDBserver, $wgDBpassword, $wgDBname; - $cmd = 'mysql -u' . wfEscapeShellArg( $wgDBuser ) . - ' -h' . wfEscapeShellArg( $wgDBserver ) . - ' -p' . wfEscapeShellArg( $wgDBpassword, $wgDBname ); + $cmd = 'mysql -u' . Shell::escape( $wgDBuser ) . + ' -h' . Shell::escape( $wgDBserver ) . + ' -p' . Shell::escape( $wgDBpassword, $wgDBname ); $this->output( "Using pipe method\n" ); $pipe = popen( $cmd, 'w' ); } @@ -178,5 +180,5 @@ class PopulateImageSha1 extends LoggedUpdateMaintenance { } } -$maintClass = "PopulateImageSha1"; +$maintClass = PopulateImageSha1::class; require_once RUN_MAINTENANCE_IF_MAIN;