+ /**
+ * Generate a diff, no caching.
+ *
+ * Subclasses may override this to provide a
+ *
+ * @param $old Content: old content
+ * @param $new Content: new content
+ */
+ function generateContentDiffBody( Content $old, Content $new ) {
+ #XXX: generate a warning if $old or $new are not instances of TextContent?
+ #XXX: fail if $old and $new don't have the same content model? or what?
+
+ $otext = $old->serialize();
+ $ntext = $new->serialize();
+
+ #XXX: text should be "already segmented". what does that mean?
+ return $this->generateTextDiffBody( $otext, $ntext );
+ }
+
+ /**
+ * Generate a diff, no caching
+ *
+ * @param $otext String: old text, must be already segmented
+ * @param $ntext String: new text, must be already segmented
+ * @deprecated since 1.20, use generateContentDiffBody() instead!
+ */
+ function generateDiffBody( $otext, $ntext ) {
+ wfDeprecated( __METHOD__, "1.20" );
+
+ return $this->generateTextDiffBody( $otext, $ntext );
+ }
+