jenkins-bot has submitted this change and it was merged.
Change subject: Replace 2 deprecated methods
......................................................................
Replace 2 deprecated methods
Change-Id: I8e420f0259ef6c9e579f7a00beb58f28af9da37d
---
M AbuseFilterVariableHolder.php
M special/SpecialAbuseLog.php
2 files changed, 5 insertions(+), 4 deletions(-)
Approvals:
Alex Monk: Looks good to me, approved
jenkins-bot: Verified
diff --git a/AbuseFilterVariableHolder.php b/AbuseFilterVariableHolder.php
index 812712a..2c43451 100644
--- a/AbuseFilterVariableHolder.php
+++ b/AbuseFilterVariableHolder.php
@@ -352,13 +352,14 @@
$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;
diff --git a/special/SpecialAbuseLog.php b/special/SpecialAbuseLog.php
index 38a0f15..2774c27 100644
--- a/special/SpecialAbuseLog.php
+++ b/special/SpecialAbuseLog.php
@@ -308,7 +308,7 @@
$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' />
--
To view, visit https://gerrit.wikimedia.org/r/56899
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8e420f0259ef6c9e579f7a00beb58f28af9da37d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits