# Move a batch of pages
# Usage: php moveBatch.php [-u <user>] [-r <reason>] [-i <interval>] <listfile>
-# where
-# <listfile> is a file where each line has two titles separated by a pipe
+# where
+# <listfile> is a file where each line has two titles separated by a pipe
# character. The first title is the source, the second is the destination.
# <user> is the username
# <reason> is the move reason
$file = fopen( $filename, 'r' );
if ( !$file ) {
print "Unable to read file, exiting\n";
+ exit;
}
$dbw =& wfGetDB( DB_MASTER );
}
+ print $source->getPrefixedText();
$dbw->begin();
$source->moveTo( $dest, false, $reason );
$dbw->immediateCommit();
+ print "\n";
- wfWaitForSlaves( 5 );
if ( $interval ) {
sleep( $interval );
}
+ wfWaitForSlaves( 5 );
}