Rewrite reassignEdits script to be more efficient; support optional updates to recent...
[lhc/web/wiklou.git] / maintenance / refreshLinks.php
index 6d6ddc3..e59124a 100644 (file)
@@ -1,19 +1,32 @@
 <?php
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
 
+/** */
+$optionsWithArgs = array( 'm', 'e' );
 require_once( "commandLine.inc" );
 require_once( "refreshLinks.inc" );
 
 error_reporting( E_ALL & (~E_NOTICE) );
 
+if ( !$options['dfn-only'] ) {
+       if ($args[0]) {
+               $start = (int)$args[0];
+       } else {
+               $start = 1;
+       }
 
-if ($argv[2]) {
-       $start = (int)$argv[2];
-} else {
-       $start = 1;
+       refreshLinks( $start, $options['new-only'], $options['m'], $options['e'] );
 }
+// this bit's bad for replication: disabling temporarily
+// --brion 2005-07-16
+//deleteLinksFromNonexistent();
 
-refreshLinks( $start );
-
-exit();
+if ( $options['globals'] ) {
+       print_r( $GLOBALS );
+}
 
 ?>