From a0d541474d1e5cd1d36e955c461c49c0e52446b3 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 9 Jan 2011 11:46:15 +0000 Subject: [PATCH] Changed to calls to Article::getContent() to Article::getRawText(): - in Article::insertRedirect(): if this will be saved in the redirect table, it should only be checked with the current text (in fact this is never called when viewing an old revision, but just in case someone breaks this) - in Article::prepareTextForEdit(): as for Article::doEdit() this should be actual page's contents --- includes/Article.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 8956bc4282..c95b4c248f 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -119,7 +119,7 @@ class Article { */ public function insertRedirect() { // recurse through to only get the final target - $retval = Title::newFromRedirectRecurse( $this->getContent() ); + $retval = Title::newFromRedirectRecurse( $this->getRawText() ); if ( !$retval ) { return null; } @@ -3598,7 +3598,7 @@ class Article { $edit->pst = $this->preSaveTransform( $text, $user ); $edit->popts = $this->getParserOptions( true ); $edit->output = $wgParser->parse( $edit->pst, $this->mTitle, $edit->popts, true, true, $revid ); - $edit->oldText = $this->getContent(); + $edit->oldText = $this->getRawText(); $this->mPreparedEdit = $edit; -- 2.20.1