From: Rob Church Date: Wed, 28 Jun 2006 20:35:16 +0000 (+0000) Subject: * (bug 6479) Allow specification of the skin to use during HTML dumps X-Git-Tag: 1.31.0-rc.0~56541 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=98242a578a91bbe8d967c1891268cd968c12b8fd;p=lhc%2Fweb%2Fwiklou.git * (bug 6479) Allow specification of the skin to use during HTML dumps --- 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, ));