From: Alexandre Emsenhuber Date: Fri, 2 Jul 2010 16:12:30 +0000 (+0000) Subject: Pass a title to DifferenceEngine's constructor so that it won't fall back to $wgTitle... X-Git-Tag: 1.31.0-rc.0~36305 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=be4a77b5ce47c8cae894b33deaee1a7ccc03caed;p=lhc%2Fweb%2Fwiklou.git Pass a title to DifferenceEngine's constructor so that it won't fall back to $wgTitle (Special:ComparePage) and produce invalid links --- 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' ) ); }