Remove unused parameter
[mediawiki.git] / maintenance / populateCategory.php
blobcb22e7f8df5fe51992524fb7617672b8503a3af2
1 <?php
2 /**
3 * @file
4 * @ingroup Maintenance
5 * @author Simetrical
6 */
8 $optionsWithArgs = array( 'begin', 'max-slave-lag', 'throttle' );
10 require_once "commandLine.inc";
11 require_once "populateCategory.inc";
13 if( isset( $options['help'] ) ) {
14 echo <<<TEXT
15 This script will populate the category table, added in MediaWiki 1.13. It will
16 print out progress indicators every 1000 categories it adds to the table. The
17 script is perfectly safe to run on large, live wikis, and running it multiple
18 times is harmless. You may want to use the throttling options if it's causing
19 too much load; they will not affect correctness.
21 If the script is stopped and later resumed, you can use the --begin option with
22 the last printed progress indicator to pick up where you left off. This is
23 safe, because any newly-added categories before this cutoff will have been
24 added after the software update and so will be populated anyway.
26 When the script has finished, it will make a note of this in the database, and
27 will not run again without the --force option.
29 Usage:
30 php populateCategory.php [--max-slave-lag <seconds>] [--begin <name>]
31 [--throttle <seconds>] [--force]
33 --begin: Only do categories whose names are alphabetically after the pro-
34 vided name. Default: empty (start from beginning).
35 --max-slave-lag: If slave lag exceeds this many seconds, wait until it
36 drops before continuing. Default: 10.
37 --throttle: Wait this many milliseconds after each category. Default: 0.
38 --force: Run regardless of whether the database says it's been run already.
39 TEXT;
40 exit( 0 );
43 $defaults = array(
44 'begin' => '',
45 'max-slave-lag' => 10,
46 'throttle' => 0,
47 'force' => false
49 $options = array_merge( $defaults, $options );
51 populateCategory( $options['begin'], $options['max-slave-lag'],
52 $options['throttle'], $options['force'] );