From 3069eaf35e833ffe4a1c1c7829dd7e168ae27420 Mon Sep 17 00:00:00 2001 From: Ciro Mattia Gonano Date: Wed, 11 Sep 2013 15:56:48 +0200 Subject: Merge up to r3319 --- buildscripts/wikibuilder/dumpHTML.php | 102 ---------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 buildscripts/wikibuilder/dumpHTML.php (limited to 'buildscripts/wikibuilder/dumpHTML.php') diff --git a/buildscripts/wikibuilder/dumpHTML.php b/buildscripts/wikibuilder/dumpHTML.php deleted file mode 100644 index d34e53ed..00000000 --- a/buildscripts/wikibuilder/dumpHTML.php +++ /dev/null @@ -1,102 +0,0 @@ - destination directory - * -s start ID - * -e end ID - * --images only do image description pages - * --categories only do category pages - * --special only do miscellaneous stuff - * --force-copy copy commons instead of symlink, needed for Wikimedia - * --interlang allow interlanguage links - */ - - -$optionsWithArgs = array( 's', 'd', 'e' ); - -require_once($wiki_dir. "/maintenance/commandLine.inc" ); -require_once(dirname(__FILE__)."/dumpHTML.inc" ); - -class DummyUser extends User -{ - function getSkin() - { - require_once(dirname(__FILE__).'/DumpSkin.php' ); - $this->mSkin =& new DumpSkin; - return $this->mSkin; - } -} - -class DumpTitle extends Title -{ - function getHashedDirectory() - { - return strtr(parent::getHashedDirectory(), '~:', '__'); - } -} - -error_reporting( E_ALL & (~E_NOTICE) ); -define( 'CHUNK_SIZE', 50 ); - -if ( !empty( $options['s'] ) ) { - $start = $options['s']; -} else { - $start = 1280; -} - -if ( !empty( $options['e'] ) ) { - $end = $options['e']; -} else { - $dbr =& wfGetDB( DB_SLAVE ); - $end = $dbr->selectField( 'page', 'max(page_id)', false ); -} - -if ( !empty( $options['d'] ) ) { - $dest = $options['d']; -} else { - $dest = $output_dir; -} - -class DumpHTMLSkined extends DumpHTML -{ - function setupGlobals( $depth = NULL ) - { - parent::setupGlobals($depth); - global $wgUser,$wgServer,$wiki_url; - $wgUser = new DummyUser; - $wgServer = $wiki_url; - } -} - -$d = new DumpHTMLSkined( array( - 'dest' => $dest, - 'forceCopy' => $options['force-copy'], - 'alternateScriptPath' => $options['interlang'], - 'interwiki' => $options['interlang'], -)); - - -if ( $options['special'] ) { - $d->doSpecials(); -} elseif ( $options['images'] ) { - $d->doImageDescriptions(); -} elseif ( $options['categories'] ) { - $d->doCategories(); -} else { - print("Creating static HTML dump in directory $dest. \n". - "Starting from page_id $start of $end.\n"); - $d->doArticles( $start, $end ); - $d->doImageDescriptions(); - $d->doCategories(); - $d->doMainPage(); -} - -?> \ No newline at end of file -- cgit v1.2.3