Index: trunk/phase3/includes/Article.php |
— | — | @@ -321,9 +321,13 @@ |
322 | 322 | * @return mixed string on success, false on failure |
323 | 323 | */ |
324 | 324 | public function getUndoText( Revision $undo, Revision $undoafter = null ) { |
| 325 | + $currentRev = Revision::newFromTitle( $this->mTitle ); |
| 326 | + if ( !$currentRev ) { |
| 327 | + return false; // no page |
| 328 | + } |
325 | 329 | $undo_text = $undo->getText(); |
326 | 330 | $undoafter_text = $undoafter->getText(); |
327 | | - $cur_text = $this->getContent(); |
| 331 | + $cur_text = $currentRev->getText(); |
328 | 332 | |
329 | 333 | if ( $cur_text == $undo_text ) { |
330 | 334 | # No use doing a merge if it's just a straight revert. |