X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fbackup.inc;h=ffc75c6bbf7b7b586f8eb16dc0b4c442eeb62683;hb=74426f3cf796b149f1ae445e41815bbe148640b2;hp=341a2992ff5ac02b25af58aba0530937b8271284;hpb=3cc7f15766b65b9b3cba865760e590e948b5ba2a;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/backup.inc b/maintenance/backup.inc index 341a2992ff..ffc75c6bbf 100644 --- a/maintenance/backup.inc +++ b/maintenance/backup.inc @@ -25,7 +25,6 @@ */ require_once __DIR__ . '/Maintenance.php'; -require_once __DIR__ . '/../includes/export/DumpFilter.php'; use Wikimedia\Rdbms\LoadBalancer; use Wikimedia\Rdbms\IDatabase; @@ -83,15 +82,15 @@ class BackupDumper extends Maintenance { $this->stderr = fopen( "php://stderr", "wt" ); // Built-in output and filter plugins - $this->registerOutput( 'file', 'DumpFileOutput' ); - $this->registerOutput( 'gzip', 'DumpGZipOutput' ); - $this->registerOutput( 'bzip2', 'DumpBZip2Output' ); - $this->registerOutput( 'dbzip2', 'DumpDBZip2Output' ); - $this->registerOutput( '7zip', 'Dump7ZipOutput' ); + $this->registerOutput( 'file', DumpFileOutput::class ); + $this->registerOutput( 'gzip', DumpGZipOutput::class ); + $this->registerOutput( 'bzip2', DumpBZip2Output::class ); + $this->registerOutput( 'dbzip2', DumpDBZip2Output::class ); + $this->registerOutput( '7zip', Dump7ZipOutput::class ); - $this->registerFilter( 'latest', 'DumpLatestFilter' ); - $this->registerFilter( 'notalk', 'DumpNotalkFilter' ); - $this->registerFilter( 'namespace', 'DumpNamespaceFilter' ); + $this->registerFilter( 'latest', DumpLatestFilter::class ); + $this->registerFilter( 'notalk', DumpNotalkFilter::class ); + $this->registerFilter( 'namespace', DumpNamespaceFilter::class ); // These three can be specified multiple times $this->addOption( 'plugin', 'Load a dump plugin class. Specify as [:].', @@ -420,20 +419,3 @@ class BackupDumper extends Maintenance { } } } - -class ExportProgressFilter extends DumpFilter { - function __construct( &$sink, &$progress ) { - parent::__construct( $sink ); - $this->progress = $progress; - } - - function writeClosePage( $string ) { - parent::writeClosePage( $string ); - $this->progress->reportPage(); - } - - function writeRevision( $rev, $string ) { - parent::writeRevision( $rev, $string ); - $this->progress->revCount(); - } -}