diff options
Diffstat (limited to 'maintenance/storage')
-rw-r--r-- | maintenance/storage/checkStorage.php | 6 | ||||
-rw-r--r-- | maintenance/storage/compressOld.php | 16 | ||||
-rw-r--r-- | maintenance/storage/moveToExternal.php | 1 | ||||
-rw-r--r-- | maintenance/storage/recompressTracked.php | 6 | ||||
-rw-r--r-- | maintenance/storage/resolveStubs.php | 2 |
5 files changed, 22 insertions, 9 deletions
diff --git a/maintenance/storage/checkStorage.php b/maintenance/storage/checkStorage.php index 0f996625..c0f6c7b6 100644 --- a/maintenance/storage/checkStorage.php +++ b/maintenance/storage/checkStorage.php @@ -39,6 +39,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { /** * Maintenance script to do various checks on external storage. * + * @fixme this should extend the base Maintenance class * @ingroup Maintenance ExternalStorage */ class CheckStorage { @@ -466,7 +467,10 @@ class CheckStorage { $dbw->ping(); $source = new ImportStreamSource( $file ); - $importer = new WikiImporter( $source ); + $importer = new WikiImporter( + $source, + ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) + ); $importer->setRevisionCallback( array( &$this, 'importRevision' ) ); $importer->doImport(); } diff --git a/maintenance/storage/compressOld.php b/maintenance/storage/compressOld.php index cfffbbca..3cb4a2ba 100644 --- a/maintenance/storage/compressOld.php +++ b/maintenance/storage/compressOld.php @@ -50,9 +50,15 @@ require_once __DIR__ . '/../Maintenance.php'; */ class CompressOld extends Maintenance { /** - * @todo document + * Option to load each revision individually. + * */ const LS_INDIVIDUAL = 0; + + /** + * Option to load revisions in chunks. + * + */ const LS_CHUNKED = 1; public function __construct() { @@ -137,7 +143,8 @@ class CompressOld extends Maintenance { } /** - * @todo document + * Fetch the text row-by-row to 'compressPage' function for compression. + * * @param int $start * @param string $extdb */ @@ -172,7 +179,8 @@ class CompressOld extends Maintenance { } /** - * @todo document + * Compress the text in gzip format. + * * @param stdClass $row * @param string $extdb * @return bool @@ -214,6 +222,8 @@ class CompressOld extends Maintenance { } /** + * Compress the text in chunks after concatenating the revisions. + * * @param int $startId * @param int $maxChunkSize * @param string $beginDate diff --git a/maintenance/storage/moveToExternal.php b/maintenance/storage/moveToExternal.php index 348fb773..ab59cb8d 100644 --- a/maintenance/storage/moveToExternal.php +++ b/maintenance/storage/moveToExternal.php @@ -25,7 +25,6 @@ define( 'REPORTING_INTERVAL', 1 ); if ( !defined( 'MEDIAWIKI' ) ) { require_once __DIR__ . '/../commandLine.inc'; - require_once __DIR__ . '/../../includes/externalstore/ExternalStoreDB.php'; require_once 'resolveStubs.php'; $fname = 'moveToExternal'; diff --git a/maintenance/storage/recompressTracked.php b/maintenance/storage/recompressTracked.php index 910f56bd..3562df62 100644 --- a/maintenance/storage/recompressTracked.php +++ b/maintenance/storage/recompressTracked.php @@ -22,6 +22,8 @@ * @ingroup Maintenance ExternalStorage */ +use MediaWiki\Logger\LegacyLogger; + $optionsWithArgs = RecompressTracked::getOptionsWithArgs(); require __DIR__ . '/../commandLine.inc'; @@ -141,7 +143,7 @@ class RecompressTracked { $header .= "({$this->slaveId})"; } $header .= ' ' . wfWikiID(); - wfErrorLog( sprintf( "%-50s %s\n", $header, $msg ), $file ); + LegacyLogger::emit( sprintf( "%-50s %s\n", $header, $msg ), $file ); } /** @@ -471,7 +473,7 @@ class RecompressTracked { * @param int $pageId */ function doPage( $pageId ) { - $title = Title::newFromId( $pageId ); + $title = Title::newFromID( $pageId ); if ( $title ) { $titleText = $title->getPrefixedText(); } else { diff --git a/maintenance/storage/resolveStubs.php b/maintenance/storage/resolveStubs.php index 290f1649..36741cb2 100644 --- a/maintenance/storage/resolveStubs.php +++ b/maintenance/storage/resolveStubs.php @@ -22,8 +22,6 @@ * @ingroup Maintenance ExternalStorage */ -define( 'REPORTING_INTERVAL', 100 ); - if ( !defined( 'MEDIAWIKI' ) ) { $optionsWithArgs = array( 'm' ); |