* (bug 6479) Allow specification of the skin to use during HTML dumps
authorRob Church <robchurch@users.mediawiki.org>
Wed, 28 Jun 2006 20:35:16 +0000 (20:35 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Wed, 28 Jun 2006 20:35:16 +0000 (20:35 +0000)
RELEASE-NOTES
maintenance/dumpHTML.inc
maintenance/dumpHTML.php

index 9a2e7aa..6b93c99 100644 (file)
@@ -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 ==
 
index c4b777c..2ed1e4a 100644 (file)
@@ -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";
index f87b450..37a4646 100644 (file)
@@ -12,6 +12,7 @@
  * -d <dest>      destination directory
  * -s <start>     start ID
  * -e <end>       end ID
+ * -k <skin>     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,
 ));