Rewrite reassignEdits script to be more efficient; support optional updates to recent...
[lhc/web/wiklou.git] / maintenance / dumpHTML.inc
index d81d7c1..c4b777c 100644 (file)
@@ -174,9 +174,8 @@ class DumpHTML {
                $this->setupGlobals();
 
                $dbr =& wfGetDB( DB_SLAVE );
-               $categorylinks = $dbr->tableName( 'categorylinks' );
                print "Selecting categories...";
-               $sql = 'SELECT DISTINCT cl_to FROM categorylinks';
+               $sql = 'SELECT DISTINCT cl_to FROM ' . $dbr->tableName( 'categorylinks' );
                $res = $dbr->query( $sql, $fname );
 
                print "\nWriting " . $dbr->numRows( $res ).  " category pages\n";
@@ -275,7 +274,7 @@ class DumpHTML {
 
        /** Set up globals required for parsing */
        function setupGlobals( $currentDepth = NULL ) {
-               global $wgUser, $wgTitle, $wgStylePath, $wgArticlePath;
+               global $wgUser, $wgTitle, $wgStylePath, $wgArticlePath, $wgMathPath;
                global $wgUploadPath, $wgLogo, $wgMaxCredits, $wgSharedUploadPath;
                global $wgHideInterlanguageLinks, $wgUploadDirectory, $wgThumbnailScriptPath;
                global $wgSharedThumbnailScriptPath, $wgEnableParserCache, $wgHooks, $wgServer;
@@ -335,7 +334,7 @@ class DumpHTML {
                $wgUploadPath = "$wgScriptPath/{$this->imageRel}";
                $wgSharedUploadPath = "$wgUploadPath/shared";
                $wgMaxCredits = -1;
-               $wgHideInterlangageLinks = !$this->interwiki;
+               $wgHideInterlanguageLinks = !$this->interwiki;
                $wgThumbnailScriptPath = $wgSharedThumbnailScriptPath = false;
                $wgEnableParserCache = false;
                $wgMathPath = "$wgScriptPath/math";
@@ -370,6 +369,7 @@ class DumpHTML {
                        $wgOut->setParserOptions( new ParserOptions );
                        SpecialPage::executePath( $wgTitle );
                } else {
+                       /** @todo merge with Wiki.php code */
                        if ( $ns == NS_IMAGE ) {
                                $wgArticle = new ImagePage( $wgTitle );
                        } elseif ( $ns == NS_CATEGORY ) {