r79886 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79885‎ | r79886 | r79887 >
Date:11:46, 9 January 2011
Author:ialex
Status:ok (Comments)
Tags:brion 
Comment:
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
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -119,7 +119,7 @@
120120 */
121121 public function insertRedirect() {
122122 // recurse through to only get the final target
123 - $retval = Title::newFromRedirectRecurse( $this->getContent() );
 123+ $retval = Title::newFromRedirectRecurse( $this->getRawText() );
124124 if ( !$retval ) {
125125 return null;
126126 }
@@ -3598,7 +3598,7 @@
35993599 $edit->pst = $this->preSaveTransform( $text, $user );
36003600 $edit->popts = $this->getParserOptions( true );
36013601 $edit->output = $wgParser->parse( $edit->pst, $this->mTitle, $edit->popts, true, true, $revid );
3602 - $edit->oldText = $this->getContent();
 3602+ $edit->oldText = $this->getRawText();
36033603
36043604 $this->mPreparedEdit = $edit;
36053605

Comments

#Comment by Aaron Schulz (talk | contribs)   23:19, 14 June 2011

$edit->oldText is different for MW pages, which I assume is OK...

Status & tagging log