summaryrefslogtreecommitdiff
path: root/maintenance/moveBatch.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
committerPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
commita58285fd06c8113c45377c655dd43cef6337e815 (patch)
treedfe31d3d12652352fe44890b4811eda0728faefb /maintenance/moveBatch.php
parent20194986f6638233732ba1fc3e838f117d3cc9ea (diff)
Aktualisierung auf MediaWiki 1.9.0
Diffstat (limited to 'maintenance/moveBatch.php')
-rw-r--r--maintenance/moveBatch.php28
1 files changed, 19 insertions, 9 deletions
diff --git a/maintenance/moveBatch.php b/maintenance/moveBatch.php
index 8d7141cd..4b0abf7f 100644
--- a/maintenance/moveBatch.php
+++ b/maintenance/moveBatch.php
@@ -1,13 +1,23 @@
<?php
-# 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
-# character. The first title is the source, the second is the destination.
-# <user> is the username
-# <reason> is the move reason
-# <interval> is the number of seconds to sleep for after each move
+/**
+ * Maintenance script to move a batch of pages
+ *
+ * @package MediaWiki
+ * @subpackage Maintenance
+ * @author Tim Starling
+ *
+ * USAGE: php moveBatch.php [-u <user>] [-r <reason>] [-i <interval>] <listfile>
+ *
+ * <listfile> - file with two titles per line, separated with pipe characters;
+ * the first title is the source, the second is the destination
+ * <user> - username to perform moves as
+ * <reason> - reason to be given for moves
+ * <interval> - number of seconds to sleep after each move
+ *
+ * This will print out error codes from Title::moveTo() if something goes wrong,
+ * e.g. immobile_namespace for namespaces which can't be moved
+ */
$oldCwd = getcwd();
$optionsWithArgs = array( 'u', 'r', 'i' );
@@ -66,7 +76,7 @@ for ( $linenum = 1; !feof( $file ); $linenum++ ) {
}
- print $source->getPrefixedText();
+ print $source->getPrefixedText() . ' --> ' . $dest->getPrefixedText();
$dbw->begin();
$err = $source->moveTo( $dest, false, $reason );
if( $err !== true ) {