Remove unused parameter
[mediawiki.git] / maintenance / refreshLinks.php
blob4893d58019403ea784ff30dee10dc07d880c11e4
1 <?php
2 /**
3 * @file
4 * @ingroup Maintenance
5 */
7 /** */
8 $optionsWithArgs = array( 'm', 'e' );
10 require_once( "commandLine.inc" );
11 require_once( "refreshLinks.inc" );
13 if( isset( $options['help'] ) ) {
14 echo <<<TEXT
15 Usage:
16 php refreshLinks.php --help
17 php refreshLinks.php [<start>] [-e <end>] [-m <maxlag>] [--dfn-only]
18 [--new-only] [--redirects-only]
19 php refreshLinks.php [<start>] [-e <end>] [-m <maxlag>] --old-redirects-only
21 --help : This help message
22 --dfn-only : Delete links from nonexistent articles only
23 --new-only : Only affect articles with just a single edit
24 --redirects-only : Only fix redirects, not all links
25 --old-redirects-only : Only fix redirects with no redirect table entry
26 -m <number> : Maximum replication lag
27 <start> : First page id to refresh
28 -e <number> : Last page id to refresh
30 TEXT;
31 exit(0);
34 error_reporting( E_ALL & (~E_NOTICE) );
36 if ( !$options['dfn-only'] ) {
37 if ( isset( $args[0] ) ) {
38 $start = (int)$args[0];
39 } else {
40 $start = 1;
43 refreshLinks( $start, $options['new-only'], $options['m'], $options['e'], $options['redirects-only'], $options['old-redirects-only'] );
45 // this bit's bad for replication: disabling temporarily
46 // --brion 2005-07-16
47 //deleteLinksFromNonexistent();
49 if ( $options['globals'] ) {
50 print_r( $GLOBALS );