r77747 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77746‎ | r77747 | r77748 >
Date:22:42, 4 December 2010
Author:aaron
Status:ok
Tags:
Comment:
MFT r72846 to fix bug 26238
Modified paths:
  • /branches/wmf/1.16wmf4/includes/Article.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/includes/Article.php
@@ -274,9 +274,13 @@
275275 * @return mixed string on success, false on failure
276276 */
277277 public function getUndoText( Revision $undo, Revision $undoafter = null ) {
 278+ $currentRev = Revision::newFromTitle( $this->mTitle );
 279+ if ( !$currentRev ) {
 280+ return false; // no page
 281+ }
278282 $undo_text = $undo->getText();
279283 $undoafter_text = $undoafter->getText();
280 - $cur_text = $this->getContent();
 284+ $cur_text = $currentRev->getText();
281285 if ( $cur_text == $undo_text ) {
282286 # No use doing a merge if it's just a straight revert.
283287 return $undoafter_text;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72846Made getUndoText() not use unreliable getContent() function (weird wgRequest ...aaron10:02, 12 September 2010

Status & tagging log