Improve documentation of maintenance scripts.

Change-Id: I93e80edcfc3dc2d5630f7514808cafc22daf39f7
This commit is contained in:
Alexandre Emsenhuber 2012-07-25 21:31:06 +02:00
parent 0336260756
commit b2a7aafbed
12 changed files with 84 additions and 10 deletions

View file

@ -1,6 +1,6 @@
<?php
/**
* Maintenance script to do test JavaScript validity parses using jsmin+'s parser
* Test JavaScript validity parses using jsmin+'s parser
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -17,11 +17,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Maintenance
*/
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
/**
* Maintenance script to do test JavaScript validity parses using jsmin+'s parser
*
* @ingroup Maintenance
*/
class JSParseHelper extends Maintenance {
var $errs = 0;

View file

@ -23,6 +23,11 @@
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
/**
* Maintenance script to show database lag.
*
* @ingroup Maintenance
*/
class DatabaseLag extends Maintenance {
public function __construct() {
parent::__construct();

View file

@ -1,7 +1,7 @@
<?php
/**
* This script makes several 'set', 'incr' and 'get' requests on every
* memcached server and shows a report.
* Makes several 'set', 'incr' and 'get' requests on every memcached
* server and shows a report.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -18,11 +18,18 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Maintenance
*/
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
/**
* Maintenance script that makes several 'set', 'incr' and 'get' requests
* on every memcached server and shows a report.
*
* @ingroup Maintenance
*/
class mcTest extends Maintenance {
public function __construct() {
parent::__construct();

View file

@ -28,6 +28,13 @@ define( 'MW_NO_EXTENSION_MESSAGES', 1 );
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
$maintClass = 'MergeMessageFileList';
$mmfl = false;
/**
* Maintenance script that merges $wgExtensionMessagesFiles from various
* extensions to produce a single array containing all message files.
*
* @ingroup Maintenance
*/
class MergeMessageFileList extends Maintenance {
function __construct() {

View file

@ -17,11 +17,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Maintenance
*/
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
/**
* Maintenance script that re-assigns users from an old group to a new one.
*
* @ingroup Maintenance
*/
class MigrateUserGroup extends Maintenance {
public function __construct() {
parent::__construct();

View file

@ -23,6 +23,11 @@
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
/**
* Maintenance script that minifies a file or set of files.
*
* @ingroup Maintenance
*/
class MinifyScript extends Maintenance {
var $outDir;

View file

@ -1,6 +1,6 @@
<?php
/**
* Maintenance script to move a batch of pages
* Move a batch of pages.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -17,6 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Maintenance
* @author Tim Starling
*
@ -35,6 +36,11 @@
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
/**
* Maintenance script to move a batch of pages.
*
* @ingroup Maintenance
*/
class MoveBatch extends Maintenance {
public function __construct() {
parent::__construct();

View file

@ -2,7 +2,7 @@
/**
* Check for articles to fix after adding/deleting namespaces
*
* Copyright (C) 2005-2007 Brion Vibber <brion@pobox.com>
* Copyright © 2005-2007 Brion Vibber <brion@pobox.com>
* http://www.mediawiki.org/
*
* This program is free software; you can redistribute it and/or modify
@ -20,11 +20,18 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Maintenance
*/
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
/**
* Maintenance script that checks for articles to fix after
* adding/deleting namespaces.
*
* @ingroup Maintenance
*/
class NamespaceConflictChecker extends Maintenance {
/**

View file

@ -17,12 +17,18 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @todo Make this work on PostgreSQL and maybe other database servers
* @ingroup Maintenance
*/
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
/**
* Maintenance script that picks a database that has pending jobs.
*
* @ingroup Maintenance
*/
class nextJobDB extends Maintenance {
public function __construct() {
parent::__construct();

View file

@ -1,5 +1,4 @@
<?php
/**
* Remove pages with only 1 revision from the MediaWiki namespace, without
* flooding recent changes, delete logs, etc.
@ -28,6 +27,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Maintenance
* @author Steve Sanbeg
* based on nukePage by Rob Church
@ -35,6 +35,12 @@
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
/**
* Maintenance script that removes pages with only one revision from the
* MediaWiki namespace.
*
* @ingroup Maintenance
*/
class NukeNS extends Maintenance {
public function __construct() {
parent::__construct();

View file

@ -18,12 +18,18 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Maintenance
* @author Rob Church <robchur@gmail.com>
*/
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
/**
* Maintenance script that erases a page record from the database.
*
* @ingroup Maintenance
*/
class NukePage extends Maintenance {
public function __construct() {
parent::__construct();

View file

@ -1,11 +1,11 @@
<?php
/**
* Look for 'orphan' revisions hooked to pages which don't exist
* And 'childless' pages with no revisions.
* Look for 'orphan' revisions hooked to pages which don't exist and
* 'childless' pages with no revisions.
* Then, kill the poor widows and orphans.
* Man this is depressing.
*
* Copyright (C) 2005 Brion Vibber <brion@pobox.com>
* Copyright © 2005 Brion Vibber <brion@pobox.com>
* http://www.mediawiki.org/
*
* This program is free software; you can redistribute it and/or modify
@ -23,17 +23,24 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @author <brion@pobox.com>
* @ingroup Maintenance
*/
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
/**
* Maintenance script that looks for 'orphan' revisions hooked to pages which
* don't exist and 'childless' pages with no revisions.
*
* @ingroup Maintenance
*/
class Orphans extends Maintenance {
public function __construct() {
parent::__construct();
$this->mDescription = "Look for 'orphan' revisions hooked to pages which don't exist\n" .
"And 'childless' pages with no revisions\n" .
"and 'childless' pages with no revisions\n" .
"Then, kill the poor widows and orphans\n" .
"Man this is depressing";
$this->addOption( 'fix', 'Actually fix broken entries' );