From: Alexandre Emsenhuber Date: Fri, 24 Jun 2011 17:15:27 +0000 (+0000) Subject: Simplify a bit by using getRawText() instead of creating a Revision object X-Git-Tag: 1.31.0-rc.0~29311 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=681cac69762d2d32f7e1bb66f3275662592e332d;p=lhc%2Fweb%2Fwiklou.git Simplify a bit by using getRawText() instead of creating a Revision object --- diff --git a/includes/Article.php b/includes/Article.php index efb1490f3c..d66795dcba 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -363,13 +363,12 @@ class Article { * @return mixed string on success, false on failure */ public function getUndoText( Revision $undo, Revision $undoafter = null ) { - $currentRev = Revision::newFromTitle( $this->mTitle ); - if ( !$currentRev ) { + $cur_text = $this->getRawText(); + if ( $cur_text === false ) { return false; // no page } $undo_text = $undo->getText(); $undoafter_text = $undoafter->getText(); - $cur_text = $currentRev->getText(); if ( $cur_text == $undo_text ) { # No use doing a merge if it's just a straight revert.