From: daniel Date: Fri, 20 Apr 2012 19:36:42 +0000 (+0200) Subject: check content model in ContentHandler::merge3() X-Git-Tag: 1.31.0-rc.0~22097^2^2~230 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=cfce86d016f450a4a1755a5a9bbca8ebe1407442;p=lhc%2Fweb%2Fwiklou.git check content model in ContentHandler::merge3() --- 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();