Apply live hack from Wikimedia codebase: --debug option for dumpHTML
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 29 Jan 2008 00:08:37 +0000 (00:08 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 29 Jan 2008 00:08:37 +0000 (00:08 +0000)
maintenance/dumpHTML.inc
maintenance/dumpHTML.php

index 18f5a9d..5a695aa 100644 (file)
@@ -76,6 +76,9 @@ class DumpHTML {
        # UDP profiling
        var $udpProfile, $udpProfileCounter = 0, $udpProfileInit = false;
 
+       # Debug level
+       var $debug = 0;
+
        function DumpHTML( $settings = array() ) {
                foreach ( $settings as $var => $value ) {
                        $this->$var = $value;
@@ -625,6 +628,9 @@ class DumpHTML {
        function getArticleHTML( $title ) {
                global $wgOut, $wgTitle, $wgArticle, $wgUser;
 
+               if ( $this->debug ) {
+                       print $title->getPrefixedDBkey() . "\n";
+               }
                $linkCache =& LinkCache::singleton();
                $linkCache->clear();
                $wgTitle = $title;
index b5e09f9..87401dc 100644 (file)
@@ -108,6 +108,7 @@ $wgHTMLDump = new DumpHTML( array(
        'compress' => $options['compress'],
        'noSharedDesc' => $options['no-shared-desc'],
        'udpProfile' => $options['udp-profile'],
+       'debug' => $options['debug'],
 ));