Index: trunk/extensions/DumpHTML/dumpHTML.inc |
— | — | @@ -799,16 +799,9 @@ |
800 | 800 | $wgOut->parserOptions( new ParserOptions ); |
801 | 801 | SpecialPage::executePath( $wgTitle ); |
802 | 802 | } else { |
803 | | - /** @todo merge with Wiki.php code */ |
804 | | - if ( $ns == NS_IMAGE ) { |
805 | | - $wgArticle = new ImagePage( $wgTitle ); |
806 | | - } elseif ( $ns == NS_CATEGORY ) { |
807 | | - $wgArticle = new CategoryPage( $wgTitle ); |
808 | | - } else { |
809 | | - $wgArticle = new Article( $wgTitle ); |
810 | | - } |
811 | | - $rt = Title::newFromRedirect( $wgArticle->fetchContent() ); |
812 | | - if ( $rt != NULL ) { |
| 803 | + $wgArticle = MediaWiki::articleFromTitle( $wgTitle ); |
| 804 | + $rt = $wgArticle->followRedirect(); |
| 805 | + if ( is_object( $rt ) ) { |
813 | 806 | return $this->getRedirect( $rt ); |
814 | 807 | } else { |
815 | 808 | $wgOut = new OutputPage; |
— | — | @@ -818,8 +811,8 @@ |
819 | 812 | } |
820 | 813 | } |
821 | 814 | |
822 | | - |
823 | | - $sk =& $wgUser->getSkin(); |
| 815 | + |
| 816 | + $sk = $wgUser->getSkin(); |
824 | 817 | ob_start(); |
825 | 818 | $sk->outputPage( $wgOut ); |
826 | 819 | $text = ob_get_contents(); |