* cleanupTitles.php changed from --dry-run option to --fix, so default
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 12 Jul 2006 19:18:46 +0000 (19:18 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 12 Jul 2006 19:18:46 +0000 (19:18 +0000)
  behavior is now a non-invasive check as with namespaceDupes.php

RELEASE-NOTES
maintenance/cleanupTitles.php

index fe0fd10..b0d680d 100644 (file)
@@ -60,6 +60,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 6639) Use a consistent default for upload directories
 * Preserve entered reason when reporting unconfirmed lock on Special:Lockdb
 * (bug 6642) Don't offer to unlock the database when it isn't locked
+* cleanupTitles.php changed from --dry-run option to --fix, so default
+  behavior is now a non-invasive check as with namespaceDupes.php
+
 
 == Languages updated ==
 
index 930072d..647314f 100644 (file)
@@ -2,9 +2,9 @@
 /*
  * Script to clean up broken, unparseable titles.
  *
- * Usage: php cleanupTitles.php [--dry-run]
+ * Usage: php cleanupTitles.php [--fix]
  * Options:
- *   --dry-run  don't actually try moving them
+ *   --fix  Actually clean up titles; otherwise just checks for them
  *
  * Copyright (C) 2005 Brion Vibber <brion@pobox.com>
  * http://www.mediawiki.org/
@@ -29,8 +29,6 @@
  * @subpackage maintenance
  */
 
-$options = array( 'dry-run' );
-
 require_once( 'commandLine.inc' );
 require_once( 'FiveUpgrade.inc' );
 
@@ -43,6 +41,11 @@ class TitleCleanup extends FiveUpgrade {
        }
 
        function cleanup() {
+               if( $this->dryrun ) {
+                       echo "Checking for bad titles...\n";
+               } else {
+                       echo "Checking and fixing bad titles...\n";
+               }
                $this->runTable( 'page',
                        '', //'WHERE page_namespace=0',
                        array( &$this, 'processPage' ) );
@@ -204,7 +207,7 @@ class TitleCleanup extends FiveUpgrade {
 }
 
 $wgUser->setName( 'Conversion script' );
-$caps = new TitleCleanup( isset( $options['dry-run'] ) );
+$caps = new TitleCleanup( !isset( $options['fix'] ) );
 $caps->cleanup();
 
 ?>