X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdumpBackup.php;h=26cc45bc9627264249a6dbcf9bc56de4a6c6360d;hb=19466ac51ad70629945c3157ce9b0ca51ed50d98;hp=40d9b56708e990bb67dbe9114faba02cda92b4a4;hpb=b786c448cd82a13dd7efcaf817ca1f4d0d3e530d;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/dumpBackup.php b/maintenance/dumpBackup.php index 40d9b56708..26cc45bc96 100644 --- a/maintenance/dumpBackup.php +++ b/maintenance/dumpBackup.php @@ -1,6 +1,9 @@ + * Script that dumps wiki pages or logging database into an XML interchange + * wrapper format for export or backup + * + * Copyright © 2005 Brion Vibber * http://www.mediawiki.org/ * * This program is free software; you can redistribute it and/or modify @@ -26,12 +29,12 @@ $originalDir = getcwd(); $optionsWithArgs = array( 'pagelist', 'start', 'end' ); -require_once( 'commandLine.inc' ); +require_once( dirname( __FILE__ ) . '/commandLine.inc' ); require_once( 'backup.inc' ); $dumper = new BackupDumper( $argv ); -if( isset( $options['quiet'] ) ) { +if ( isset( $options['quiet'] ) ) { $dumper->reporting = false; } @@ -47,10 +50,10 @@ if ( isset( $options['pagelist'] ) ) { $dumper->pages = array_filter( $pages, create_function( '$x', 'return $x !== "";' ) ); } -if( isset( $options['start'] ) ) { +if ( isset( $options['start'] ) ) { $dumper->startId = intval( $options['start'] ); } -if( isset( $options['end'] ) ) { +if ( isset( $options['end'] ) ) { $dumper->endId = intval( $options['end'] ); } $dumper->skipHeader = isset( $options['skip-header'] ); @@ -59,13 +62,13 @@ $dumper->dumpUploads = isset( $options['uploads'] ); $textMode = isset( $options['stub'] ) ? WikiExporter::STUB : WikiExporter::TEXT; -if( isset( $options['full'] ) ) { +if ( isset( $options['full'] ) ) { $dumper->dump( WikiExporter::FULL, $textMode ); -} elseif( isset( $options['current'] ) ) { +} elseif ( isset( $options['current'] ) ) { $dumper->dump( WikiExporter::CURRENT, $textMode ); -} elseif( isset( $options['stable'] ) ) { +} elseif ( isset( $options['stable'] ) ) { $dumper->dump( WikiExporter::STABLE, $textMode ); -} elseif( isset( $options['logs'] ) ) { +} elseif ( isset( $options['logs'] ) ) { $dumper->dump( WikiExporter::LOGS ); } else { $dumper->progress( << + Where is a list of page titles to be dumped Options: --quiet Don't dump status reports to stderr. @@ -91,6 +97,9 @@ Options: --skip-footer Don't output the footer --stub Don't perform old_text lookups; for 2-pass dump --uploads Include upload records (experimental) + --conf= Use the specified configuration file (LocalSettings.php) + + --wiki= Only back up the specified Fancy stuff: (Works? Add examples please.) --plugin=[:] Load a dump plugin class