X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdumpTextPass.php;h=7566fe0ce82ffa32d3453ef2ad88eeb316ff3104;hb=b1ebe0ba8a8998f9cfc27e3d54390d1253b2b55d;hp=f515df70f44b1b8ba9bcb16905fce6570e66baa2;hpb=09e7569e9d5d277bbc44d3a45a0f573ae66808a4;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/dumpTextPass.php b/maintenance/dumpTextPass.php index f515df70f4..7566fe0ce8 100644 --- a/maintenance/dumpTextPass.php +++ b/maintenance/dumpTextPass.php @@ -29,6 +29,7 @@ require_once __DIR__ . '/7zip.inc'; require_once __DIR__ . '/../includes/export/WikiExporter.php'; use MediaWiki\MediaWikiServices; +use MediaWiki\Shell\Shell; use MediaWiki\Storage\BlobAccessException; use MediaWiki\Storage\SqlBlobStore; use Wikimedia\Rdbms\IMaintainableDatabase; @@ -756,7 +757,7 @@ TEXT if ( file_exists( "$IP/../multiversion/MWScript.php" ) ) { $cmd = implode( " ", - array_map( 'wfEscapeShellArg', + array_map( [ Shell::class, 'escape' ], [ $this->php, "$IP/../multiversion/MWScript.php", @@ -764,7 +765,7 @@ TEXT '--wiki', wfWikiID() ] ) ); } else { $cmd = implode( " ", - array_map( 'wfEscapeShellArg', + array_map( [ Shell::class, 'escape' ], [ $this->php, "$IP/maintenance/fetchText.php", @@ -839,6 +840,7 @@ TEXT if ( $newAddress === false ) { return false; } + $newAddress = trim( $newAddress ); if ( strpos( $newAddress, ':' ) === false ) { $newAddress = SqlBlobStore::makeAddressFromTextId( intval( $newAddress ) ); }