Add some stub docs to refreshLinks.php, so at least refreshLinks.php --help doesn...
[lhc/web/wiklou.git] / maintenance / refreshLinks.php
1 <?php
2 /**
3 * @todo document
4 * @addtogroup Maintenance
5 */
6
7 /** */
8 $optionsWithArgs = array( 'm', 'e' );
9
10 require_once( "commandLine.inc" );
11 require_once( "refreshLinks.inc" );
12
13 if( isset( $options['help'] ) ) {
14 echo <<<TEXT
15 usage: php refreshLinks.php start [-e end] [-m maxlag] [--help] [possibly other
16 stuff]
17
18 --help : This help message
19 --dfn-only : ???
20 -m <number> : Specifies max replication lag? Does it abort or wait if this
21 is exceeded?
22 start : First page id to refresh? Doesn't work with --dfn-only set?
23 -e <number> : Last page id to refresh?
24
25 This uses wfGetDB() to get the database, it seems not to accept a database ar-
26 gument on the command line. So I don't know if you can use it for non-default
27 configuration.
28
29 Todo: Real documentation.
30
31 TEXT;
32 exit(0);
33 }
34
35 error_reporting( E_ALL & (~E_NOTICE) );
36
37 if ( !$options['dfn-only'] ) {
38 if ($args[0]) {
39 $start = (int)$args[0];
40 } else {
41 $start = 1;
42 }
43
44 refreshLinks( $start, $options['new-only'], $options['m'], $options['e'], $options['redirects-only'] );
45 }
46 // this bit's bad for replication: disabling temporarily
47 // --brion 2005-07-16
48 //deleteLinksFromNonexistent();
49
50 if ( $options['globals'] ) {
51 print_r( $GLOBALS );
52 }
53
54