From: Jens Ohlig Date: Thu, 12 Jul 2012 11:19:11 +0000 (+0200) Subject: getUndoContent added to get undo working again for WikiText X-Git-Tag: 1.31.0-rc.0~22097^2^2~73^2 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=8968662187ceaf832d13fbfc669736236402b4ae;p=lhc%2Fweb%2Fwiklou.git getUndoContent added to get undo working again for WikiText Change-Id: I51ee17ded820a41e519831323e40ee0f6eb831c4 --- 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,