mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 15:30:42 +00:00
Replace 2 deprecated methods
Change-Id: I8e420f0259ef6c9e579f7a00beb58f28af9da37d
This commit is contained in:
parent
3ff9084c2d
commit
e87bb7a59c
|
@ -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;
|
||||
|
|
|
@ -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' />
|
||||
|
|
Loading…
Reference in a new issue