$res = $dbr->select( 'archive',
array(
'ar_minor_edit', 'ar_timestamp', 'ar_user', 'ar_user_text',
- 'ar_comment', 'ar_len', 'ar_deleted', 'ar_rev_id', 'ar_sha1'
+ 'ar_comment', 'ar_len', 'ar_deleted', 'ar_rev_id', 'ar_sha1',
+ 'ar_content_format', 'ar_content_model'
),
array( 'ar_namespace' => $this->title->getNamespace(),
'ar_title' => $this->title->getDBkey() ),
'ar_deleted',
'ar_len',
'ar_sha1',
+ 'ar_content_format',
+ 'ar_content_model',
),
array( 'ar_namespace' => $this->title->getNamespace(),
'ar_title' => $this->title->getDBkey(),
'ar_deleted',
'ar_page_id',
'ar_len',
- 'ar_sha1' ),
+ 'ar_sha1',
+ 'ar_content_format',
+ 'ar_content_model' ),
/* WHERE */ array(
'ar_namespace' => $this->title->getNamespace(),
'ar_title' => $this->title->getDBkey(),
* @return String: HTML
*/
function showDiff( $previousRev, $currentRev ) {
- $diffEngine = new DifferenceEngine( $this->getContext() );
+ $contentHandler = ContentHandler::getForTitle( $this->getTitle() );
+ $diffEngine = $contentHandler->getDifferenceEngine( $this->getContext() );
$diffEngine->showDiffStyle();
$this->getOutput()->addHTML(
"<div>" .
$this->diffHeader( $currentRev, 'n' ) .
"</td>\n" .
"</tr>" .
- $diffEngine->generateDiffBody(
- $previousRev->getText(), $currentRev->getText() ) .
+ $diffEngine->generateContentDiffBody(
+ $previousRev->getContent(), $currentRev->getContent() ) .
"</table>" .
"</div>\n"
);