From 3ce038b9b10385f5699ed7a110e10e7835f458ca Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 23 May 2004 08:05:59 +0000 Subject: [PATCH] various bug fixes --- maintenance/archives/moveCustomMessages.inc | 7 +++++-- maintenance/archives/moveCustomMessages.php | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/maintenance/archives/moveCustomMessages.inc b/maintenance/archives/moveCustomMessages.inc index dd5e8aee82..cb762f3b7a 100644 --- a/maintenance/archives/moveCustomMessages.inc +++ b/maintenance/archives/moveCustomMessages.inc @@ -8,6 +8,8 @@ function isTemplateInitialised() { function moveCustomMessages( $phase ) { global $wgUser, $wgAllMessagesEn, $wgDeferredUpdateList, $wgLang ; + global $targets, $template, $replaceCount; + $wgUser = new User; $wgUser->setLoaded( true ); # Don't load from DB $wgUser->setName( "Template namespace initialisation script" ); @@ -35,6 +37,7 @@ function moveCustomMessages( $phase ) { # Create redirects from destination to source if ( $phase == 0 || $phase == 1 ) { + print "Creating redirects\n"; foreach ( $targets as $partial => $dummy ) { print "$partial..."; $nt = Title::makeTitle( NS_TEMPLATE, $partial ); @@ -54,7 +57,7 @@ function moveCustomMessages( $phase ) { # Move pages if ( $phase == 0 || $phase == 2 ) { - print "\n"; + print "\nMoving pages...\n"; foreach ( $targets as $partial => $dummy ) { $ot = Title::makeTitle( NS_MEDIAWIKI, $partial ); $nt = Title::makeTitle( NS_TEMPLATE, $partial ); @@ -75,7 +78,7 @@ function moveCustomMessages( $phase ) { # Convert text if ( $phase == 0 || $phase == 3 ) { - print "\n"; + print "\nConverting text...\n"; $parser = new Parser; $options = ParserOptions::newFromUser( $wgUser ); diff --git a/maintenance/archives/moveCustomMessages.php b/maintenance/archives/moveCustomMessages.php index bfb761369a..454bc83078 100644 --- a/maintenance/archives/moveCustomMessages.php +++ b/maintenance/archives/moveCustomMessages.php @@ -8,12 +8,12 @@ # 3. Convert the text to suit the new syntax chdir( ".." ); -require_once( "commandLine.inc" ); +require_once( "liveCmdLine.inc" ); require_once( "moveCustomMessages.inc" ); $phase = 0; -if ( is_numeric( @$argv[2] ) && $argv[2] > 0) { - $phase = intval($argv[2]); +if ( is_numeric( @$argv[3] ) && $argv[3] > 0) { + $phase = intval($argv[3]); } moveCustomMessages( $phase ); -- 2.20.1