Index: branches/wmf/1.16wmf4/includes/Article.php |
— | — | @@ -274,9 +274,13 @@ |
275 | 275 | * @return mixed string on success, false on failure |
276 | 276 | */ |
277 | 277 | public function getUndoText( Revision $undo, Revision $undoafter = null ) { |
| 278 | + $currentRev = Revision::newFromTitle( $this->mTitle ); |
| 279 | + if ( !$currentRev ) { |
| 280 | + return false; // no page |
| 281 | + } |
278 | 282 | $undo_text = $undo->getText(); |
279 | 283 | $undoafter_text = $undoafter->getText(); |
280 | | - $cur_text = $this->getContent(); |
| 284 | + $cur_text = $currentRev->getText(); |
281 | 285 | if ( $cur_text == $undo_text ) { |
282 | 286 | # No use doing a merge if it's just a straight revert. |
283 | 287 | return $undoafter_text; |