Replace 2 deprecated methods

Change-Id: I8e420f0259ef6c9e579f7a00beb58f28af9da37d
This commit is contained in:
Siebrand Mazeland 2013-04-01 11:05:08 +02:00
parent 3ff9084c2d
commit e87bb7a59c
2 changed files with 5 additions and 4 deletions

View file

@ -352,13 +352,14 @@ class AFComputedVariable {
$article = $parameters['article'];
if ( $article !== null
&& ( !defined( 'MW_SUPPORTS_CONTENTHANDLER' )
|| $article->getContentModel() === CONTENT_MODEL_WIKITEXT ) ) {
|| $article->getContentModel() === CONTENT_MODEL_WIKITEXT )
) {
$textVar = $parameters['text-var'];
// XXX: Use prepareContentForEdit. But we need a Content object for that.
$new_text = $vars->getVar( $textVar )->toString();
$editInfo = $article->prepareTextForEdit( $new_text );
$content = ContentHandler::makeContent( $new_text, $article->getTitle() );
$editInfo = $article->prepareContentForEdit( $content );
$links = array_keys( $editInfo->output->getExternalLinks() );
$result = $links;
break;

View file

@ -308,7 +308,7 @@ class SpecialAbuseLog extends SpecialPage {
$diffEngine = new DifferenceEngine;
$diffEngine->showDiffStyle();
$formattedDiff = $diffEngine->generateDiffBody( $old_wikitext, $new_wikitext );
$formattedDiff = $diffEngine->generateTextDiffBody( $old_wikitext, $new_wikitext );
static $colDescriptions = "<col class='diff-marker' />
<col class='diff-content' />