From 59db24e90bc6027cb8bf2756eb8cb52230d24966 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Fri, 29 Jan 2016 18:48:47 -0800 Subject: [PATCH] Use addDescription() instead of accessing mDescription directly Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103 --- maintenance/Maintenance.php | 2 +- maintenance/attachLatest.php | 2 +- maintenance/benchmarks/bench_HTTP_HTTPS.php | 2 +- maintenance/benchmarks/bench_Wikimedia_base_convert.php | 2 +- maintenance/benchmarks/bench_delete_truncate.php | 2 +- maintenance/benchmarks/bench_if_switch.php | 2 +- maintenance/benchmarks/bench_strtr_str_replace.php | 2 +- maintenance/benchmarks/bench_utf8_title_check.php | 7 +++---- maintenance/benchmarks/bench_wfIsWindows.php | 2 +- maintenance/benchmarks/benchmarkHooks.php | 2 +- maintenance/benchmarks/benchmarkPurge.php | 2 +- maintenance/changePassword.php | 2 +- maintenance/checkBadRedirects.php | 2 +- maintenance/checkComposerLockUpToDate.php | 4 ++-- maintenance/checkImages.php | 2 +- maintenance/checkLess.php | 4 ++-- maintenance/checkSyntax.php | 2 +- maintenance/checkUsernames.php | 2 +- maintenance/cleanupAncientTables.php | 2 +- maintenance/cleanupBlocks.php | 2 +- maintenance/cleanupCaps.php | 2 +- maintenance/cleanupImages.php | 2 +- maintenance/cleanupRemovedModules.php | 3 ++- maintenance/cleanupSpam.php | 2 +- maintenance/cleanupTitles.php | 2 +- maintenance/cleanupUploadStash.php | 2 +- maintenance/cleanupWatchlist.php | 2 +- maintenance/clearInterwikiCache.php | 2 +- maintenance/compareParserCache.php | 2 +- maintenance/compareParsers.php | 2 +- maintenance/convertExtensionToRegistration.php | 2 +- maintenance/convertLinks.php | 6 +++--- maintenance/convertUserOptions.php | 2 +- maintenance/copyFileBackend.php | 2 +- maintenance/copyJobQueue.php | 2 +- maintenance/createAndPromote.php | 2 +- maintenance/createCommonPasswordCdb.php | 2 +- maintenance/deleteArchivedFiles.php | 2 +- maintenance/deleteArchivedRevisions.php | 4 ++-- maintenance/deleteBatch.php | 2 +- maintenance/deleteDefaultMessages.php | 4 ++-- maintenance/deleteEqualMessages.php | 4 ++-- maintenance/deleteOldRevisions.php | 2 +- maintenance/deleteOrphanedRevisions.php | 3 ++- maintenance/deleteRevision.php | 2 +- maintenance/deleteSelfExternals.php | 2 +- maintenance/dumpBackup.php | 5 +++-- maintenance/dumpIterator.php | 4 ++-- maintenance/dumpLinks.php | 2 +- maintenance/dumpTextPass.php | 5 +++-- maintenance/dumpUploads.php | 4 ++-- maintenance/edit.php | 2 +- maintenance/eraseArchivedFile.php | 2 +- maintenance/exportSites.php | 2 +- maintenance/fetchText.php | 5 +++-- maintenance/fileOpPerfTest.php | 2 +- maintenance/findDeprecated.php | 2 +- maintenance/findHooks.php | 2 +- maintenance/findMissingFiles.php | 2 +- maintenance/findOrphanedFiles.php | 2 +- maintenance/fixDefaultJsonContentPages.php | 4 ++-- maintenance/fixDoubleRedirects.php | 2 +- maintenance/fixExtLinksProtocolRelative.php | 4 ++-- maintenance/fixTimestamps.php | 2 +- maintenance/fixUserRegistration.php | 2 +- maintenance/generateJsonI18n.php | 2 +- maintenance/generateSitemap.php | 2 +- maintenance/getConfiguration.php | 2 +- maintenance/getLagTimes.php | 2 +- maintenance/getSlaveServer.php | 2 +- maintenance/getText.php | 2 +- maintenance/importDump.php | 6 ++++-- maintenance/importSiteScripts.php | 2 +- maintenance/importSites.php | 2 +- maintenance/importTextFiles.php | 2 +- maintenance/initEditCount.php | 2 +- maintenance/initSiteStats.php | 2 +- maintenance/jsparse.php | 2 +- maintenance/lag.php | 2 +- maintenance/language/alltrans.php | 2 +- maintenance/language/date-formats.php | 2 +- maintenance/language/digit2html.php | 2 +- maintenance/language/dumpMessages.php | 2 +- maintenance/language/generateNormalizerDataAr.php | 2 +- maintenance/language/generateNormalizerDataMl.php | 2 +- maintenance/language/generateUtf8Case.php | 4 ++-- maintenance/language/langmemusage.php | 4 ++-- maintenance/language/listVariants.php | 2 +- maintenance/makeTestEdits.php | 2 +- maintenance/mctest.php | 4 ++-- maintenance/mergeMessageFileList.php | 5 +++-- maintenance/migrateFileRepoLayout.php | 2 +- maintenance/migrateUserGroup.php | 2 +- maintenance/minify.php | 5 +++-- maintenance/moveBatch.php | 2 +- maintenance/mwdocgen.php | 2 +- maintenance/namespaceDupes.php | 2 +- maintenance/nukeNS.php | 2 +- maintenance/nukePage.php | 2 +- maintenance/oracle/alterSharedConstraints.php | 2 +- maintenance/orphans.php | 5 +++-- maintenance/pageExists.php | 2 +- maintenance/parse.php | 2 +- maintenance/patchSql.php | 2 +- maintenance/populateBacklinkNamespace.php | 2 +- maintenance/populateCategory.php | 8 +++++--- maintenance/populateContentModel.php | 2 +- maintenance/populateFilearchiveSha1.php | 2 +- maintenance/populateImageSha1.php | 2 +- maintenance/populateLogSearch.php | 2 +- maintenance/populateLogUsertext.php | 2 +- maintenance/populateParentId.php | 2 +- maintenance/populateRecentChangesSource.php | 4 ++-- maintenance/populateRevisionLength.php | 2 +- maintenance/populateRevisionSha1.php | 2 +- maintenance/protect.php | 2 +- maintenance/pruneFileCache.php | 2 +- maintenance/purgeChangedFiles.php | 2 +- maintenance/purgeChangedPages.php | 2 +- maintenance/purgeList.php | 2 +- maintenance/purgeOldText.php | 2 +- maintenance/reassignEdits.php | 2 +- maintenance/rebuildFileCache.php | 2 +- maintenance/rebuildImages.php | 2 +- maintenance/rebuildLocalisationCache.php | 2 +- maintenance/rebuildSitesCache.php | 2 +- maintenance/rebuildall.php | 2 +- maintenance/rebuildmessages.php | 2 +- maintenance/rebuildrecentchanges.php | 2 +- maintenance/rebuildtextindex.php | 2 +- maintenance/refreshFileHeaders.php | 2 +- maintenance/refreshImageMetadata.php | 2 +- maintenance/refreshLinks.php | 2 +- maintenance/renderDump.php | 3 ++- maintenance/resetUserTokens.php | 5 +++-- maintenance/rollbackEdits.php | 4 ++-- maintenance/runBatchedQuery.php | 4 ++-- maintenance/runJobs.php | 2 +- maintenance/showJobs.php | 2 +- maintenance/showSiteStats.php | 2 +- maintenance/sql.php | 4 ++-- maintenance/sqlite.php | 2 +- maintenance/storage/compressOld.php | 2 +- maintenance/storage/fixBug20757.php | 2 +- maintenance/storage/orphanStats.php | 4 ++-- maintenance/syncFileBackend.php | 2 +- maintenance/undelete.php | 2 +- maintenance/update.php | 2 +- maintenance/updateArticleCount.php | 2 +- maintenance/updateCollation.php | 5 +++-- maintenance/updateDoubleWidthSearch.php | 2 +- maintenance/updateRestrictions.php | 2 +- maintenance/updateSearchIndex.php | 2 +- maintenance/wrapOldPasswords.php | 2 +- 154 files changed, 201 insertions(+), 187 deletions(-) diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 291920b415..5a7f7691fb 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -84,7 +84,7 @@ abstract class Maintenance { protected $mQuiet = false; protected $mDbUser, $mDbPass; - // A description of the script, children should change this + // A description of the script, children should change this via addDescription() protected $mDescription = ''; // Have we already loaded our user input? diff --git a/maintenance/attachLatest.php b/maintenance/attachLatest.php index a2ea554c18..deab60b5a0 100644 --- a/maintenance/attachLatest.php +++ b/maintenance/attachLatest.php @@ -38,7 +38,7 @@ class AttachLatest extends Maintenance { $this->addOption( "fix", "Actually fix the entries, will dry run otherwise" ); $this->addOption( "regenerate-all", "Regenerate the page_latest field for all records in table page" ); - $this->mDescription = "Fix page_latest entries in the page table"; + $this->addDescription( 'Fix page_latest entries in the page table' ); } public function execute() { diff --git a/maintenance/benchmarks/bench_HTTP_HTTPS.php b/maintenance/benchmarks/bench_HTTP_HTTPS.php index 1569234865..40a877f8f0 100644 --- a/maintenance/benchmarks/bench_HTTP_HTTPS.php +++ b/maintenance/benchmarks/bench_HTTP_HTTPS.php @@ -34,7 +34,7 @@ require_once __DIR__ . '/Benchmarker.php'; class BenchHttpHttps extends Benchmarker { public function __construct() { parent::__construct(); - $this->mDescription = "Benchmark HTTP request vs HTTPS request."; + $this->addDescription( 'Benchmark HTTP request vs HTTPS request.' ); } public function execute() { diff --git a/maintenance/benchmarks/bench_Wikimedia_base_convert.php b/maintenance/benchmarks/bench_Wikimedia_base_convert.php index 810937a921..439947dad9 100644 --- a/maintenance/benchmarks/bench_Wikimedia_base_convert.php +++ b/maintenance/benchmarks/bench_Wikimedia_base_convert.php @@ -34,7 +34,7 @@ require_once __DIR__ . '/Benchmarker.php'; class BenchWikimediaBaseConvert extends Benchmarker { public function __construct() { parent::__construct(); - $this->mDescription = "Benchmark for Wikimedia\\base_convert."; + $this->addDescription( 'Benchmark for Wikimedia\base_convert.' ); $this->addOption( "inbase", "Input base", false, true ); $this->addOption( "outbase", "Output base", false, true ); $this->addOption( "length", "Size in digits to generate for input", false, true ); diff --git a/maintenance/benchmarks/bench_delete_truncate.php b/maintenance/benchmarks/bench_delete_truncate.php index 572c5487ca..9acb93a261 100644 --- a/maintenance/benchmarks/bench_delete_truncate.php +++ b/maintenance/benchmarks/bench_delete_truncate.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Benchmarker.php'; class BenchmarkDeleteTruncate extends Benchmarker { public function __construct() { parent::__construct(); - $this->mDescription = "Benchmarks SQL DELETE vs SQL TRUNCATE."; + $this->addDescription( 'Benchmarks SQL DELETE vs SQL TRUNCATE.' ); } public function execute() { diff --git a/maintenance/benchmarks/bench_if_switch.php b/maintenance/benchmarks/bench_if_switch.php index 698a0f0a17..8f7f61d8cf 100644 --- a/maintenance/benchmarks/bench_if_switch.php +++ b/maintenance/benchmarks/bench_if_switch.php @@ -34,7 +34,7 @@ require_once __DIR__ . '/Benchmarker.php'; class BenchIfSwitch extends Benchmarker { public function __construct() { parent::__construct(); - $this->mDescription = "Benchmark if elseif... versus switch case."; + $this->addDescription( 'Benchmark if elseif... versus switch case.' ); } public function execute() { diff --git a/maintenance/benchmarks/bench_strtr_str_replace.php b/maintenance/benchmarks/bench_strtr_str_replace.php index 44c8e03266..f34d27f076 100644 --- a/maintenance/benchmarks/bench_strtr_str_replace.php +++ b/maintenance/benchmarks/bench_strtr_str_replace.php @@ -41,7 +41,7 @@ function bfNormalizeTitleStrReplace( $str ) { class BenchStrtrStrReplace extends Benchmarker { public function __construct() { parent::__construct(); - $this->mDescription = "Benchmark for strtr() vs str_replace()."; + $this->addDescription( 'Benchmark for strtr() vs str_replace().' ); } public function execute() { diff --git a/maintenance/benchmarks/bench_utf8_title_check.php b/maintenance/benchmarks/bench_utf8_title_check.php index b742f66679..bd18adb228 100644 --- a/maintenance/benchmarks/bench_utf8_title_check.php +++ b/maintenance/benchmarks/bench_utf8_title_check.php @@ -64,11 +64,10 @@ class BenchUtf8TitleCheck extends Benchmarker { $this->canRun = function_exists( 'mb_check_encoding' ); if ( $this->canRun ) { - $this->mDescription = "Benchmark for using a regexp vs. mb_check_encoding " . - "to check for UTF-8 encoding."; - mb_internal_encoding( 'UTF-8' ); + $this->addDescription( "Benchmark for using a regexp vs. mb_check_encoding " . + "to check for UTF-8 encoding." ); } else { - $this->mDescription = "CANNOT RUN benchmark using mb_check_encoding: function not available."; + $this->addDescription( 'CANNOT RUN benchmark using mb_check_encoding: function not available.' ); } } diff --git a/maintenance/benchmarks/bench_wfIsWindows.php b/maintenance/benchmarks/bench_wfIsWindows.php index 8446694ba3..ea919eface 100644 --- a/maintenance/benchmarks/bench_wfIsWindows.php +++ b/maintenance/benchmarks/bench_wfIsWindows.php @@ -34,7 +34,7 @@ require_once __DIR__ . '/Benchmarker.php'; class BenchWfIsWindows extends Benchmarker { public function __construct() { parent::__construct(); - $this->mDescription = "Benchmark for wfIsWindows."; + $this->addDescription( 'Benchmark for wfIsWindows.' ); } public function execute() { diff --git a/maintenance/benchmarks/benchmarkHooks.php b/maintenance/benchmarks/benchmarkHooks.php index 144687191d..3106f89584 100644 --- a/maintenance/benchmarks/benchmarkHooks.php +++ b/maintenance/benchmarks/benchmarkHooks.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Benchmarker.php'; class BenchmarkHooks extends Benchmarker { public function __construct() { parent::__construct(); - $this->mDescription = 'Benchmark MediaWiki Hooks.'; + $this->addDescription( 'Benchmark MediaWiki Hooks.' ); } public function execute() { diff --git a/maintenance/benchmarks/benchmarkPurge.php b/maintenance/benchmarks/benchmarkPurge.php index 9eca73c682..e67d2261b9 100644 --- a/maintenance/benchmarks/benchmarkPurge.php +++ b/maintenance/benchmarks/benchmarkPurge.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Benchmarker.php'; class BenchmarkPurge extends Benchmarker { public function __construct() { parent::__construct(); - $this->mDescription = "Benchmark the Squid purge functions."; + $this->addDescription( 'Benchmark the Squid purge functions.' ); } public function execute() { diff --git a/maintenance/changePassword.php b/maintenance/changePassword.php index 5d98e1f57e..8687f81410 100644 --- a/maintenance/changePassword.php +++ b/maintenance/changePassword.php @@ -37,7 +37,7 @@ class ChangePassword extends Maintenance { $this->addOption( "user", "The username to operate on", false, true ); $this->addOption( "userid", "The user id to operate on", false, true ); $this->addOption( "password", "The password to use", true, true ); - $this->mDescription = "Change a user's password"; + $this->addDescription( "Change a user's password" ); } public function execute() { diff --git a/maintenance/checkBadRedirects.php b/maintenance/checkBadRedirects.php index 500fc35439..985df56ec7 100644 --- a/maintenance/checkBadRedirects.php +++ b/maintenance/checkBadRedirects.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class CheckBadRedirects extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Check for bad redirects"; + $this->addDescription( 'Check for bad redirects' ); } public function execute() { diff --git a/maintenance/checkComposerLockUpToDate.php b/maintenance/checkComposerLockUpToDate.php index 7a85d64ab0..9ec61dc04f 100644 --- a/maintenance/checkComposerLockUpToDate.php +++ b/maintenance/checkComposerLockUpToDate.php @@ -12,8 +12,8 @@ require_once __DIR__ . '/Maintenance.php'; class CheckComposerLockUpToDate extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = - 'Checks whether your composer.lock file is up to date with the current composer.json'; + $this->addDescription( + 'Checks whether your composer.lock file is up to date with the current composer.json' ); } public function execute() { diff --git a/maintenance/checkImages.php b/maintenance/checkImages.php index 976192711f..9a8203f99c 100644 --- a/maintenance/checkImages.php +++ b/maintenance/checkImages.php @@ -31,7 +31,7 @@ class CheckImages extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Check images to see if they exist, are readable, etc"; + $this->addDescription( 'Check images to see if they exist, are readable, etc' ); $this->setBatchSize( 1000 ); } diff --git a/maintenance/checkLess.php b/maintenance/checkLess.php index 2f533cf4b0..889c903c18 100644 --- a/maintenance/checkLess.php +++ b/maintenance/checkLess.php @@ -30,8 +30,8 @@ class CheckLess extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = - 'Checks LESS files for errors by running the LessTestSuite PHPUnit test suite'; + $this->addDescription( + 'Checks LESS files for errors by running the LessTestSuite PHPUnit test suite' ); } public function execute() { diff --git a/maintenance/checkSyntax.php b/maintenance/checkSyntax.php index 30a23d3041..4821e04972 100644 --- a/maintenance/checkSyntax.php +++ b/maintenance/checkSyntax.php @@ -36,7 +36,7 @@ class CheckSyntax extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Check syntax for all PHP files in MediaWiki"; + $this->addDescription( 'Check syntax for all PHP files in MediaWiki' ); $this->addOption( 'with-extensions', 'Also recurse the extensions folder' ); $this->addOption( 'path', diff --git a/maintenance/checkUsernames.php b/maintenance/checkUsernames.php index 6f4d170457..1b9a1ccb41 100644 --- a/maintenance/checkUsernames.php +++ b/maintenance/checkUsernames.php @@ -35,7 +35,7 @@ class CheckUsernames extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Verify that database usernames are actually valid"; + $this->addDescription( 'Verify that database usernames are actually valid' ); $this->setBatchSize( 1000 ); } diff --git a/maintenance/cleanupAncientTables.php b/maintenance/cleanupAncientTables.php index f1467d5ffc..7f67b60e6b 100644 --- a/maintenance/cleanupAncientTables.php +++ b/maintenance/cleanupAncientTables.php @@ -33,7 +33,7 @@ class CleanupAncientTables extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Cleanup ancient tables and indexes"; + $this->addDescription( 'Cleanup ancient tables and indexes' ); $this->addOption( 'force', 'Actually run this script' ); } diff --git a/maintenance/cleanupBlocks.php b/maintenance/cleanupBlocks.php index 437abe9597..2efd7ab4f8 100644 --- a/maintenance/cleanupBlocks.php +++ b/maintenance/cleanupBlocks.php @@ -33,7 +33,7 @@ class CleanupBlocks extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Cleanup user blocks with user names not matching the 'user' table"; + $this->addDescription( "Cleanup user blocks with user names not matching the 'user' table" ); $this->setBatchSize( 1000 ); } diff --git a/maintenance/cleanupCaps.php b/maintenance/cleanupCaps.php index e0a0f494fb..a79c2d35e4 100644 --- a/maintenance/cleanupCaps.php +++ b/maintenance/cleanupCaps.php @@ -42,7 +42,7 @@ class CapsCleanup extends TableCleanup { public function __construct() { parent::__construct(); - $this->mDescription = "Script to cleanup capitalization"; + $this->addDescription( 'Script to cleanup capitalization' ); $this->addOption( 'namespace', 'Namespace number to run caps cleanup on', false, true ); } diff --git a/maintenance/cleanupImages.php b/maintenance/cleanupImages.php index ab2d808606..0110685571 100644 --- a/maintenance/cleanupImages.php +++ b/maintenance/cleanupImages.php @@ -42,7 +42,7 @@ class ImageCleanup extends TableCleanup { public function __construct() { parent::__construct(); - $this->mDescription = "Script to clean up broken, unparseable upload filenames"; + $this->addDescription( 'Script to clean up broken, unparseable upload filenames' ); } protected function processRow( $row ) { diff --git a/maintenance/cleanupRemovedModules.php b/maintenance/cleanupRemovedModules.php index 810fad902e..19949bc912 100644 --- a/maintenance/cleanupRemovedModules.php +++ b/maintenance/cleanupRemovedModules.php @@ -34,7 +34,8 @@ class CleanupRemovedModules extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Remove cache entries for removed ResourceLoader modules from the database'; + $this->addDescription( + 'Remove cache entries for removed ResourceLoader modules from the database' ); $this->addOption( 'batchsize', 'Delete rows in batches of this size. Default: 500', false, true ); } diff --git a/maintenance/cleanupSpam.php b/maintenance/cleanupSpam.php index b43ce814d6..020f5cd75b 100644 --- a/maintenance/cleanupSpam.php +++ b/maintenance/cleanupSpam.php @@ -32,7 +32,7 @@ class CleanupSpam extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Cleanup all spam from a given hostname"; + $this->addDescription( 'Cleanup all spam from a given hostname' ); $this->addOption( 'all', 'Check all wikis in $wgLocalDatabases' ); $this->addOption( 'delete', 'Delete pages containing only spam instead of blanking them' ); $this->addArg( diff --git a/maintenance/cleanupTitles.php b/maintenance/cleanupTitles.php index 07df1b1444..574d5bdd4c 100644 --- a/maintenance/cleanupTitles.php +++ b/maintenance/cleanupTitles.php @@ -35,7 +35,7 @@ require_once __DIR__ . '/cleanupTable.inc'; class TitleCleanup extends TableCleanup { public function __construct() { parent::__construct(); - $this->mDescription = "Script to clean up broken, unparseable titles"; + $this->addDescription( 'Script to clean up broken, unparseable titles' ); } /** diff --git a/maintenance/cleanupUploadStash.php b/maintenance/cleanupUploadStash.php index 70490e1b68..480059d25c 100644 --- a/maintenance/cleanupUploadStash.php +++ b/maintenance/cleanupUploadStash.php @@ -37,7 +37,7 @@ class UploadStashCleanup extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Clean up abandoned files in temporary uploaded file stash"; + $this->addDescription( 'Clean up abandoned files in temporary uploaded file stash' ); $this->setBatchSize( 50 ); } diff --git a/maintenance/cleanupWatchlist.php b/maintenance/cleanupWatchlist.php index 16f7b616de..d8c682b1ca 100644 --- a/maintenance/cleanupWatchlist.php +++ b/maintenance/cleanupWatchlist.php @@ -46,7 +46,7 @@ class WatchlistCleanup extends TableCleanup { public function __construct() { parent::__construct(); - $this->mDescription = "Script to remove broken, unparseable titles in the Watchlist"; + $this->addDescription( 'Script to remove broken, unparseable titles in the Watchlist' ); $this->addOption( 'fix', 'Actually remove entries; without will only report.' ); } diff --git a/maintenance/clearInterwikiCache.php b/maintenance/clearInterwikiCache.php index 6a6527f527..4b5773c59c 100644 --- a/maintenance/clearInterwikiCache.php +++ b/maintenance/clearInterwikiCache.php @@ -32,7 +32,7 @@ class ClearInterwikiCache extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Clear all interwiki links for all languages from the cache"; + $this->addDescription( 'Clear all interwiki links for all languages from the cache' ); } public function execute() { diff --git a/maintenance/compareParserCache.php b/maintenance/compareParserCache.php index 98441b6023..e5f0bb33bd 100644 --- a/maintenance/compareParserCache.php +++ b/maintenance/compareParserCache.php @@ -27,7 +27,7 @@ require_once __DIR__ . '/Maintenance.php'; class CompareParserCache extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Parse random pages and compare output to cache."; + $this->addDescription( 'Parse random pages and compare output to cache.' ); $this->addOption( 'namespace', 'Page namespace number', true, true ); $this->addOption( 'maxpages', 'Number of pages to try', true, true ); } diff --git a/maintenance/compareParsers.php b/maintenance/compareParsers.php index e67c439baf..f2540c7afa 100644 --- a/maintenance/compareParsers.php +++ b/maintenance/compareParsers.php @@ -43,7 +43,7 @@ class CompareParsers extends DumpIterator { public function __construct() { parent::__construct(); $this->saveFailed = false; - $this->mDescription = "Run a file or dump with several parsers"; + $this->addDescription( 'Run a file or dump with several parsers' ); $this->addOption( 'parser1', 'The first parser to compare.', true, true ); $this->addOption( 'parser2', 'The second parser to compare.', true, true ); $this->addOption( 'tidy', 'Run tidy on the articles.', false, false ); diff --git a/maintenance/convertExtensionToRegistration.php b/maintenance/convertExtensionToRegistration.php index 3113533711..eeb2e6d517 100644 --- a/maintenance/convertExtensionToRegistration.php +++ b/maintenance/convertExtensionToRegistration.php @@ -55,7 +55,7 @@ class ConvertExtensionToRegistration extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Converts extension entry points to the new JSON registration format'; + $this->addDescription( 'Converts extension entry points to the new JSON registration format' ); $this->addArg( 'path', 'Location to the PHP entry point you wish to convert', /* $required = */ true ); $this->addOption( 'skin', 'Whether to write to skin.json', false, false ); diff --git a/maintenance/convertLinks.php b/maintenance/convertLinks.php index 15ca14b70a..fa9c574b56 100644 --- a/maintenance/convertLinks.php +++ b/maintenance/convertLinks.php @@ -36,9 +36,9 @@ class ConvertLinks extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = - "Convert from the old links schema (string->ID) to the new schema (ID->ID)." - . "The wiki should be put into read-only mode while this script executes"; + $this->addDescription( + 'Convert from the old links schema (string->ID) to the new schema (ID->ID). ' + . 'The wiki should be put into read-only mode while this script executes' ); $this->addArg( 'logperformance', "Log performance to perfLogFilename.", false ); $this->addArg( diff --git a/maintenance/convertUserOptions.php b/maintenance/convertUserOptions.php index 11768c8a56..c245a1e6bd 100644 --- a/maintenance/convertUserOptions.php +++ b/maintenance/convertUserOptions.php @@ -34,7 +34,7 @@ class ConvertUserOptions extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Convert user options from old to new system"; + $this->addDescription( 'Convert user options from old to new system' ); $this->setBatchSize( 50 ); } diff --git a/maintenance/copyFileBackend.php b/maintenance/copyFileBackend.php index b39ff55eda..25073f7424 100644 --- a/maintenance/copyFileBackend.php +++ b/maintenance/copyFileBackend.php @@ -40,7 +40,7 @@ class CopyFileBackend extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Copy files in one backend to another."; + $this->addDescription( 'Copy files in one backend to another.' ); $this->addOption( 'src', 'Backend containing the source files', true, true ); $this->addOption( 'dst', 'Backend where files should be copied to', true, true ); $this->addOption( 'containers', 'Pipe separated list of containers', true, true ); diff --git a/maintenance/copyJobQueue.php b/maintenance/copyJobQueue.php index a9c9547ec7..42c2dd4d77 100644 --- a/maintenance/copyJobQueue.php +++ b/maintenance/copyJobQueue.php @@ -34,7 +34,7 @@ require_once __DIR__ . '/Maintenance.php'; class CopyJobQueue extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Copy jobs from one queue system to another."; + $this->addDescription( 'Copy jobs from one queue system to another.' ); $this->addOption( 'src', 'Key to $wgJobQueueMigrationConfig for source', true, true ); $this->addOption( 'dst', 'Key to $wgJobQueueMigrationConfig for destination', true, true ); $this->addOption( 'type', 'Types of jobs to copy (use "all" for all)', true, true ); diff --git a/maintenance/createAndPromote.php b/maintenance/createAndPromote.php index c1a2022138..e7d666a562 100644 --- a/maintenance/createAndPromote.php +++ b/maintenance/createAndPromote.php @@ -35,7 +35,7 @@ class CreateAndPromote extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Create a new user account and/or grant it additional rights"; + $this->addDescription( 'Create a new user account and/or grant it additional rights' ); $this->addOption( 'force', 'If acccount exists already, just grant it rights or change password.' diff --git a/maintenance/createCommonPasswordCdb.php b/maintenance/createCommonPasswordCdb.php index c6787122b0..87e7e088ae 100644 --- a/maintenance/createCommonPasswordCdb.php +++ b/maintenance/createCommonPasswordCdb.php @@ -37,7 +37,7 @@ class GenerateCommonPassword extends Maintenance { public function __construct() { global $IP; parent::__construct(); - $this->mDescription = "Generate CDB file of common passwords"; + $this->addDescription( 'Generate CDB file of common passwords' ); $this->addOption( 'limit', "Max number of passwords to write", false, true, 'l' ); $this->addArg( 'inputfile', 'List of passwords (one per line) to use or - for stdin', true ); $this->addArg( diff --git a/maintenance/deleteArchivedFiles.php b/maintenance/deleteArchivedFiles.php index 94ebf874af..92f1a91d58 100644 --- a/maintenance/deleteArchivedFiles.php +++ b/maintenance/deleteArchivedFiles.php @@ -34,7 +34,7 @@ require_once __DIR__ . '/Maintenance.php'; class DeleteArchivedFiles extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Deletes all archived images."; + $this->addDescription( 'Deletes all archived images.' ); $this->addOption( 'delete', 'Perform the deletion' ); $this->addOption( 'force', 'Force deletion of rows from filearchive' ); } diff --git a/maintenance/deleteArchivedRevisions.php b/maintenance/deleteArchivedRevisions.php index 9924eb0cd5..2fb83fccf7 100644 --- a/maintenance/deleteArchivedRevisions.php +++ b/maintenance/deleteArchivedRevisions.php @@ -35,8 +35,8 @@ require_once __DIR__ . '/Maintenance.php'; class DeleteArchivedRevisions extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = - "Deletes all archived revisions\nThese revisions will no longer be restorable"; + $this->addDescription( + "Deletes all archived revisions\nThese revisions will no longer be restorable" ); $this->addOption( 'delete', 'Performs the deletion' ); } diff --git a/maintenance/deleteBatch.php b/maintenance/deleteBatch.php index 6c89e671ea..e8839c593e 100644 --- a/maintenance/deleteBatch.php +++ b/maintenance/deleteBatch.php @@ -39,7 +39,7 @@ class DeleteBatch extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Deletes a batch of pages"; + $this->addDescription( 'Deletes a batch of pages' ); $this->addOption( 'u', "User to perform deletion", false, true ); $this->addOption( 'r', "Reason to delete page", false, true ); $this->addOption( 'i', "Interval to sleep between deletions" ); diff --git a/maintenance/deleteDefaultMessages.php b/maintenance/deleteDefaultMessages.php index a5c6199534..7e1d315eee 100644 --- a/maintenance/deleteDefaultMessages.php +++ b/maintenance/deleteDefaultMessages.php @@ -33,8 +33,8 @@ require_once __DIR__ . '/Maintenance.php'; class DeleteDefaultMessages extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Deletes all pages in the MediaWiki namespace" . - " which were last edited by \"MediaWiki default\""; + $this->addDescription( 'Deletes all pages in the MediaWiki namespace' . + ' which were last edited by "MediaWiki default"' ); } public function execute() { diff --git a/maintenance/deleteEqualMessages.php b/maintenance/deleteEqualMessages.php index e7bb866cab..f21f3e1766 100644 --- a/maintenance/deleteEqualMessages.php +++ b/maintenance/deleteEqualMessages.php @@ -30,8 +30,8 @@ require_once __DIR__ . '/Maintenance.php'; class DeleteEqualMessages extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Deletes all pages in the MediaWiki namespace that are equal to ' - . 'the default message'; + $this->addDescription( 'Deletes all pages in the MediaWiki namespace that are equal to ' + . 'the default message' ); $this->addOption( 'delete', 'Actually delete the pages (default: dry run)' ); $this->addOption( 'delete-talk', 'Don\'t leave orphaned talk pages behind during deletion' ); $this->addOption( 'lang-code', 'Check for subpages of this language code (default: root ' diff --git a/maintenance/deleteOldRevisions.php b/maintenance/deleteOldRevisions.php index f411148651..123163fb2b 100644 --- a/maintenance/deleteOldRevisions.php +++ b/maintenance/deleteOldRevisions.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class DeleteOldRevisions extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Delete old (non-current) revisions from the database"; + $this->addDescription( 'Delete old (non-current) revisions from the database' ); $this->addOption( 'delete', 'Actually perform the deletion' ); $this->addOption( 'page_id', 'List of page ids to work on', false ); } diff --git a/maintenance/deleteOrphanedRevisions.php b/maintenance/deleteOrphanedRevisions.php index 3d5c1a4d07..5f08b5a9a6 100644 --- a/maintenance/deleteOrphanedRevisions.php +++ b/maintenance/deleteOrphanedRevisions.php @@ -34,7 +34,8 @@ require_once __DIR__ . '/Maintenance.php'; class DeleteOrphanedRevisions extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Maintenance script to delete revisions which refer to a nonexisting page"; + $this->addDescription( + 'Maintenance script to delete revisions which refer to a nonexisting page' ); $this->addOption( 'report', 'Prints out a count of affected revisions but doesn\'t delete them' ); } diff --git a/maintenance/deleteRevision.php b/maintenance/deleteRevision.php index 6cda78483d..4606d927fe 100644 --- a/maintenance/deleteRevision.php +++ b/maintenance/deleteRevision.php @@ -33,7 +33,7 @@ class DeleteRevision extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Delete one or more revisions by moving them to the archive table"; + $this->addDescription( 'Delete one or more revisions by moving them to the archive table' ); } public function execute() { diff --git a/maintenance/deleteSelfExternals.php b/maintenance/deleteSelfExternals.php index f9bb41610f..ed15fd13b3 100644 --- a/maintenance/deleteSelfExternals.php +++ b/maintenance/deleteSelfExternals.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class DeleteSelfExternals extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Delete self-references to $wgServer from externallinks'; + $this->addDescription( 'Delete self-references to $wgServer from externallinks' ); $this->mBatchSize = 1000; } diff --git a/maintenance/dumpBackup.php b/maintenance/dumpBackup.php index 18737a458a..190432517d 100644 --- a/maintenance/dumpBackup.php +++ b/maintenance/dumpBackup.php @@ -31,7 +31,7 @@ class DumpBackup extends BackupDumper { function __construct( $args = null ) { parent::__construct(); - $this->mDescription = <<addDescription( <<stderr = fopen( "php://stderr", "wt" ); // Actions $this->addOption( 'full', 'Dump all revisions of every page' ); diff --git a/maintenance/dumpIterator.php b/maintenance/dumpIterator.php index d8bc3a4da7..eef535adf3 100644 --- a/maintenance/dumpIterator.php +++ b/maintenance/dumpIterator.php @@ -40,7 +40,7 @@ abstract class DumpIterator extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Does something with a dump"; + $this->addDescription( 'Does something with a dump' ); $this->addOption( 'file', 'File with text to run.', false, true ); $this->addOption( 'dump', 'XML dump to execute all revisions.', false, true ); $this->addOption( 'from', 'Article from XML dump to start from.', false, true ); @@ -164,7 +164,7 @@ class SearchDump extends DumpIterator { public function __construct() { parent::__construct(); - $this->mDescription = "Runs a regex in the revisions from a dump"; + $this->addDescription( 'Runs a regex in the revisions from a dump' ); $this->addOption( 'regex', 'Searching regex', true, true ); } diff --git a/maintenance/dumpLinks.php b/maintenance/dumpLinks.php index 74b500a1c4..7139786017 100644 --- a/maintenance/dumpLinks.php +++ b/maintenance/dumpLinks.php @@ -40,7 +40,7 @@ require_once __DIR__ . '/Maintenance.php'; class DumpLinks extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Quick demo hack to generate a plaintext link dump"; + $this->addDescription( 'Quick demo hack to generate a plaintext link dump' ); } public function execute() { diff --git a/maintenance/dumpTextPass.php b/maintenance/dumpTextPass.php index 7511392c2c..8169ef5429 100644 --- a/maintenance/dumpTextPass.php +++ b/maintenance/dumpTextPass.php @@ -93,13 +93,14 @@ class TextPassDumper extends BackupDumper { function __construct( $args = null ) { parent::__construct(); - $this->mDescription = <<addDescription( <<stderr = fopen( "php://stderr", "wt" ); $this->addOption( 'stub', 'To load a compressed stub dump instead of stdin. ' . diff --git a/maintenance/dumpUploads.php b/maintenance/dumpUploads.php index 026ac025c0..64884d527b 100644 --- a/maintenance/dumpUploads.php +++ b/maintenance/dumpUploads.php @@ -32,8 +32,8 @@ require_once __DIR__ . '/Maintenance.php'; class UploadDumper extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Generates list of uploaded files which can be fed to tar or similar. -By default, outputs relative paths against the parent directory of \$wgUploadDirectory."; + $this->addDescription( 'Generates list of uploaded files which can be fed to tar or similar. +By default, outputs relative paths against the parent directory of $wgUploadDirectory.' ); $this->addOption( 'base', 'Set base relative path instead of wiki include root', false, true ); $this->addOption( 'local', 'List all local files, used or not. No shared files included' ); $this->addOption( 'used', 'Skip local images that are not used' ); diff --git a/maintenance/edit.php b/maintenance/edit.php index b67a957162..fc83a91bab 100644 --- a/maintenance/edit.php +++ b/maintenance/edit.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class EditCLI extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Edit an article from the command line, text is from stdin"; + $this->addDescription( 'Edit an article from the command line, text is from stdin' ); $this->addOption( 'user', 'Username', false, true, 'u' ); $this->addOption( 'summary', 'Edit summary', false, true, 's' ); $this->addOption( 'minor', 'Minor edit', false, false, 'm' ); diff --git a/maintenance/eraseArchivedFile.php b/maintenance/eraseArchivedFile.php index 69a95e20bd..2fcdd140ee 100644 --- a/maintenance/eraseArchivedFile.php +++ b/maintenance/eraseArchivedFile.php @@ -35,7 +35,7 @@ require_once __DIR__ . '/Maintenance.php'; class EraseArchivedFile extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Erases traces of deleted files."; + $this->addDescription( 'Erases traces of deleted files.' ); $this->addOption( 'delete', 'Perform the deletion' ); $this->addOption( 'filename', 'File name', false, true ); $this->addOption( 'filekey', 'File storage key (with extension) or "*"', true, true ); diff --git a/maintenance/exportSites.php b/maintenance/exportSites.php index 145c924923..157a3234bc 100644 --- a/maintenance/exportSites.php +++ b/maintenance/exportSites.php @@ -15,7 +15,7 @@ require_once $basePath . '/maintenance/Maintenance.php'; class ExportSites extends Maintenance { public function __construct() { - $this->mDescription = 'Exports site definitions the sites table to XML file'; + $this->addDescription( 'Exports site definitions the sites table to XML file' ); $this->addArg( 'file', 'A file to write the XML to (see docs/sitelist.txt). ' . 'Use "php://stdout" to write to stdout.', true diff --git a/maintenance/fetchText.php b/maintenance/fetchText.php index cf128388db..989e90aea3 100644 --- a/maintenance/fetchText.php +++ b/maintenance/fetchText.php @@ -32,9 +32,10 @@ require_once __DIR__ . '/Maintenance.php'; class FetchText extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Fetch the raw revision blob from an old_id.\n" . + $this->addDescription( "Fetch the raw revision blob from an old_id.\n" . "NOTE: Export transformations are NOT applied. " . - "This is left to backupTextPass.php"; + "This is left to backupTextPass.php" + ); } /** diff --git a/maintenance/fileOpPerfTest.php b/maintenance/fileOpPerfTest.php index 9dba818306..feb927ef2d 100644 --- a/maintenance/fileOpPerfTest.php +++ b/maintenance/fileOpPerfTest.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class TestFileOpPerformance extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Test fileop performance"; + $this->addDescription( 'Test fileop performance' ); $this->addOption( 'b1', 'Backend 1', true, true ); $this->addOption( 'b2', 'Backend 2', false, true ); $this->addOption( 'srcdir', 'File source directory', true, true ); diff --git a/maintenance/findDeprecated.php b/maintenance/findDeprecated.php index 8c7e242207..9022292e2f 100644 --- a/maintenance/findDeprecated.php +++ b/maintenance/findDeprecated.php @@ -124,7 +124,7 @@ class DeprecatedInterfaceFinder extends FileAwareNodeVisitor { class FindDeprecated extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Find deprecated interfaces'; + $this->addDescription( 'Find deprecated interfaces' ); } public function getFiles() { diff --git a/maintenance/findHooks.php b/maintenance/findHooks.php index f9c61c70f7..1cf818ee79 100644 --- a/maintenance/findHooks.php +++ b/maintenance/findHooks.php @@ -49,7 +49,7 @@ class FindHooks extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Find hooks that are undocumented, missing, or just plain wrong'; + $this->addDescription( 'Find hooks that are undocumented, missing, or just plain wrong' ); $this->addOption( 'online', 'Check against MediaWiki.org hook documentation' ); } diff --git a/maintenance/findMissingFiles.php b/maintenance/findMissingFiles.php index 5818ee25c4..2fad7ce75c 100644 --- a/maintenance/findMissingFiles.php +++ b/maintenance/findMissingFiles.php @@ -25,7 +25,7 @@ class FindMissingFiles extends Maintenance { function __construct() { parent::__construct(); - $this->mDescription = 'Find registered files with no corresponding file.'; + $this->addDescription( 'Find registered files with no corresponding file.' ); $this->addOption( 'start', 'Start after this file name', false, true ); $this->addOption( 'mtimeafter', 'Only include files changed since this time', false, true ); $this->addOption( 'mtimebefore', 'Only includes files changed before this time', false, true ); diff --git a/maintenance/findOrphanedFiles.php b/maintenance/findOrphanedFiles.php index 41650bd0e6..23629575bc 100644 --- a/maintenance/findOrphanedFiles.php +++ b/maintenance/findOrphanedFiles.php @@ -25,7 +25,7 @@ class FindOrphanedFiles extends Maintenance { function __construct() { parent::__construct(); - $this->mDescription = "Find unregistered files in the 'public' repo zone."; + $this->addDescription( "Find unregistered files in the 'public' repo zone." ); $this->addOption( 'subdir', 'Only scan files in this subdirectory (e.g. "a/a0")', false, true ); $this->addOption( 'verbose', "Mention file paths checked" ); diff --git a/maintenance/fixDefaultJsonContentPages.php b/maintenance/fixDefaultJsonContentPages.php index 25ec34252c..18334d62e5 100644 --- a/maintenance/fixDefaultJsonContentPages.php +++ b/maintenance/fixDefaultJsonContentPages.php @@ -32,8 +32,8 @@ require_once __DIR__ . '/Maintenance.php'; class FixDefaultJsonContentPages extends LoggedUpdateMaintenance { public function __construct() { parent::__construct(); - $this->mDescription = - 'Fix instances of JSON pages prior to them being the ContentHandler default'; + $this->addDescription( + 'Fix instances of JSON pages prior to them being the ContentHandler default' ); $this->setBatchSize( 100 ); } diff --git a/maintenance/fixDoubleRedirects.php b/maintenance/fixDoubleRedirects.php index ca551f87b4..8faca27713 100644 --- a/maintenance/fixDoubleRedirects.php +++ b/maintenance/fixDoubleRedirects.php @@ -35,7 +35,7 @@ require_once __DIR__ . '/Maintenance.php'; class FixDoubleRedirects extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Script to fix double redirects"; + $this->addDescription( 'Script to fix double redirects' ); $this->addOption( 'async', 'Don\'t fix anything directly, just queue the jobs' ); $this->addOption( 'title', 'Fix only redirects pointing to this page', false, true ); $this->addOption( 'dry-run', 'Perform a dry run, fix nothing' ); diff --git a/maintenance/fixExtLinksProtocolRelative.php b/maintenance/fixExtLinksProtocolRelative.php index a44f8e5087..d04e0c25a5 100644 --- a/maintenance/fixExtLinksProtocolRelative.php +++ b/maintenance/fixExtLinksProtocolRelative.php @@ -34,8 +34,8 @@ require_once __DIR__ . '/Maintenance.php'; class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance { public function __construct() { parent::__construct(); - $this->mDescription = - "Fixes any entries in the externallinks table containing protocol-relative URLs"; + $this->addDescription( + 'Fixes any entries in the externallinks table containing protocol-relative URLs' ); } protected function getUpdateKey() { diff --git a/maintenance/fixTimestamps.php b/maintenance/fixTimestamps.php index c2a748c4d0..0fb3d38b1c 100644 --- a/maintenance/fixTimestamps.php +++ b/maintenance/fixTimestamps.php @@ -36,7 +36,7 @@ require_once __DIR__ . '/Maintenance.php'; class FixTimestamps extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = ""; + $this->addDescription( '' ); $this->addArg( 'offset', '' ); $this->addArg( 'start', 'Starting timestamp' ); $this->addArg( 'end', 'Ending timestamp' ); diff --git a/maintenance/fixUserRegistration.php b/maintenance/fixUserRegistration.php index d09760b4bd..44ac220a37 100644 --- a/maintenance/fixUserRegistration.php +++ b/maintenance/fixUserRegistration.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class FixUserRegistration extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Fix the user_registration field"; + $this->addDescription( 'Fix the user_registration field' ); $this->setBatchSize( 1000 ); } diff --git a/maintenance/generateJsonI18n.php b/maintenance/generateJsonI18n.php index b9c07fbe4d..0b4f2ede9d 100644 --- a/maintenance/generateJsonI18n.php +++ b/maintenance/generateJsonI18n.php @@ -35,7 +35,7 @@ require_once __DIR__ . '/Maintenance.php'; class GenerateJsonI18n extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Build JSON messages files from a PHP messages file"; + $this->addDescription( 'Build JSON messages files from a PHP messages file' ); $this->addArg( 'phpfile', 'PHP file defining a $messages array', false ); $this->addArg( 'jsondir', 'Directory to write JSON files to', false ); diff --git a/maintenance/generateSitemap.php b/maintenance/generateSitemap.php index c40d0ce706..256824e7be 100644 --- a/maintenance/generateSitemap.php +++ b/maintenance/generateSitemap.php @@ -145,7 +145,7 @@ class GenerateSitemap extends Maintenance { */ public function __construct() { parent::__construct(); - $this->mDescription = "Creates a sitemap for the site"; + $this->addDescription( 'Creates a sitemap for the site' ); $this->addOption( 'fspath', 'The file system path to save to, e.g. /tmp/sitemap; defaults to current directory', diff --git a/maintenance/getConfiguration.php b/maintenance/getConfiguration.php index 58382014f8..b1140ecbd6 100644 --- a/maintenance/getConfiguration.php +++ b/maintenance/getConfiguration.php @@ -49,7 +49,7 @@ class GetConfiguration extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Get serialized MediaWiki site configuration"; + $this->addDescription( 'Get serialized MediaWiki site configuration' ); $this->addOption( 'regex', 'regex to filter variables with', false, true ); $this->addOption( 'iregex', 'same as --regex but case insensitive', false, true ); $this->addOption( 'settings', 'Space-separated list of wg* variables', false, true ); diff --git a/maintenance/getLagTimes.php b/maintenance/getLagTimes.php index 7365a2ee71..c2c6958733 100644 --- a/maintenance/getLagTimes.php +++ b/maintenance/getLagTimes.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class GetLagTimes extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Dump replication lag times"; + $this->addDescription( 'Dump replication lag times' ); } public function execute() { diff --git a/maintenance/getSlaveServer.php b/maintenance/getSlaveServer.php index c858c38673..81228cc575 100644 --- a/maintenance/getSlaveServer.php +++ b/maintenance/getSlaveServer.php @@ -32,7 +32,7 @@ class GetSlaveServer extends Maintenance { public function __construct() { parent::__construct(); $this->addOption( "group", "Query group to check specifically" ); - $this->mDescription = "Report the hostname of a slave server"; + $this->addDescription( 'Report the hostname of a slave server' ); } public function execute() { diff --git a/maintenance/getText.php b/maintenance/getText.php index c4b8cc9bff..f519a79052 100644 --- a/maintenance/getText.php +++ b/maintenance/getText.php @@ -33,7 +33,7 @@ require_once __DIR__ . '/Maintenance.php'; class GetTextMaint extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Outputs page text to stdout'; + $this->addDescription( 'Outputs page text to stdout' ); $this->addOption( 'show-private', 'Show the text even if it\'s not available to the public' ); $this->addArg( 'title', 'Page title' ); } diff --git a/maintenance/importDump.php b/maintenance/importDump.php index 5806ffc936..7c452a6325 100644 --- a/maintenance/importDump.php +++ b/maintenance/importDump.php @@ -49,7 +49,8 @@ class BackupReader extends Maintenance { ? 'ok' : '(disabled; requires PHP bzip2 module)'; - $this->mDescription = <<addDescription( + << -TEXT; +TEXT + ); $this->stderr = fopen( "php://stderr", "wt" ); $this->addOption( 'report', 'Report position and speed after every n pages processed', false, true ); diff --git a/maintenance/importSiteScripts.php b/maintenance/importSiteScripts.php index 5dfd2a8795..366594d090 100644 --- a/maintenance/importSiteScripts.php +++ b/maintenance/importSiteScripts.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class ImportSiteScripts extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Import site scripts from a site'; + $this->addDescription( 'Import site scripts from a site' ); $this->addArg( 'api', 'API base url' ); $this->addArg( 'index', 'index.php base url' ); $this->addOption( 'username', 'User name of the script importer' ); diff --git a/maintenance/importSites.php b/maintenance/importSites.php index c5c00aa24d..8845c60640 100644 --- a/maintenance/importSites.php +++ b/maintenance/importSites.php @@ -15,7 +15,7 @@ require_once $basePath . '/maintenance/Maintenance.php'; class ImportSites extends Maintenance { public function __construct() { - $this->mDescription = 'Imports site definitions from XML into the sites table.'; + $this->addDescription( 'Imports site definitions from XML into the sites table.' ); $this->addArg( 'file', 'An XML file containing site definitions (see docs/sitelist.txt). ' . 'Use "php://stdin" to read from stdin.', true diff --git a/maintenance/importTextFiles.php b/maintenance/importTextFiles.php index 14d8420ce4..70b65744db 100644 --- a/maintenance/importTextFiles.php +++ b/maintenance/importTextFiles.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class ImportTextFiles extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Reads in text files and imports their content to pages of the wiki"; + $this->addDescription( 'Reads in text files and imports their content to pages of the wiki' ); $this->addOption( 'user', 'Username to which edits should be attributed. ' . 'Default: "Maintenance script"', false, true, 'u' ); $this->addOption( 'summary', 'Specify edit summary for the edits', false, true, 's' ); diff --git a/maintenance/initEditCount.php b/maintenance/initEditCount.php index dee5db8aef..5d0dcc603c 100644 --- a/maintenance/initEditCount.php +++ b/maintenance/initEditCount.php @@ -35,7 +35,7 @@ class InitEditCount extends Maintenance { Background mode will be automatically used if the server is MySQL 4.0 (which does not support subqueries) or if multiple servers are listed in the load balancer, usually indicating a replication environment.' ); - $this->mDescription = "Batch-recalculate user_editcount fields from the revision table"; + $this->addDescription( 'Batch-recalculate user_editcount fields from the revision table' ); } public function execute() { diff --git a/maintenance/initSiteStats.php b/maintenance/initSiteStats.php index 8d26063c3a..7e62b89f48 100644 --- a/maintenance/initSiteStats.php +++ b/maintenance/initSiteStats.php @@ -33,7 +33,7 @@ require_once __DIR__ . '/Maintenance.php'; class InitSiteStats extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Re-initialise the site statistics tables"; + $this->addDescription( 'Re-initialise the site statistics tables' ); $this->addOption( 'update', 'Update the existing statistics' ); $this->addOption( 'active', 'Also update active users count' ); $this->addOption( 'use-master', 'Count using the master database' ); diff --git a/maintenance/jsparse.php b/maintenance/jsparse.php index fddfc02402..770251cf0d 100644 --- a/maintenance/jsparse.php +++ b/maintenance/jsparse.php @@ -33,7 +33,7 @@ class JSParseHelper extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Runs parsing/syntax checks on JavaScript files"; + $this->addDescription( 'Runs parsing/syntax checks on JavaScript files' ); $this->addArg( 'file(s)', 'JavaScript file to test', false ); } diff --git a/maintenance/lag.php b/maintenance/lag.php index 52f8201a4a..9d92794129 100644 --- a/maintenance/lag.php +++ b/maintenance/lag.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class DatabaseLag extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Shows database lag"; + $this->addDescription( 'Shows database lag' ); $this->addOption( 'r', "Don't exit immediately, but show the lag every 5 seconds" ); } diff --git a/maintenance/language/alltrans.php b/maintenance/language/alltrans.php index d0e6e84986..931718f5ab 100644 --- a/maintenance/language/alltrans.php +++ b/maintenance/language/alltrans.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/../Maintenance.php'; class AllTrans extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Get all messages as defined by the English language file"; + $this->addDescription( 'Get all messages as defined by the English language file' ); } public function execute() { diff --git a/maintenance/language/date-formats.php b/maintenance/language/date-formats.php index 146341855e..dc275ab166 100644 --- a/maintenance/language/date-formats.php +++ b/maintenance/language/date-formats.php @@ -34,7 +34,7 @@ class DateFormats extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Test various language time and date functions"; + $this->addDescription( 'Test various language time and date functions' ); } public function execute() { diff --git a/maintenance/language/digit2html.php b/maintenance/language/digit2html.php index a6e0456a16..eddfa261ae 100644 --- a/maintenance/language/digit2html.php +++ b/maintenance/language/digit2html.php @@ -41,7 +41,7 @@ class Digit2Html extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Check digit transformation"; + $this->addDescription( 'Check digit transformation' ); } public function execute() { diff --git a/maintenance/language/dumpMessages.php b/maintenance/language/dumpMessages.php index a72e25b882..5768232b82 100644 --- a/maintenance/language/dumpMessages.php +++ b/maintenance/language/dumpMessages.php @@ -33,7 +33,7 @@ require_once __DIR__ . '/../Maintenance.php'; class DumpMessages extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Dump an entire language, using the keys from English"; + $this->addDescription( 'Dump an entire language, using the keys from English' ); } public function execute() { diff --git a/maintenance/language/generateNormalizerDataAr.php b/maintenance/language/generateNormalizerDataAr.php index 52ed81fbdc..722db0644f 100644 --- a/maintenance/language/generateNormalizerDataAr.php +++ b/maintenance/language/generateNormalizerDataAr.php @@ -33,7 +33,7 @@ require_once __DIR__ . '/../Maintenance.php'; class GenerateNormalizerDataAr extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Generate the normalizer data file for Arabic'; + $this->addDescription( 'Generate the normalizer data file for Arabic' ); $this->addOption( 'unicode-data-file', 'The local location of the data file ' . 'from http://unicode.org/Public/UNIDATA/UnicodeData.txt', false, true ); } diff --git a/maintenance/language/generateNormalizerDataMl.php b/maintenance/language/generateNormalizerDataMl.php index cb6ae69805..412e7ef7b2 100644 --- a/maintenance/language/generateNormalizerDataMl.php +++ b/maintenance/language/generateNormalizerDataMl.php @@ -33,7 +33,7 @@ require_once __DIR__ . '/../Maintenance.php'; class GenerateNormalizerDataMl extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Generate the normalizer data file for Malayalam'; + $this->addDescription( 'Generate the normalizer data file for Malayalam' ); } public function getDbType() { diff --git a/maintenance/language/generateUtf8Case.php b/maintenance/language/generateUtf8Case.php index 3520b87490..676297e91e 100644 --- a/maintenance/language/generateUtf8Case.php +++ b/maintenance/language/generateUtf8Case.php @@ -37,8 +37,8 @@ class GenerateUtf8Case extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Generate Utf8Case.ser from the Unicode Character Database ' . - 'and supplementary files'; + $this->addDescription( 'Generate Utf8Case.ser from the Unicode Character Database ' . + 'and supplementary files' ); $this->addOption( 'unicode-data-file', 'The local location of the data file ' . 'from http://unicode.org/Public/UNIDATA/UnicodeData.txt', false, true ); } diff --git a/maintenance/language/langmemusage.php b/maintenance/language/langmemusage.php index 32cfcd7d3f..7c16602ef6 100644 --- a/maintenance/language/langmemusage.php +++ b/maintenance/language/langmemusage.php @@ -34,8 +34,8 @@ class LangMemUsage extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Dumb program that tries to get the memory usage\n" . - "for each language file"; + $this->addDescription( "Dumb program that tries to get the memory usage\n" . + "for each language file" ); } public function execute() { diff --git a/maintenance/language/listVariants.php b/maintenance/language/listVariants.php index 4bff891644..e8137ba927 100644 --- a/maintenance/language/listVariants.php +++ b/maintenance/language/listVariants.php @@ -32,7 +32,7 @@ class ListVariants extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Outputs a list of language variants'; + $this->addDescription( 'Outputs a list of language variants' ); $this->addOption( 'flat', 'Output variants in a flat list' ); $this->addOption( 'json', 'Output variants as JSON' ); } diff --git a/maintenance/makeTestEdits.php b/maintenance/makeTestEdits.php index c6569a0b31..ca2f7c51c9 100644 --- a/maintenance/makeTestEdits.php +++ b/maintenance/makeTestEdits.php @@ -30,7 +30,7 @@ require_once __DIR__ . '/Maintenance.php'; class MakeTestEdits extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Make test edits for a user"; + $this->addDescription( 'Make test edits for a user' ); $this->addOption( 'user', 'User name', true, true ); $this->addOption( 'count', 'Number of edits', true, true ); $this->addOption( 'namespace', 'Namespace number', false, true ); diff --git a/maintenance/mctest.php b/maintenance/mctest.php index a97d2e1296..619ada6129 100644 --- a/maintenance/mctest.php +++ b/maintenance/mctest.php @@ -33,8 +33,8 @@ require_once __DIR__ . '/Maintenance.php'; class McTest extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Makes several 'set', 'incr' and 'get' requests on every" - . " memcached server and shows a report"; + $this->addDescription( "Makes several 'set', 'incr' and 'get' requests on every" + . " memcached server and shows a report" ); $this->addOption( 'i', 'Number of iterations', false, true ); $this->addOption( 'cache', 'Use servers from this $wgObjectCaches store', false, true ); $this->addArg( 'server[:port]', 'Memcached server to test, with optional port', false ); diff --git a/maintenance/mergeMessageFileList.php b/maintenance/mergeMessageFileList.php index b4914971ab..20b333ee97 100644 --- a/maintenance/mergeMessageFileList.php +++ b/maintenance/mergeMessageFileList.php @@ -51,8 +51,9 @@ class MergeMessageFileList extends Maintenance { ); $this->addOption( 'extensions-dir', 'Path where extensions can be found.', false, true ); $this->addOption( 'output', 'Send output to this file (omit for stdout)', false, true ); - $this->mDescription = 'Merge $wgExtensionMessagesFiles and $wgMessagesDirs from ' . - ' various extensions to produce a single file listing all message files and dirs.'; + $this->addDescription( 'Merge $wgExtensionMessagesFiles and $wgMessagesDirs from ' . + ' various extensions to produce a single file listing all message files and dirs.' + ); } public function execute() { diff --git a/maintenance/migrateFileRepoLayout.php b/maintenance/migrateFileRepoLayout.php index 68b97e30d8..77d88f5742 100644 --- a/maintenance/migrateFileRepoLayout.php +++ b/maintenance/migrateFileRepoLayout.php @@ -33,7 +33,7 @@ require_once __DIR__ . '/Maintenance.php'; class MigrateFileRepoLayout extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Copy files in repo to a different layout."; + $this->addDescription( 'Copy files in repo to a different layout.' ); $this->addOption( 'oldlayout', "Old layout; one of 'name' or 'sha1'", true, true ); $this->addOption( 'newlayout', "New layout; one of 'name' or 'sha1'", true, true ); $this->addOption( 'since', "Copy only files from after this timestamp", false, true ); diff --git a/maintenance/migrateUserGroup.php b/maintenance/migrateUserGroup.php index dc20eee2f6..df6665a969 100644 --- a/maintenance/migrateUserGroup.php +++ b/maintenance/migrateUserGroup.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class MigrateUserGroup extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Re-assign users from an old group to a new one"; + $this->addDescription( 'Re-assign users from an old group to a new one' ); $this->addArg( 'oldgroup', 'Old user group key', true ); $this->addArg( 'newgroup', 'New user group key', true ); $this->setBatchSize( 200 ); diff --git a/maintenance/minify.php b/maintenance/minify.php index c357eebea3..16e4d1c972 100644 --- a/maintenance/minify.php +++ b/maintenance/minify.php @@ -40,9 +40,10 @@ class MinifyScript extends Maintenance { "Directory for output. If this is not specified, and neither is --outfile, then the\n" . "output files will be sent to the same directories as the input files.", false, true ); - $this->mDescription = "Minify a file or set of files.\n\n" . + $this->addDescription( "Minify a file or set of files.\n\n" . "If --outfile is not specified, then the output file names will have a .min extension\n" . - "added, e.g. jquery.js -> jquery.min.js."; + "added, e.g. jquery.js -> jquery.min.js." + ); } public function execute() { diff --git a/maintenance/moveBatch.php b/maintenance/moveBatch.php index 43d4d25d15..8645ab1375 100644 --- a/maintenance/moveBatch.php +++ b/maintenance/moveBatch.php @@ -45,7 +45,7 @@ require_once __DIR__ . '/Maintenance.php'; class MoveBatch extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Moves a batch of pages"; + $this->addDescription( 'Moves a batch of pages' ); $this->addOption( 'u', "User to perform move", false, true ); $this->addOption( 'r', "Reason to move page", false, true ); $this->addOption( 'i', "Interval to sleep between moves" ); diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index 00a15e560d..35fca8e050 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -46,7 +46,7 @@ class MWDocGen extends Maintenance { */ public function __construct() { parent::__construct(); - $this->mDescription = 'Build doxygen documentation'; + $this->addDescription( 'Build doxygen documentation' ); $this->addOption( 'doxygen', 'Path to doxygen', diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index 6e5cd38ac5..b59f4a960f 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -47,7 +47,7 @@ class NamespaceConflictChecker extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = ""; + $this->addDescription( 'Find and fix pages affected by namespace addition/removal' ); $this->addOption( 'fix', 'Attempt to automatically fix errors' ); $this->addOption( 'merge', "Instead of renaming conflicts, do a history merge with " . "the correct title" ); diff --git a/maintenance/nukeNS.php b/maintenance/nukeNS.php index 0f2dbf64ff..8b45e57b9c 100644 --- a/maintenance/nukeNS.php +++ b/maintenance/nukeNS.php @@ -44,7 +44,7 @@ require_once __DIR__ . '/Maintenance.php'; class NukeNS extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Remove pages with only 1 revision from any namespace"; + $this->addDescription( 'Remove pages with only 1 revision from any namespace' ); $this->addOption( 'delete', "Actually delete the page" ); $this->addOption( 'ns', 'Namespace to delete from, default NS_MEDIAWIKI', false, true ); $this->addOption( 'all', 'Delete everything regardless of revision count' ); diff --git a/maintenance/nukePage.php b/maintenance/nukePage.php index dc45520996..44235d5f07 100644 --- a/maintenance/nukePage.php +++ b/maintenance/nukePage.php @@ -33,7 +33,7 @@ require_once __DIR__ . '/Maintenance.php'; class NukePage extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Remove a page record from the database"; + $this->addDescription( 'Remove a page record from the database' ); $this->addOption( 'delete', "Actually delete the page" ); $this->addArg( 'title', 'Title to delete' ); } diff --git a/maintenance/oracle/alterSharedConstraints.php b/maintenance/oracle/alterSharedConstraints.php index 67e5ded8c6..ba1e8799ae 100644 --- a/maintenance/oracle/alterSharedConstraints.php +++ b/maintenance/oracle/alterSharedConstraints.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/../Maintenance.php'; class AlterSharedConstraints extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Alter foreign key to reference master tables in shared database setup."; + $this->addDescription( 'Alter foreign key to reference master tables in shared database setup.' ); } public function getDbType() { diff --git a/maintenance/orphans.php b/maintenance/orphans.php index 3c5566f615..24ead605c2 100644 --- a/maintenance/orphans.php +++ b/maintenance/orphans.php @@ -39,10 +39,11 @@ require_once __DIR__ . '/Maintenance.php'; class Orphans extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Look for 'orphan' revisions hooked to pages which don't exist\n" . + $this->addDescription( "Look for 'orphan' revisions hooked to pages which don't exist\n" . "and 'childless' pages with no revisions\n" . "Then, kill the poor widows and orphans\n" . - "Man this is depressing"; + "Man this is depressing" + ); $this->addOption( 'fix', 'Actually fix broken entries' ); } diff --git a/maintenance/pageExists.php b/maintenance/pageExists.php index f4143834da..b631005f5f 100644 --- a/maintenance/pageExists.php +++ b/maintenance/pageExists.php @@ -27,7 +27,7 @@ require_once __DIR__ . '/Maintenance.php'; class PageExists extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Report whether a specific page exists"; + $this->addDescription( 'Report whether a specific page exists' ); $this->addArg( 'title', 'Page title to check whether it exists' ); } diff --git a/maintenance/parse.php b/maintenance/parse.php index d6559657cb..effed56dcd 100644 --- a/maintenance/parse.php +++ b/maintenance/parse.php @@ -61,7 +61,7 @@ class CLIParser extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Parse a given wikitext"; + $this->addDescription( 'Parse a given wikitext' ); $this->addOption( 'title', 'Title name for the given wikitext (Default: \'CLIParser\')', diff --git a/maintenance/patchSql.php b/maintenance/patchSql.php index 1f77bdb30c..f94046a617 100644 --- a/maintenance/patchSql.php +++ b/maintenance/patchSql.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class PatchSql extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Run an SQL file into the DB, replacing prefix and charset vars"; + $this->addDescription( 'Run an SQL file into the DB, replacing prefix and charset vars' ); $this->addArg( 'patch-name', 'Name of the patch file, either full path or in maintenance/archives' diff --git a/maintenance/populateBacklinkNamespace.php b/maintenance/populateBacklinkNamespace.php index 054f7921fb..901cdaa762 100644 --- a/maintenance/populateBacklinkNamespace.php +++ b/maintenance/populateBacklinkNamespace.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class PopulateBacklinkNamespace extends LoggedUpdateMaintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Populate the *_from_namespace fields"; + $this->addDescription( 'Populate the *_from_namespace fields' ); $this->addOption( 'lastUpdatedId', "Highest page_id with updated links", false, true ); } diff --git a/maintenance/populateCategory.php b/maintenance/populateCategory.php index 481e07363b..5a8ef90c0c 100644 --- a/maintenance/populateCategory.php +++ b/maintenance/populateCategory.php @@ -35,7 +35,8 @@ class PopulateCategory extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = <<addDescription( + <<addOption( 'begin', 'Only do categories whose names are alphabetically after the provided name', diff --git a/maintenance/populateContentModel.php b/maintenance/populateContentModel.php index 4f9c7ae377..c158cb41ed 100644 --- a/maintenance/populateContentModel.php +++ b/maintenance/populateContentModel.php @@ -30,7 +30,7 @@ require_once __DIR__ . '/Maintenance.php'; class PopulateContentModel extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Populate the various content_* fields'; + $this->addDescription( 'Populate the various content_* fields' ); $this->addOption( 'ns', 'Namespace to run in, or "all" for all namespaces', true, true ); $this->addOption( 'table', 'Table to run in', true, true ); $this->setBatchSize( 100 ); diff --git a/maintenance/populateFilearchiveSha1.php b/maintenance/populateFilearchiveSha1.php index 5a67262b68..24c25b179f 100644 --- a/maintenance/populateFilearchiveSha1.php +++ b/maintenance/populateFilearchiveSha1.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class PopulateFilearchiveSha1 extends LoggedUpdateMaintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Populate the fa_sha1 field from fa_storage_key"; + $this->addDescription( 'Populate the fa_sha1 field from fa_storage_key' ); } protected function getUpdateKey() { diff --git a/maintenance/populateImageSha1.php b/maintenance/populateImageSha1.php index cc52239f31..51cc72ad2a 100644 --- a/maintenance/populateImageSha1.php +++ b/maintenance/populateImageSha1.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class PopulateImageSha1 extends LoggedUpdateMaintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Populate the img_sha1 field"; + $this->addDescription( 'Populate the img_sha1 field' ); $this->addOption( 'force', "Recalculate sha1 for rows that already have a value" ); $this->addOption( 'multiversiononly', "Calculate only for files with several versions" ); $this->addOption( 'method', "Use 'pipe' to pipe to mysql command line,\n" . diff --git a/maintenance/populateLogSearch.php b/maintenance/populateLogSearch.php index 4c1a72e81c..41c3bc94ac 100644 --- a/maintenance/populateLogSearch.php +++ b/maintenance/populateLogSearch.php @@ -40,7 +40,7 @@ class PopulateLogSearch extends LoggedUpdateMaintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Migrate log params to new table and index for searching"; + $this->addDescription( 'Migrate log params to new table and index for searching' ); $this->setBatchSize( 100 ); } diff --git a/maintenance/populateLogUsertext.php b/maintenance/populateLogUsertext.php index 60329c0339..ec3c4722cb 100644 --- a/maintenance/populateLogUsertext.php +++ b/maintenance/populateLogUsertext.php @@ -35,7 +35,7 @@ require_once __DIR__ . '/Maintenance.php'; class PopulateLogUsertext extends LoggedUpdateMaintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Populates the log_user_text field"; + $this->addDescription( 'Populates the log_user_text field' ); $this->setBatchSize( 100 ); } diff --git a/maintenance/populateParentId.php b/maintenance/populateParentId.php index 9baf28e6d1..beb8cc8a36 100644 --- a/maintenance/populateParentId.php +++ b/maintenance/populateParentId.php @@ -34,7 +34,7 @@ require_once __DIR__ . '/Maintenance.php'; class PopulateParentId extends LoggedUpdateMaintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Populates rev_parent_id"; + $this->addDescription( 'Populates rev_parent_id' ); } protected function getUpdateKey() { diff --git a/maintenance/populateRecentChangesSource.php b/maintenance/populateRecentChangesSource.php index 25a51d7213..452d2135c6 100644 --- a/maintenance/populateRecentChangesSource.php +++ b/maintenance/populateRecentChangesSource.php @@ -32,8 +32,8 @@ require_once __DIR__ . '/Maintenance.php'; class PopulateRecentChangesSource extends LoggedUpdateMaintenance { public function __construct() { parent::__construct(); - $this->mDescription = - "Populates rc_source field of the recentchanges table with the data in rc_type."; + $this->addDescription( + 'Populates rc_source field of the recentchanges table with the data in rc_type.' ); $this->setBatchSize( 100 ); } diff --git a/maintenance/populateRevisionLength.php b/maintenance/populateRevisionLength.php index a9fb394ad1..297bed242e 100644 --- a/maintenance/populateRevisionLength.php +++ b/maintenance/populateRevisionLength.php @@ -33,7 +33,7 @@ require_once __DIR__ . '/Maintenance.php'; class PopulateRevisionLength extends LoggedUpdateMaintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Populates the rev_len and ar_len fields"; + $this->addDescription( 'Populates the rev_len and ar_len fields' ); $this->setBatchSize( 200 ); } diff --git a/maintenance/populateRevisionSha1.php b/maintenance/populateRevisionSha1.php index 43504b1aed..3aff77ed91 100644 --- a/maintenance/populateRevisionSha1.php +++ b/maintenance/populateRevisionSha1.php @@ -33,7 +33,7 @@ require_once __DIR__ . '/Maintenance.php'; class PopulateRevisionSha1 extends LoggedUpdateMaintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Populates the rev_sha1 and ar_sha1 fields"; + $this->addDescription( 'Populates the rev_sha1 and ar_sha1 fields' ); $this->setBatchSize( 200 ); } diff --git a/maintenance/protect.php b/maintenance/protect.php index 449a7ad6f0..4a3148ad71 100644 --- a/maintenance/protect.php +++ b/maintenance/protect.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class Protect extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Protect or unprotect a page from the command line."; + $this->addDescription( 'Protect or unprotect a page from the command line.' ); $this->addOption( 'unprotect', 'Removes protection' ); $this->addOption( 'semiprotect', 'Adds semi-protection' ); $this->addOption( 'cascade', 'Add cascading protection' ); diff --git a/maintenance/pruneFileCache.php b/maintenance/pruneFileCache.php index 455e9c07c9..8e6978d562 100644 --- a/maintenance/pruneFileCache.php +++ b/maintenance/pruneFileCache.php @@ -34,7 +34,7 @@ class PruneFileCache extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Build file cache for content pages"; + $this->addDescription( 'Build file cache for content pages' ); $this->addOption( 'agedays', 'How many days old files must be in order to delete', true, true ); $this->addOption( 'subdir', 'Prune one $wgFileCacheDirectory subdirectory name', false, true ); } diff --git a/maintenance/purgeChangedFiles.php b/maintenance/purgeChangedFiles.php index b98e95f4b6..4f10b6ecc7 100644 --- a/maintenance/purgeChangedFiles.php +++ b/maintenance/purgeChangedFiles.php @@ -61,7 +61,7 @@ class PurgeChangedFiles extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Scan the logging table and purge files and thumbnails."; + $this->addDescription( 'Scan the logging table and purge files and thumbnails.' ); $this->addOption( 'starttime', 'Starting timestamp', true, true ); $this->addOption( 'endtime', 'Ending timestamp', true, true ); $this->addOption( 'type', 'Comma-separated list of types of changes to send purges for (' . diff --git a/maintenance/purgeChangedPages.php b/maintenance/purgeChangedPages.php index 31500c9ce0..cb4f85d382 100644 --- a/maintenance/purgeChangedPages.php +++ b/maintenance/purgeChangedPages.php @@ -36,7 +36,7 @@ class PurgeChangedPages extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Send purge requests for edits in date range to squid/varnish'; + $this->addDescription( 'Send purge requests for edits in date range to squid/varnish' ); $this->addOption( 'starttime', 'Starting timestamp', true, true ); $this->addOption( 'endtime', 'Ending timestamp', true, true ); $this->addOption( 'htcp-dest', 'HTCP announcement destination (IP:port)', false, true ); diff --git a/maintenance/purgeList.php b/maintenance/purgeList.php index 9963cbf64d..a733d67ba5 100644 --- a/maintenance/purgeList.php +++ b/maintenance/purgeList.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class PurgeList extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Send purge requests for listed pages to squid"; + $this->addDescription( 'Send purge requests for listed pages to squid' ); $this->addOption( 'purge', 'Whether to update page_touched.', false, false ); $this->addOption( 'namespace', 'Namespace number', false, true ); $this->addOption( 'all', 'Purge all pages', false, false ); diff --git a/maintenance/purgeOldText.php b/maintenance/purgeOldText.php index 3d81e2dfaf..1b78c7d9d7 100644 --- a/maintenance/purgeOldText.php +++ b/maintenance/purgeOldText.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class PurgeOldText extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Purge old text records from the database"; + $this->addDescription( 'Purge old text records from the database' ); $this->addOption( 'purge', 'Performs the deletion' ); } diff --git a/maintenance/reassignEdits.php b/maintenance/reassignEdits.php index e68937acbe..4d3baaf2c8 100644 --- a/maintenance/reassignEdits.php +++ b/maintenance/reassignEdits.php @@ -34,7 +34,7 @@ require_once __DIR__ . '/Maintenance.php'; class ReassignEdits extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Reassign edits from one user to another"; + $this->addDescription( 'Reassign edits from one user to another' ); $this->addOption( "force", "Reassign even if the target user doesn't exist" ); $this->addOption( "norc", "Don't update the recent changes table" ); $this->addOption( "report", "Print out details of what would be changed, but don't update it" ); diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php index e07bf03865..21cd3a1e05 100644 --- a/maintenance/rebuildFileCache.php +++ b/maintenance/rebuildFileCache.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class RebuildFileCache extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Build file cache for content pages"; + $this->addDescription( 'Build file cache for content pages' ); $this->addOption( 'start', 'Page_id to start from', false, true ); $this->addOption( 'end', 'Page_id to end on', false, true ); $this->addOption( 'overwrite', 'Refresh page cache' ); diff --git a/maintenance/rebuildImages.php b/maintenance/rebuildImages.php index 1b0a27df66..521ab54f43 100644 --- a/maintenance/rebuildImages.php +++ b/maintenance/rebuildImages.php @@ -51,7 +51,7 @@ class ImageBuilder extends Maintenance { // make sure to update old, but compatible img_metadata fields. $wgUpdateCompatibleMetadata = true; - $this->mDescription = 'Script to update image metadata records'; + $this->addDescription( 'Script to update image metadata records' ); $this->addOption( 'missing', 'Check for files without associated database record' ); $this->addOption( 'dry-run', 'Only report, don\'t update the database' ); diff --git a/maintenance/rebuildLocalisationCache.php b/maintenance/rebuildLocalisationCache.php index f89877eabb..36caa3a884 100644 --- a/maintenance/rebuildLocalisationCache.php +++ b/maintenance/rebuildLocalisationCache.php @@ -39,7 +39,7 @@ require_once __DIR__ . '/Maintenance.php'; class RebuildLocalisationCache extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Rebuild the localisation cache"; + $this->addDescription( 'Rebuild the localisation cache' ); $this->addOption( 'force', 'Rebuild all files, even ones not out of date' ); $this->addOption( 'threads', 'Fork more than one thread', false, true ); $this->addOption( 'outdir', 'Override the output directory (normally $wgCacheDirectory)', diff --git a/maintenance/rebuildSitesCache.php b/maintenance/rebuildSitesCache.php index 2bc751081a..044bafd431 100644 --- a/maintenance/rebuildSitesCache.php +++ b/maintenance/rebuildSitesCache.php @@ -32,7 +32,7 @@ class RebuildSitesCache extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Cache sites as json for file-based lookup."; + $this->addDescription( 'Cache sites as json for file-based lookup.' ); $this->addOption( 'file', 'File to output the json to', false, true ); } diff --git a/maintenance/rebuildall.php b/maintenance/rebuildall.php index 4ff873e9c6..d2ee6fc2ad 100644 --- a/maintenance/rebuildall.php +++ b/maintenance/rebuildall.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class RebuildAll extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Rebuild links, text index and recent changes"; + $this->addDescription( 'Rebuild links, text index and recent changes' ); } public function getDbType() { diff --git a/maintenance/rebuildmessages.php b/maintenance/rebuildmessages.php index f223f1abf5..3b40556301 100644 --- a/maintenance/rebuildmessages.php +++ b/maintenance/rebuildmessages.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class RebuildMessages extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Purge all language messages from the cache"; + $this->addDescription( 'Purge all language messages from the cache' ); } public function execute() { diff --git a/maintenance/rebuildrecentchanges.php b/maintenance/rebuildrecentchanges.php index 34560fd4cb..d61906cfaa 100644 --- a/maintenance/rebuildrecentchanges.php +++ b/maintenance/rebuildrecentchanges.php @@ -33,7 +33,7 @@ require_once __DIR__ . '/Maintenance.php'; class RebuildRecentchanges extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Rebuild recent changes"; + $this->addDescription( 'Rebuild recent changes' ); } public function execute() { diff --git a/maintenance/rebuildtextindex.php b/maintenance/rebuildtextindex.php index e8d59bc4bc..dff734b342 100644 --- a/maintenance/rebuildtextindex.php +++ b/maintenance/rebuildtextindex.php @@ -42,7 +42,7 @@ class RebuildTextIndex extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Rebuild search index table from scratch"; + $this->addDescription( 'Rebuild search index table from scratch' ); } public function getDbType() { diff --git a/maintenance/refreshFileHeaders.php b/maintenance/refreshFileHeaders.php index 6bc72ec838..3f1b16782f 100644 --- a/maintenance/refreshFileHeaders.php +++ b/maintenance/refreshFileHeaders.php @@ -34,7 +34,7 @@ require_once __DIR__ . '/Maintenance.php'; class RefreshFileHeaders extends Maintenance { function __construct() { parent::__construct(); - $this->mDescription = 'Script to update file HTTP headers'; + $this->addDescription( 'Script to update file HTTP headers' ); $this->addOption( 'verbose', 'Output information about each file.', false, false, 'v' ); $this->addOption( 'start', 'Name of file to start with', false, true ); $this->addOption( 'end', 'Name of file to end with', false, true ); diff --git a/maintenance/refreshImageMetadata.php b/maintenance/refreshImageMetadata.php index 4f2341ce01..01fb15eb92 100644 --- a/maintenance/refreshImageMetadata.php +++ b/maintenance/refreshImageMetadata.php @@ -44,7 +44,7 @@ class RefreshImageMetadata extends Maintenance { function __construct() { parent::__construct(); - $this->mDescription = 'Script to update image metadata records'; + $this->addDescription( 'Script to update image metadata records' ); $this->setBatchSize( 200 ); $this->addOption( diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php index 1159e5394c..651255b732 100644 --- a/maintenance/refreshLinks.php +++ b/maintenance/refreshLinks.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class RefreshLinks extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Refresh link tables"; + $this->addDescription( 'Refresh link tables' ); $this->addOption( 'dfn-only', 'Delete links from nonexistent articles only' ); $this->addOption( 'new-only', 'Only affect articles with just a single edit' ); $this->addOption( 'redirects-only', 'Only fix redirects, not all links' ); diff --git a/maintenance/renderDump.php b/maintenance/renderDump.php index 2218a5e7a3..09b1b1c1ea 100644 --- a/maintenance/renderDump.php +++ b/maintenance/renderDump.php @@ -43,7 +43,8 @@ class DumpRenderer extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Take page text out of an XML dump file and render basic HTML out to files"; + $this->addDescription( + 'Take page text out of an XML dump file and render basic HTML out to files' ); $this->addOption( 'output-dir', 'The directory to output the HTML files to', true, true ); $this->addOption( 'prefix', 'Prefix for the rendered files (defaults to wiki)', false, true ); $this->addOption( 'parser', 'Use an alternative parser class', false, true ); diff --git a/maintenance/resetUserTokens.php b/maintenance/resetUserTokens.php index 9c7aef29db..7acf9759a1 100644 --- a/maintenance/resetUserTokens.php +++ b/maintenance/resetUserTokens.php @@ -34,8 +34,9 @@ require_once __DIR__ . '/Maintenance.php'; class ResetUserTokens extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = - "Reset the user_token of all users on the wiki. Note that this may log some of them out."; + $this->addDescription( + 'Reset the user_token of all users on the wiki. Note that this may log some of them out.' + ); $this->addOption( 'nowarn', "Hides the 5 seconds warning", false, false ); $this->addOption( 'nulls', diff --git a/maintenance/rollbackEdits.php b/maintenance/rollbackEdits.php index 7134453570..a2ddb93379 100644 --- a/maintenance/rollbackEdits.php +++ b/maintenance/rollbackEdits.php @@ -33,8 +33,8 @@ require_once __DIR__ . '/Maintenance.php'; class RollbackEdits extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = - "Rollback all edits by a given user or IP provided they're the most recent edit"; + $this->addDescription( + "Rollback all edits by a given user or IP provided they're the most recent edit" ); $this->addOption( 'titles', 'A list of titles, none means all titles where the given user is the most recent', diff --git a/maintenance/runBatchedQuery.php b/maintenance/runBatchedQuery.php index 3fd9e02bac..2feae02eca 100644 --- a/maintenance/runBatchedQuery.php +++ b/maintenance/runBatchedQuery.php @@ -33,9 +33,9 @@ require_once __DIR__ . '/Maintenance.php'; class BatchedQueryRunner extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = + $this->addDescription( "Run a query repeatedly until it affects 0 rows, and wait for slaves in between.\n" . - "NOTE: You need to set a LIMIT clause yourself."; + "NOTE: You need to set a LIMIT clause yourself." ); } public function execute() { diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php index 3c5d28be9f..86cade293d 100644 --- a/maintenance/runJobs.php +++ b/maintenance/runJobs.php @@ -33,7 +33,7 @@ use MediaWiki\Logger\LoggerFactory; class RunJobs extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Run pending jobs"; + $this->addDescription( 'Run pending jobs' ); $this->addOption( 'maxjobs', 'Maximum number of jobs to run', false, true ); $this->addOption( 'maxtime', 'Maximum amount of wall-clock time', false, true ); $this->addOption( 'type', 'Type of job to run', false, true ); diff --git a/maintenance/showJobs.php b/maintenance/showJobs.php index 25a096c048..992c238d2d 100644 --- a/maintenance/showJobs.php +++ b/maintenance/showJobs.php @@ -43,7 +43,7 @@ class ShowJobs extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Show number of jobs waiting in master database"; + $this->addDescription( 'Show number of jobs waiting in master database' ); $this->addOption( 'group', 'Show number of jobs per job type' ); $this->addOption( 'list', 'Show a list of all jobs instead of counts' ); $this->addOption( 'type', 'Only show/count jobs of a given type', false, true ); diff --git a/maintenance/showSiteStats.php b/maintenance/showSiteStats.php index 56cc5737b8..098aba56c4 100644 --- a/maintenance/showSiteStats.php +++ b/maintenance/showSiteStats.php @@ -39,7 +39,7 @@ require_once __DIR__ . '/Maintenance.php'; class ShowSiteStats extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Show the cached statistics"; + $this->addDescription( 'Show the cached statistics' ); } public function execute() { diff --git a/maintenance/sql.php b/maintenance/sql.php index a93e51fe5a..f0899729b9 100644 --- a/maintenance/sql.php +++ b/maintenance/sql.php @@ -32,8 +32,8 @@ require_once __DIR__ . '/Maintenance.php'; class MwSql extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Send SQL queries to a MediaWiki database. " . - "Takes a file name containing SQL as argument or runs interactively."; + $this->addDescription( 'Send SQL queries to a MediaWiki database. ' . + 'Takes a file name containing SQL as argument or runs interactively.' ); $this->addOption( 'query', 'Run a single query instead of running interactively', false, true ); $this->addOption( 'cluster', 'Use an external cluster by name', false, true ); $this->addOption( 'wikidb', 'The database wiki ID to use if not the current one', false, true ); diff --git a/maintenance/sqlite.php b/maintenance/sqlite.php index 96a8a380a8..5cc35edc55 100644 --- a/maintenance/sqlite.php +++ b/maintenance/sqlite.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class SqliteMaintenance extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Performs some operations specific to SQLite database backend"; + $this->addDescription( 'Performs some operations specific to SQLite database backend' ); $this->addOption( 'vacuum', 'Clean up database by removing deleted pages. Decreases database file size' diff --git a/maintenance/storage/compressOld.php b/maintenance/storage/compressOld.php index b27b111e18..dd3ba04894 100644 --- a/maintenance/storage/compressOld.php +++ b/maintenance/storage/compressOld.php @@ -63,7 +63,7 @@ class CompressOld extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Compress the text of a wiki'; + $this->addDescription( 'Compress the text of a wiki' ); $this->addOption( 'type', 'Set compression type to either: gzip|concat', false, true, 't' ); $this->addOption( 'chunksize', diff --git a/maintenance/storage/fixBug20757.php b/maintenance/storage/fixBug20757.php index e926f56bae..d353b8883b 100644 --- a/maintenance/storage/fixBug20757.php +++ b/maintenance/storage/fixBug20757.php @@ -36,7 +36,7 @@ class FixBug20757 extends Maintenance { function __construct() { parent::__construct(); - $this->mDescription = 'Script to fix bug 20757 assuming that blob_tracking is intact'; + $this->addDescription( 'Script to fix bug 20757 assuming that blob_tracking is intact' ); $this->addOption( 'dry-run', 'Report only' ); $this->addOption( 'start', 'old_id to start at', false, true ); } diff --git a/maintenance/storage/orphanStats.php b/maintenance/storage/orphanStats.php index b1bf95b42b..21f50f5cb5 100644 --- a/maintenance/storage/orphanStats.php +++ b/maintenance/storage/orphanStats.php @@ -32,8 +32,8 @@ require_once __DIR__ . '/../Maintenance.php'; class OrphanStats extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = - "Show some statistics on the blob_orphans table, created with trackBlobs.php"; + $this->addDescription( + "Show some statistics on the blob_orphans table, created with trackBlobs.php" ); } protected function &getDB( $cluster, $groups = array(), $wiki = false ) { diff --git a/maintenance/syncFileBackend.php b/maintenance/syncFileBackend.php index 63d5e9f889..c0663a7931 100644 --- a/maintenance/syncFileBackend.php +++ b/maintenance/syncFileBackend.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class SyncFileBackend extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Sync one file backend with another using the journal"; + $this->addDescription( 'Sync one file backend with another using the journal' ); $this->addOption( 'src', 'Name of backend to sync from', true, true ); $this->addOption( 'dst', 'Name of destination backend to sync', false, true ); $this->addOption( 'start', 'Starting journal ID', false, true ); diff --git a/maintenance/undelete.php b/maintenance/undelete.php index 71b4de1e40..861f5ed06c 100644 --- a/maintenance/undelete.php +++ b/maintenance/undelete.php @@ -26,7 +26,7 @@ require_once __DIR__ . '/Maintenance.php'; class Undelete extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Undelete a page"; + $this->addDescription( 'Undelete a page' ); $this->addOption( 'user', 'The user to perform the undeletion', false, true, 'u' ); $this->addOption( 'reason', 'The reason to undelete', false, true, 'r' ); $this->addArg( 'pagename', 'Page to undelete' ); diff --git a/maintenance/update.php b/maintenance/update.php index eeaf9c83b0..06e947cb5f 100755 --- a/maintenance/update.php +++ b/maintenance/update.php @@ -36,7 +36,7 @@ require_once __DIR__ . '/Maintenance.php'; class UpdateMediaWiki extends Maintenance { function __construct() { parent::__construct(); - $this->mDescription = "MediaWiki database updater"; + $this->addDescription( 'MediaWiki database updater' ); $this->addOption( 'skip-compat-checks', 'Skips compatibility checks, mostly for developers' ); $this->addOption( 'quick', 'Skip 5 second countdown before starting' ); $this->addOption( 'doshared', 'Also update shared tables' ); diff --git a/maintenance/updateArticleCount.php b/maintenance/updateArticleCount.php index 9537a79515..baba6c8d12 100644 --- a/maintenance/updateArticleCount.php +++ b/maintenance/updateArticleCount.php @@ -35,7 +35,7 @@ class UpdateArticleCount extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Count of the number of articles and update the site statistics table"; + $this->addDescription( 'Count of the number of articles and update the site statistics table' ); $this->addOption( 'update', 'Update the site_stats table with the new count' ); $this->addOption( 'use-master', 'Count using the master database' ); } diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php index bd75b3b666..37c9948b24 100644 --- a/maintenance/updateCollation.php +++ b/maintenance/updateCollation.php @@ -42,12 +42,13 @@ class UpdateCollation extends Maintenance { parent::__construct(); global $wgCategoryCollation; - $this->mDescription = <<addDescription( <<addOption( 'force', 'Run on all rows, even if the collation is ' . 'supposed to be up-to-date.' ); diff --git a/maintenance/updateDoubleWidthSearch.php b/maintenance/updateDoubleWidthSearch.php index 5c21b40eb4..f5bb881091 100644 --- a/maintenance/updateDoubleWidthSearch.php +++ b/maintenance/updateDoubleWidthSearch.php @@ -34,7 +34,7 @@ class UpdateDoubleWidthSearch extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Script to normalize double-byte latin UTF-8 characters"; + $this->addDescription( 'Script to normalize double-byte latin UTF-8 characters' ); $this->addOption( 'q', 'quiet', false, true ); $this->addOption( 'l', diff --git a/maintenance/updateRestrictions.php b/maintenance/updateRestrictions.php index ebfffe4d8a..98d9389f9f 100644 --- a/maintenance/updateRestrictions.php +++ b/maintenance/updateRestrictions.php @@ -35,7 +35,7 @@ require_once __DIR__ . '/Maintenance.php'; class UpdateRestrictions extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Updates page_restrictions table from old page_restriction column"; + $this->addDescription( 'Updates page_restrictions table from old page_restriction column' ); $this->setBatchSize( 100 ); } diff --git a/maintenance/updateSearchIndex.php b/maintenance/updateSearchIndex.php index 18edecceae..b2f25774a8 100644 --- a/maintenance/updateSearchIndex.php +++ b/maintenance/updateSearchIndex.php @@ -39,7 +39,7 @@ class UpdateSearchIndex extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Script for periodic off-peak updating of the search index"; + $this->setDescription( 'Script for periodic off-peak updating of the search index' ); $this->addOption( 's', 'starting timestamp', false, true ); $this->addOption( 'e', 'Ending timestamp', false, true ); $this->addOption( diff --git a/maintenance/wrapOldPasswords.php b/maintenance/wrapOldPasswords.php index e0c10f8201..2534ca61dc 100644 --- a/maintenance/wrapOldPasswords.php +++ b/maintenance/wrapOldPasswords.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class WrapOldPasswords extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Wrap all passwords of a certain type in a new layered type"; + $this->addDescription( 'Wrap all passwords of a certain type in a new layered type' ); $this->addOption( 'type', 'Password type to wrap passwords in (must inherit LayeredParameterizedPassword)', true, true ); $this->addOption( 'verbose', 'Enables verbose output', false, false, 'v' ); -- 2.20.1