r27855 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r27854‎ | r27855 | r27856 >
Date:17:58, 26 November 2007
Author:simetrical
Status:old
Tags:
Comment:
Add some stub docs to refreshLinks.php, so at least refreshLinks.php --help doesn't start screwing with your database. $fname -> __METHOD__.
Modified paths:
  • /trunk/phase3/maintenance/namespaceDupes.php (modified) (history)
  • /trunk/phase3/maintenance/refreshLinks.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/refreshLinks.php
@@ -6,9 +6,32 @@
77
88 /** */
99 $optionsWithArgs = array( 'm', 'e' );
 10+
1011 require_once( "commandLine.inc" );
1112 require_once( "refreshLinks.inc" );
1213
 14+if( isset( $options['help'] ) ) {
 15+ echo <<<TEXT
 16+usage: php refreshLinks.php start [-e end] [-m maxlag] [--help] [possibly other
 17+ stuff]
 18+
 19+ --help : This help message
 20+ --dfn-only : ???
 21+ -m <number> : Specifies max replication lag? Does it abort or wait if this
 22+ is exceeded?
 23+ start : First page id to refresh? Doesn't work with --dfn-only set?
 24+ -e <number> : Last page id to refresh?
 25+
 26+This uses wfGetDB() to get the database, it seems not to accept a database ar-
 27+gument on the command line. So I don't know if you can use it for non-default
 28+configuration.
 29+
 30+Todo: Real documentation.
 31+
 32+TEXT;
 33+ exit(0);
 34+}
 35+
1336 error_reporting( E_ALL & (~E_NOTICE) );
1437
1538 if ( !$options['dfn-only'] ) {
Index: trunk/phase3/maintenance/namespaceDupes.php
@@ -205,7 +205,6 @@
206206 }
207207
208208 function resolveConflictOn( $row, $table ) {
209 - $fname = 'NamespaceConflictChecker::resolveConflictOn';
210209 echo "... resolving on $table... ";
211210 $newTitle = Title::makeTitleSafe( $row->namespace, $row->title );
212211 $this->db->update( $table,
@@ -217,7 +216,7 @@
218217 "{$table}_namespace" => 0,
219218 "{$table}_title" => $row->oldtitle,
220219 ),
221 - $fname );
 220+ __METHOD__ );
222221 echo "ok.\n";
223222 return true;
224223 }

Status & tagging log