From 8968662187ceaf832d13fbfc669736236402b4ae Mon Sep 17 00:00:00 2001 From: Jens Ohlig Date: Thu, 12 Jul 2012 13:19:11 +0200 Subject: [PATCH] getUndoContent added to get undo working again for WikiText Change-Id: I51ee17ded820a41e519831323e40ee0f6eb831c4 --- includes/WikiPage.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/includes/WikiPage.php b/includes/WikiPage.php index ad1fded5a6..0fe1b4fc8f 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -1379,6 +1379,21 @@ class WikiPage extends Page { return $ret; } + /** + * Get the content that needs to be saved in order to undo all revisions + * between $undo and $undoafter. Revisions must belong to the same page, + * must exist and must not be deleted + * @param $undo Revision + * @param $undoafter Revision Must be an earlier revision than $undo + * @return mixed string on success, false on failure + * @since 1.WD + * Before we had the Content object, this was done in getUndoText + */ + public function getUndoContent( Revision $undo, Revision $undoafter = null ) { + $handler = $undo->getContentHandler(); + return $handler->getUndoContent( $this->getRevision(), $undo, $undoafter ); + } + /** * Get the text that needs to be saved in order to undo all revisions * between $undo and $undoafter. Revisions must belong to the same page, -- 2.20.1