Add some stub docs to refreshLinks.php, so at least refreshLinks.php --help doesn...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 26 Nov 2007 17:58:08 +0000 (17:58 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 26 Nov 2007 17:58:08 +0000 (17:58 +0000)
maintenance/namespaceDupes.php
maintenance/refreshLinks.php

index ab889c1..323aad5 100644 (file)
@@ -205,7 +205,6 @@ class NamespaceConflictChecker {
        }
 
        function resolveConflictOn( $row, $table ) {
-               $fname = 'NamespaceConflictChecker::resolveConflictOn';
                echo "... resolving on $table... ";
                $newTitle = Title::makeTitleSafe( $row->namespace, $row->title );
                $this->db->update( $table,
@@ -217,7 +216,7 @@ class NamespaceConflictChecker {
                                "{$table}_namespace" => 0,
                                "{$table}_title"     => $row->oldtitle,
                        ),
-                       $fname );
+                       __METHOD__ );
                echo "ok.\n";
                return true;
        }
index 34ca53c..923379e 100644 (file)
@@ -6,9 +6,32 @@
 
 /** */
 $optionsWithArgs = array( 'm', 'e' );
+
 require_once( "commandLine.inc" );
 require_once( "refreshLinks.inc" );
 
+if( isset( $options['help'] ) ) {
+       echo <<<TEXT
+usage: php refreshLinks.php start [-e end] [-m maxlag] [--help] [possibly other
+    stuff]
+
+    --help      : This help message
+    --dfn-only  : ???
+    -m <number> : Specifies max replication lag?  Does it abort or wait if this
+        is exceeded?
+    start       : First page id to refresh?  Doesn't work with --dfn-only set?
+    -e <number> : Last page id to refresh?
+
+This uses wfGetDB() to get the database, it seems not to accept a database ar-
+gument on the command line.  So I don't know if you can use it for non-default
+configuration.
+
+Todo: Real documentation.
+
+TEXT;
+       exit(0);
+}
+
 error_reporting( E_ALL & (~E_NOTICE) );
 
 if ( !$options['dfn-only'] ) {