From 98242a578a91bbe8d967c1891268cd968c12b8fd Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 28 Jun 2006 20:35:16 +0000 Subject: [PATCH] * (bug 6479) Allow specification of the skin to use during HTML dumps --- RELEASE-NOTES | 2 +- maintenance/dumpHTML.inc | 5 ++++- maintenance/dumpHTML.php | 6 +++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9a2e7aa1e3..6b93c9968a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -595,7 +595,7 @@ Some default configuration options have changed: as part of namespace rearrangements, and it's easier to clean them up if we can move over them. * Show some error results in moveBatch.php - +* (bug 6479) Allow specification of the skin to use during HTML dumps == Compatibility == diff --git a/maintenance/dumpHTML.inc b/maintenance/dumpHTML.inc index c4b777c19b..2ed1e4a2c8 100644 --- a/maintenance/dumpHTML.inc +++ b/maintenance/dumpHTML.inc @@ -41,6 +41,9 @@ class DumpHTML { # List of raw pages used in the current article var $rawPages; + + # Skin to use + var $skin = 'dumphtml'; function DumpHTML( $settings ) { foreach ( $settings as $var => $value ) { @@ -344,7 +347,7 @@ class DumpHTML { } $wgUser = new User; - $wgUser->setOption( 'skin', 'htmldump' ); + $wgUser->setOption( 'skin', $this->skin ); $wgUser->setOption( 'editsection', 0 ); $this->sharedStaticPath = "$wgUploadDirectory/shared"; diff --git a/maintenance/dumpHTML.php b/maintenance/dumpHTML.php index f87b450fa9..37a46465d6 100644 --- a/maintenance/dumpHTML.php +++ b/maintenance/dumpHTML.php @@ -12,6 +12,7 @@ * -d destination directory * -s start ID * -e end ID + * -k skin to use (defaults to dumphtml) * --images only do image description pages * --categories only do category pages * --redirects only do redirects @@ -21,7 +22,7 @@ */ -$optionsWithArgs = array( 's', 'd', 'e' ); +$optionsWithArgs = array( 's', 'd', 'e', 'k' ); $profiling = false; @@ -60,11 +61,14 @@ if ( !empty( $options['d'] ) ) { $dest = 'static'; } +$skin = isset( $options['k'] ) ? $options['k'] : 'dumphtml'; + $wgHTMLDump = new DumpHTML( array( 'dest' => $dest, 'forceCopy' => $options['force-copy'], 'alternateScriptPath' => $options['interlang'], 'interwiki' => $options['interlang'], + 'skin' => $skin, )); -- 2.20.1