various bug fixes
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 23 May 2004 08:05:59 +0000 (08:05 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 23 May 2004 08:05:59 +0000 (08:05 +0000)
maintenance/archives/moveCustomMessages.inc
maintenance/archives/moveCustomMessages.php

index dd5e8ae..cb762f3 100644 (file)
@@ -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 );
index bfb7613..454bc83 100644 (file)
@@ -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 );