From be4a77b5ce47c8cae894b33deaee1a7ccc03caed Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 2 Jul 2010 16:12:30 +0000 Subject: [PATCH] Pass a title to DifferenceEngine's constructor so that it won't fall back to $wgTitle (Special:ComparePage) and produce invalid links --- includes/specials/SpecialComparePages.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/specials/SpecialComparePages.php b/includes/specials/SpecialComparePages.php index d0103720ab..8d177288c4 100644 --- a/includes/specials/SpecialComparePages.php +++ b/includes/specials/SpecialComparePages.php @@ -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' ) ); } -- 2.20.1