From cfce86d016f450a4a1755a5a9bbca8ebe1407442 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 20 Apr 2012 21:36:42 +0200 Subject: [PATCH] check content model in ContentHandler::merge3() --- includes/ContentHandler.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/ContentHandler.php b/includes/ContentHandler.php index 5292180e37..2768af43ea 100644 --- a/includes/ContentHandler.php +++ b/includes/ContentHandler.php @@ -655,6 +655,8 @@ abstract class TextContentHandler extends ContentHandler { * attempts to merge differences between three versions. * Returns a new Content object for a clean merge and false for failure or a conflict. * + * All three Content objects passed as parameters must have the same content model. + * * This text-based implementation uses wfMerge(). * * @param $oldContent String @@ -664,7 +666,8 @@ abstract class TextContentHandler extends ContentHandler { */ public function merge3( Content $oldContent, Content $myContent, Content $yourContent ) { $this->checkModelName( $oldContent->getModelName() ); - #TODO: check that all Content objects have the same content model! #XXX: what to do if they don't? + $this->checkModelName( $myContent->getModelName() ); + $this->checkModelName( $yourContent->getModelName() ); $format = $this->getDefaultFormat(); -- 2.20.1