$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'] ) ) {
$dest = 'static';
}
-$d = new DumpHTML( array(
- 'dest' => $dest,
+$wgHTMLDump = new DumpHTML( array(
+ 'dest' => $dest,
'forceCopy' => $options['force-copy'],
'alternateScriptPath' => $options['interlang'],
'interwiki' => $options['interlang'],
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");
$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