Pass a title to DifferenceEngine's constructor so that it won't fall back to $wgTitle...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 2 Jul 2010 16:12:30 +0000 (16:12 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 2 Jul 2010 16:12:30 +0000 (16:12 +0000)
includes/specials/SpecialComparePages.php

index d010372..8d17728 100644 (file)
@@ -92,11 +92,12 @@ class SpecialComparePages extends SpecialPage {
                $this->form();
 
                if( $this->opts->getValue( 'rev1' ) && $this->opts->getValue( 'rev2' ) ) {
-                       $de = new DifferenceEngine( null, 
+                       $title = Title::newFromText( $this->opts->getValue( 'page2' ) );
+                       $de = new DifferenceEngine( $title,
                                $this->opts->getValue( 'rev1' ),
                                $this->opts->getValue( 'rev2' ),
                                null, // rcid
-                               ($this->opts->getValue( 'action') == "purge" ? true : false ),
+                               ( $this->opts->getValue( 'action' ) == 'purge' ),
                                false );
                        $de->showDiffPage( (bool)$this->opts->getValue( 'diffonly' ) );
                }