--conf option for specifying a different LocalSettings.php. This allows multiple...
[lhc/web/wiklou.git] / maintenance / dumpHTML.php
index f8d7b3b..5e04231 100644 (file)
@@ -51,7 +51,7 @@ if ( !empty( $options['e'] ) ) {
        $end = $options['e'];
 } else {
        $dbr =& wfGetDB( DB_SLAVE );
-       $end = $dbr->selectField( 'page', 'max(page_id)', false );      
+       $end = $dbr->selectField( 'page', 'max(page_id)', false );
 }
 
 if ( !empty( $options['d'] ) ) {
@@ -60,8 +60,8 @@ if ( !empty( $options['d'] ) ) {
        $dest = 'static';
 }
 
-$d = new DumpHTML( array( 
-       'dest' => $dest, 
+$wgHTMLDump = new DumpHTML( array(
+       'dest' => $dest,
        'forceCopy' => $options['force-copy'],
        'alternateScriptPath' => $options['interlang'],
        'interwiki' => $options['interlang'],
@@ -69,13 +69,13 @@ $d = new DumpHTML( array(
 
 
 if ( $options['special'] ) {
-       $d->doSpecials();
+       $wgHTMLDump->doSpecials();
 } elseif ( $options['images'] ) {
-       $d->doImageDescriptions();
+       $wgHTMLDump->doImageDescriptions();
 } elseif ( $options['categories'] ) {
-       $d->doCategories();
+       $wgHTMLDump->doCategories();
 } elseif ( $options['redirects'] ) {
-       $d->doRedirects();
+       $wgHTMLDump->doRedirects();
 } else {
        print("Creating static HTML dump in directory $dest. \n".
                "Starting from page_id $start of $end.\n");
@@ -83,13 +83,13 @@ if ( $options['special'] ) {
        $dbr =& wfGetDB( DB_SLAVE );
        print "Using database {$dbr->mServer}\n";
 
-       $d->doArticles( $start, $end );
+       $wgHTMLDump->doArticles( $start, $end );
        if ( !isset( $options['e'] ) ) {
-               $d->doImageDescriptions();
-               $d->doCategories();
-               $d->doSpecials();
+               $wgHTMLDump->doImageDescriptions();
+               $wgHTMLDump->doCategories();
+               $wgHTMLDump->doSpecials();
        }
-       
+
        /*
        if ( $end - $start > CHUNK_SIZE * 2 ) {
                // Split the problem into smaller chunks, run them in different PHP instances