Changed to calls to Article::getContent() to Article::getRawText():
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 9 Jan 2011 11:46:15 +0000 (11:46 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 9 Jan 2011 11:46:15 +0000 (11:46 +0000)
- 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

index 8956bc4..c95b4c2 100644 (file)
@@ -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;