Improve documentation of maintenance scripts.

Change-Id: Id7a04ff816dc47a8cc81a4da5ab0dff26b688bd5
This commit is contained in:
Alexandre Emsenhuber 2012-09-03 20:10:09 +02:00
parent a6e8b13531
commit 2a7478b4fb
9 changed files with 55 additions and 14 deletions

View file

@ -34,6 +34,11 @@ if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), '
$wgUseMasterForMaintenance = true;
require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to run database schema updates.
*
* @ingroup Maintenance
*/
class UpdateMediaWiki extends Maintenance {
function __construct() {

View file

@ -1,7 +1,7 @@
<?php
/**
* Maintenance script to provide a better count of the number of articles
* and update the site statistics table, if desired
* Provide a better count of the number of articles
* and update the site statistics table, if desired.
*
* 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
@ -25,6 +25,12 @@
require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to provide a better count of the number of articles
* and update the site statistics table, if desired.
*
* @ingroup Maintenance
*/
class UpdateArticleCount extends Maintenance {
public function __construct() {

View file

@ -1,7 +1,7 @@
<?php
/**
* Script will find all rows in the categorylinks table whose collation is
* out-of-date (cl_collation != $wgCategoryCollation) and repopulate cl_sortkey
* 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.
*
* This program is free software; you can redistribute it and/or modify
@ -28,6 +28,12 @@
require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that will find all rows in the categorylinks table
* whose collation is out-of-date.
*
* @ingroup Maintenance
*/
class UpdateCollation extends Maintenance {
const BATCH_SIZE = 50; // Number of rows to process in one batch
const SYNC_INTERVAL = 20; // Wait for slaves after this many batches
@ -53,8 +59,8 @@ TEXT;
'collation, though, so it may miss out-of-date rows with a different, ' .
'even older collation.', false, true );
$this->addOption( 'target-collation', 'Set this to the new collation type to ' .
'use instead of $wgCategoryCollation. Usually you should not use this, ' .
'you should just update $wgCategoryCollation in LocalSettings.php.',
'use instead of $wgCategoryCollation. Usually you should not use this, ' .
'you should just update $wgCategoryCollation in LocalSettings.php.',
false, true );
$this->addOption( 'dry-run', 'Don\'t actually change the collations, just ' .
'compile statistics.' );

View file

@ -1,6 +1,6 @@
<?php
/**
* Script to normalize double-byte latin UTF-8 characters
* Normalize double-byte latin UTF-8 characters
*
* Usage: php updateDoubleWidthSearch.php
*
@ -25,6 +25,11 @@
require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to normalize double-byte latin UTF-8 characters.
*
* @ingroup Maintenance
*/
class UpdateDoubleWidthSearch extends Maintenance {
public function __construct() {

View file

@ -26,6 +26,12 @@
require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script that updates page_restrictions table from
* old page_restriction column.
*
* @ingroup Maintenance
*/
class UpdateRestrictions extends Maintenance {
public function __construct() {
parent::__construct();

View file

@ -1,6 +1,6 @@
<?php
/**
* Script for periodic off-peak updating of the search index
* Periodic off-peak updating of the search index.
*
* Usage: php updateSearchIndex.php [-s START] [-e END] [-p POSFILE] [-l LOCKTIME] [-q]
* Where START is the starting timestamp
@ -30,6 +30,11 @@
require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script for periodic off-peak updating of the search index.
*
* @ingroup Maintenance
*/
class UpdateSearchIndex extends Maintenance {
public function __construct() {

View file

@ -1,7 +1,7 @@
<?php
/**
* Run this script periodically if you have miser mode enabled, to refresh the
* caches
* Update for cached special pages.
* Run this script periodically if you have miser mode enabled.
*
* 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
@ -24,6 +24,11 @@
require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to update cached special pages.
*
* @ingroup Maintenance
*/
class UpdateSpecialPages extends Maintenance {
public function __construct() {
parent::__construct();

View file

@ -1,8 +1,6 @@
<?php
/**
* Script to change users skins on the fly.
* This is for at least MediaWiki 1.10alpha (r19611) and have not been
* tested with previous versions. It should probably work with 1.7+.
* Script to change users preferences on the fly.
*
* Made on an original idea by Fooey (freenode)
*

View file

@ -1,6 +1,6 @@
<?php
/**
* Script to wait until slave lag goes under a certain value.
* Wait until slave lag goes under a certain value.
*
* 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
@ -24,6 +24,11 @@
require_once( __DIR__ . '/Maintenance.php' );
/**
* Maintenance script to wait until slave lag goes under a certain value.
*
* @ingroup Maintenance
*/
class WaitForSlave extends Maintenance {
public function __construct() {
$this->addArg( 'maxlag', 'How long to wait for the slaves, default 10 seconds', false );