Use addDescription() instead of accessing mDescription directly
authorMax Semenik <maxsem.wiki@gmail.com>
Sat, 30 Jan 2016 02:48:47 +0000 (18:48 -0800)
committerMax Semenik <maxsem.wiki@gmail.com>
Sat, 30 Jan 2016 09:28:32 +0000 (01:28 -0800)
Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103

154 files changed:
maintenance/Maintenance.php
maintenance/attachLatest.php
maintenance/benchmarks/bench_HTTP_HTTPS.php
maintenance/benchmarks/bench_Wikimedia_base_convert.php
maintenance/benchmarks/bench_delete_truncate.php
maintenance/benchmarks/bench_if_switch.php
maintenance/benchmarks/bench_strtr_str_replace.php
maintenance/benchmarks/bench_utf8_title_check.php
maintenance/benchmarks/bench_wfIsWindows.php
maintenance/benchmarks/benchmarkHooks.php
maintenance/benchmarks/benchmarkPurge.php
maintenance/changePassword.php
maintenance/checkBadRedirects.php
maintenance/checkComposerLockUpToDate.php
maintenance/checkImages.php
maintenance/checkLess.php
maintenance/checkSyntax.php
maintenance/checkUsernames.php
maintenance/cleanupAncientTables.php
maintenance/cleanupBlocks.php
maintenance/cleanupCaps.php
maintenance/cleanupImages.php
maintenance/cleanupRemovedModules.php
maintenance/cleanupSpam.php
maintenance/cleanupTitles.php
maintenance/cleanupUploadStash.php
maintenance/cleanupWatchlist.php
maintenance/clearInterwikiCache.php
maintenance/compareParserCache.php
maintenance/compareParsers.php
maintenance/convertExtensionToRegistration.php
maintenance/convertLinks.php
maintenance/convertUserOptions.php
maintenance/copyFileBackend.php
maintenance/copyJobQueue.php
maintenance/createAndPromote.php
maintenance/createCommonPasswordCdb.php
maintenance/deleteArchivedFiles.php
maintenance/deleteArchivedRevisions.php
maintenance/deleteBatch.php
maintenance/deleteDefaultMessages.php
maintenance/deleteEqualMessages.php
maintenance/deleteOldRevisions.php
maintenance/deleteOrphanedRevisions.php
maintenance/deleteRevision.php
maintenance/deleteSelfExternals.php
maintenance/dumpBackup.php
maintenance/dumpIterator.php
maintenance/dumpLinks.php
maintenance/dumpTextPass.php
maintenance/dumpUploads.php
maintenance/edit.php
maintenance/eraseArchivedFile.php
maintenance/exportSites.php
maintenance/fetchText.php
maintenance/fileOpPerfTest.php
maintenance/findDeprecated.php
maintenance/findHooks.php
maintenance/findMissingFiles.php
maintenance/findOrphanedFiles.php
maintenance/fixDefaultJsonContentPages.php
maintenance/fixDoubleRedirects.php
maintenance/fixExtLinksProtocolRelative.php
maintenance/fixTimestamps.php
maintenance/fixUserRegistration.php
maintenance/generateJsonI18n.php
maintenance/generateSitemap.php
maintenance/getConfiguration.php
maintenance/getLagTimes.php
maintenance/getSlaveServer.php
maintenance/getText.php
maintenance/importDump.php
maintenance/importSiteScripts.php
maintenance/importSites.php
maintenance/importTextFiles.php
maintenance/initEditCount.php
maintenance/initSiteStats.php
maintenance/jsparse.php
maintenance/lag.php
maintenance/language/alltrans.php
maintenance/language/date-formats.php
maintenance/language/digit2html.php
maintenance/language/dumpMessages.php
maintenance/language/generateNormalizerDataAr.php
maintenance/language/generateNormalizerDataMl.php
maintenance/language/generateUtf8Case.php
maintenance/language/langmemusage.php
maintenance/language/listVariants.php
maintenance/makeTestEdits.php
maintenance/mctest.php
maintenance/mergeMessageFileList.php
maintenance/migrateFileRepoLayout.php
maintenance/migrateUserGroup.php
maintenance/minify.php
maintenance/moveBatch.php
maintenance/mwdocgen.php
maintenance/namespaceDupes.php
maintenance/nukeNS.php
maintenance/nukePage.php
maintenance/oracle/alterSharedConstraints.php
maintenance/orphans.php
maintenance/pageExists.php
maintenance/parse.php
maintenance/patchSql.php
maintenance/populateBacklinkNamespace.php
maintenance/populateCategory.php
maintenance/populateContentModel.php
maintenance/populateFilearchiveSha1.php
maintenance/populateImageSha1.php
maintenance/populateLogSearch.php
maintenance/populateLogUsertext.php
maintenance/populateParentId.php
maintenance/populateRecentChangesSource.php
maintenance/populateRevisionLength.php
maintenance/populateRevisionSha1.php
maintenance/protect.php
maintenance/pruneFileCache.php
maintenance/purgeChangedFiles.php
maintenance/purgeChangedPages.php
maintenance/purgeList.php
maintenance/purgeOldText.php
maintenance/reassignEdits.php
maintenance/rebuildFileCache.php
maintenance/rebuildImages.php
maintenance/rebuildLocalisationCache.php
maintenance/rebuildSitesCache.php
maintenance/rebuildall.php
maintenance/rebuildmessages.php
maintenance/rebuildrecentchanges.php
maintenance/rebuildtextindex.php
maintenance/refreshFileHeaders.php
maintenance/refreshImageMetadata.php
maintenance/refreshLinks.php
maintenance/renderDump.php
maintenance/resetUserTokens.php
maintenance/rollbackEdits.php
maintenance/runBatchedQuery.php
maintenance/runJobs.php
maintenance/showJobs.php
maintenance/showSiteStats.php
maintenance/sql.php
maintenance/sqlite.php
maintenance/storage/compressOld.php
maintenance/storage/fixBug20757.php
maintenance/storage/orphanStats.php
maintenance/syncFileBackend.php
maintenance/undelete.php
maintenance/update.php
maintenance/updateArticleCount.php
maintenance/updateCollation.php
maintenance/updateDoubleWidthSearch.php
maintenance/updateRestrictions.php
maintenance/updateSearchIndex.php
maintenance/wrapOldPasswords.php

index 291920b..5a7f769 100644 (file)
@@ -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?
index a2ea554..deab60b 100644 (file)
@@ -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() {
index 1569234..40a877f 100644 (file)
@@ -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() {
index 810937a..439947d 100644 (file)
@@ -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 );
index 572c548..9acb93a 100644 (file)
@@ -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() {
index 698a0f0..8f7f61d 100644 (file)
@@ -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() {
index 44c8e03..f34d27f 100644 (file)
@@ -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() {
index b742f66..bd18adb 100644 (file)
@@ -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.' );
                }
        }
 
index 8446694..ea919ef 100644 (file)
@@ -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() {
index 1446871..3106f89 100644 (file)
@@ -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() {
index 9eca73c..e67d226 100644 (file)
@@ -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() {
index 5d98e1f..8687f81 100644 (file)
@@ -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() {
index 500fc35..985df56 100644 (file)
@@ -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() {
index 7a85d64..9ec61dc 100644 (file)
@@ -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() {
index 9761927..9a8203f 100644 (file)
@@ -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 );
        }
 
index 2f533cf..889c903 100644 (file)
@@ -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() {
index 30a23d3..4821e04 100644 (file)
@@ -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',
index 6f4d170..1b9a1cc 100644 (file)
@@ -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 );
        }
 
index f1467d5..7f67b60 100644 (file)
@@ -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' );
        }
 
index 437abe9..2efd7ab 100644 (file)
@@ -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 );
        }
 
index e0a0f49..a79c2d3 100644 (file)
@@ -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 );
        }
 
index ab2d808..0110685 100644 (file)
@@ -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 ) {
index 810fad9..19949bc 100644 (file)
@@ -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 );
        }
 
index b43ce81..020f5cd 100644 (file)
@@ -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(
index 07df1b1..574d5bd 100644 (file)
@@ -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' );
        }
 
        /**
index 70490e1..480059d 100644 (file)
@@ -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 );
        }
 
index 16f7b61..d8c682b 100644 (file)
@@ -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.' );
        }
 
index 6a6527f..4b5773c 100644 (file)
@@ -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() {
index 98441b6..e5f0bb3 100644 (file)
@@ -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 );
        }
index e67c439..f2540c7 100644 (file)
@@ -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 );
index 3113533..eeb2e6d 100644 (file)
@@ -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 );
index 15ca14b..fa9c574 100644 (file)
@@ -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(
index 11768c8..c245a1e 100644 (file)
@@ -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 );
        }
 
index b39ff55..25073f7 100644 (file)
@@ -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 );
index a9c9547..42c2dd4 100644 (file)
@@ -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 );
index c1a2022..e7d666a 100644 (file)
@@ -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.'
index c678712..87e7e08 100644 (file)
@@ -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(
index 94ebf87..92f1a91 100644 (file)
@@ -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' );
        }
index 9924eb0..2fb83fc 100644 (file)
@@ -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' );
        }
 
index 6c89e67..e8839c5 100644 (file)
@@ -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" );
index a5c6199..7e1d315 100644 (file)
@@ -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() {
index e7bb866..f21f3e1 100644 (file)
@@ -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 '
index f411148..123163f 100644 (file)
@@ -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 );
        }
index 3d5c1a4..5f08b5a 100644 (file)
@@ -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' );
        }
 
index 6cda784..4606d92 100644 (file)
@@ -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() {
index f9bb416..ed15fd1 100644 (file)
@@ -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;
        }
 
index 18737a4..1904325 100644 (file)
@@ -31,7 +31,7 @@ class DumpBackup extends BackupDumper {
        function __construct( $args = null ) {
                parent::__construct();
 
-               $this->mDescription = <<<TEXT
+               $this->addDescription( <<<TEXT
 This script dumps the wiki page or logging database into an
 XML interchange wrapper format for export or backup.
 
@@ -40,7 +40,8 @@ XML output is sent to stdout; progress reports are sent to stderr.
 WARNING: this is not a full database dump! It is merely for public export
          of your wiki. For full backup, see our online help at:
          https://www.mediawiki.org/wiki/Backup
-TEXT;
+TEXT
+               );
                $this->stderr = fopen( "php://stderr", "wt" );
                // Actions
                $this->addOption( 'full', 'Dump all revisions of every page' );
index d8bc3a4..eef535a 100644 (file)
@@ -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 );
        }
 
index 74b500a..7139786 100644 (file)
@@ -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() {
index 7511392..8169ef5 100644 (file)
@@ -93,13 +93,14 @@ class TextPassDumper extends BackupDumper {
        function __construct( $args = null ) {
                parent::__construct();
 
-               $this->mDescription = <<<TEXT
+               $this->addDescription( <<<TEXT
 This script postprocesses XML dumps from dumpBackup.php to add
 page text which was stubbed out (using --stub).
 
 XML input is accepted on stdin.
 XML output is sent to stdout; progress reports are sent to stderr.
-TEXT;
+TEXT
+               );
                $this->stderr = fopen( "php://stderr", "wt" );
 
                $this->addOption( 'stub', 'To load a compressed stub dump instead of stdin. ' .
index 026ac02..64884d5 100644 (file)
@@ -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' );
index b67a957..fc83a91 100644 (file)
@@ -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' );
index 69a95e2..2fcdd14 100644 (file)
@@ -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 );
index 145c924..157a323 100644 (file)
@@ -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
index cf12838..989e90a 100644 (file)
@@ -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"
+               );
        }
 
        /**
index 9dba818..feb927e 100644 (file)
@@ -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 );
index 8c7e242..9022292 100644 (file)
@@ -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() {
index f9c61c7..1cf818e 100644 (file)
@@ -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' );
        }
 
index 5818ee2..2fad7ce 100644 (file)
@@ -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 );
index 41650bd..2362957 100644 (file)
@@ -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" );
index 25ec342..18334d6 100644 (file)
@@ -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 );
        }
 
index ca551f8..8faca27 100644 (file)
@@ -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' );
index a44f8e5..d04e0c2 100644 (file)
@@ -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() {
index c2a748c..0fb3d38 100644 (file)
@@ -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' );
index d09760b..44ac220 100644 (file)
@@ -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 );
        }
 
index b9c07fb..0b4f2ed 100644 (file)
@@ -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 );
index c40d0ce..256824e 100644 (file)
@@ -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',
index 5838201..b1140ec 100644 (file)
@@ -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 );
index 7365a2e..c2c6958 100644 (file)
@@ -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() {
index c858c38..81228cc 100644 (file)
@@ -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() {
index c4b8cc9..f519a79 100644 (file)
@@ -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' );
        }
index 5806ffc..7c452a6 100644 (file)
@@ -49,7 +49,8 @@ class BackupReader extends Maintenance {
                        ? 'ok'
                        : '(disabled; requires PHP bzip2 module)';
 
-               $this->mDescription = <<<TEXT
+               $this->addDescription(
+                       <<<TEXT
 This script reads pages from an XML file as produced from Special:Export or
 dumpBackup.php, and saves them into the current wiki.
 
@@ -61,7 +62,8 @@ Compressed XML files may be read directly:
 Note that for very large data sets, importDump.php may be slow; there are
 alternate methods which can be much faster for full site restoration:
 <https://www.mediawiki.org/wiki/Manual:Importing_XML_dumps>
-TEXT;
+TEXT
+               );
                $this->stderr = fopen( "php://stderr", "wt" );
                $this->addOption( 'report',
                        'Report position and speed after every n pages processed', false, true );
index 5dfd2a8..366594d 100644 (file)
@@ -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' );
index c5c00aa..8845c60 100644 (file)
@@ -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
index 14d8420..70b6574 100644 (file)
@@ -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' );
index dee5db8..5d0dcc6 100644 (file)
@@ -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() {
index 8d26063..7e62b89 100644 (file)
@@ -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' );
index fddfc02..770251c 100644 (file)
@@ -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 );
        }
 
index 52f8201..9d92794 100644 (file)
@@ -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" );
        }
 
index d0e6e84..931718f 100644 (file)
@@ -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() {
index 1463418..dc275ab 100644 (file)
@@ -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() {
index a6e0456..eddfa26 100644 (file)
@@ -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() {
index a72e25b..5768232 100644 (file)
@@ -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() {
index 52ed81f..722db06 100644 (file)
@@ -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 );
        }
index cb6ae69..412e7ef 100644 (file)
@@ -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() {
index 3520b87..676297e 100644 (file)
@@ -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 );
        }
index 32cfcd7..7c16602 100644 (file)
@@ -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() {
index 4bff891..e8137ba 100644 (file)
@@ -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' );
        }
index c6569a0..ca2f7c5 100644 (file)
@@ -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 );
index a97d2e1..619ada6 100644 (file)
@@ -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 );
index b491497..20b333e 100644 (file)
@@ -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() {
index 68b97e3..77d88f5 100644 (file)
@@ -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 );
index dc20eee..df6665a 100644 (file)
@@ -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 );
index c357eeb..16e4d1c 100644 (file)
@@ -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() {
index 43d4d25..8645ab1 100644 (file)
@@ -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" );
index 00a15e5..35fca8e 100644 (file)
@@ -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',
index 6e5cd38..b59f4a9 100644 (file)
@@ -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" );
index 0f2dbf6..8b45e57 100644 (file)
@@ -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' );
index dc45520..44235d5 100644 (file)
@@ -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' );
        }
index 67e5ded..ba1e879 100644 (file)
@@ -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() {
index 3c5566f..24ead60 100644 (file)
@@ -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' );
        }
 
index f414383..b631005 100644 (file)
@@ -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' );
        }
 
index d655965..effed56 100644 (file)
@@ -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\')',
index 1f77bdb..f94046a 100644 (file)
@@ -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'
index 054f792..901cdaa 100644 (file)
@@ -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 );
        }
 
index 481e073..5a8ef90 100644 (file)
@@ -35,7 +35,8 @@ class PopulateCategory extends Maintenance {
 
        public function __construct() {
                parent::__construct();
-               $this->mDescription = <<<TEXT
+               $this->addDescription(
+                       <<<TEXT
 This script will populate the category table, added in MediaWiki 1.13.  It will
 print out progress indicators every 1000 categories it adds to the table.  The
 script is perfectly safe to run on large, live wikis, and running it multiple
@@ -49,8 +50,9 @@ added after the software update and so will be populated anyway.
 
 When the script has finished, it will make a note of this in the database, and
 will not run again without the --force option.
-TEXT;
-# '
+TEXT
+               );
+
                $this->addOption(
                        'begin',
                        'Only do categories whose names are alphabetically after the provided name',
index 4f9c7ae..c158cb4 100644 (file)
@@ -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 );
index 5a67262..24c25b1 100644 (file)
@@ -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() {
index cc52239..51cc72a 100644 (file)
@@ -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" .
index 4c1a72e..41c3bc9 100644 (file)
@@ -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 );
        }
 
index 60329c0..ec3c472 100644 (file)
@@ -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 );
        }
 
index 9baf28e..beb8cc8 100644 (file)
@@ -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() {
index 25a51d7..452d213 100644 (file)
@@ -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 );
        }
 
index a9fb394..297bed2 100644 (file)
@@ -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 );
        }
 
index 43504b1..3aff77e 100644 (file)
@@ -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 );
        }
 
index 449a7ad..4a3148a 100644 (file)
@@ -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' );
index 455e9c0..8e6978d 100644 (file)
@@ -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 );
        }
index b98e95f..4f10b6e 100644 (file)
@@ -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 (' .
index 31500c9..cb4f85d 100644 (file)
@@ -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 );
index 9963cbf..a733d67 100644 (file)
@@ -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 );
index 3d81e2d..1b78c7d 100644 (file)
@@ -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' );
        }
 
index e68937a..4d3baaf 100644 (file)
@@ -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" );
index e07bf03..21cd3a1 100644 (file)
@@ -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' );
index 1b0a27d..521ab54 100644 (file)
@@ -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' );
index f89877e..36caa3a 100644 (file)
@@ -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)',
index 2bc7510..044bafd 100644 (file)
@@ -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 );
        }
 
index 4ff873e..d2ee6fc 100644 (file)
@@ -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() {
index f223f1a..3b40556 100644 (file)
@@ -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() {
index 34560fd..d61906c 100644 (file)
@@ -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() {
index e8d59bc..dff734b 100644 (file)
@@ -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() {
index 6bc72ec..3f1b167 100644 (file)
@@ -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 );
index 4f2341c..01fb15e 100644 (file)
@@ -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(
index 1159e53..651255b 100644 (file)
@@ -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' );
index 2218a5e..09b1b1c 100644 (file)
@@ -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 );
index 9c7aef2..7acf975 100644 (file)
@@ -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',
index 7134453..a2ddb93 100644 (file)
@@ -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',
index 3fd9e02..2feae02 100644 (file)
@@ -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() {
index 3c5d28b..86cade2 100644 (file)
@@ -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 );
index 25a096c..992c238 100644 (file)
@@ -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 );
index 56cc573..098aba5 100644 (file)
@@ -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() {
index a93e51f..f089972 100644 (file)
@@ -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 );
index 96a8a38..5cc35ed 100644 (file)
@@ -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'
index b27b111..dd3ba04 100644 (file)
@@ -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',
index e926f56..d353b88 100644 (file)
@@ -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 );
        }
index b1bf95b..21f50f5 100644 (file)
@@ -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 ) {
index 63d5e9f..c0663a7 100644 (file)
@@ -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 );
index 71b4de1..861f5ed 100644 (file)
@@ -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' );
index eeaf9c8..06e947c 100755 (executable)
@@ -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' );
index 9537a79..baba6c8 100644 (file)
@@ -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' );
        }
index bd75b3b..37c9948 100644 (file)
@@ -42,12 +42,13 @@ class UpdateCollation extends Maintenance {
                parent::__construct();
 
                global $wgCategoryCollation;
-               $this->mDescription = <<<TEXT
+               $this->addDescription( <<<TEXT
 This script will find all rows in the categorylinks table whose collation is
 out-of-date (cl_collation != '$wgCategoryCollation') and repopulate cl_sortkey
 using the page title and cl_sortkey_prefix.  If all collations are
 up-to-date, it will do nothing.
-TEXT;
+TEXT
+               );
 
                $this->addOption( 'force', 'Run on all rows, even if the collation is ' .
                        'supposed to be up-to-date.' );
index 5c21b40..f5bb881 100644 (file)
@@ -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',
index ebfffe4..98d9389 100644 (file)
@@ -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 );
        }
 
index 18edecc..b2f2577 100644 (file)
@@ -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(
index e0c10f8..2534ca6 100644 (file)
@@ -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' );