From: Brion Vibber Date: Wed, 12 Jul 2006 19:18:46 +0000 (+0000) Subject: * cleanupTitles.php changed from --dry-run option to --fix, so default X-Git-Tag: 1.31.0-rc.0~56272 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=e2e6f3315b071de113d86ec340a7ef759870a5eb;p=lhc%2Fweb%2Fwiklou.git * cleanupTitles.php changed from --dry-run option to --fix, so default behavior is now a non-invasive check as with namespaceDupes.php --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index fe0fd10b53..b0d680d5a3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/maintenance/cleanupTitles.php b/maintenance/cleanupTitles.php index 930072de4d..647314f78b 100644 --- a/maintenance/cleanupTitles.php +++ b/maintenance/cleanupTitles.php @@ -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 * 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(); ?>