jenkins-bot has submitted this change and it was merged.

Change subject: Fix links passed to filter() for stashing to match edit checks
......................................................................


Fix links passed to filter() for stashing to match edit checks

Change-Id: I8f1b2c4d3033015de0e9a6d58776fe0ad32c4775
---
M SpamBlacklistHooks.php
M SpamBlacklist_body.php
2 files changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/SpamBlacklistHooks.php b/SpamBlacklistHooks.php
index 52b97ef..cddb073 100644
--- a/SpamBlacklistHooks.php
+++ b/SpamBlacklistHooks.php
@@ -69,7 +69,7 @@
        public static function onParserOutputStashForEdit(
                WikiPage $page, Content $content, ParserOutput $output
        ) {
-               $links = $output->getExternalLinks();
+               $links = array_keys( $output->getExternalLinks() );
                $spamObj = BaseBlacklist::getInstance( 'spam' );
                $spamObj->warmCachesForFilter( $page->getTitle(), $links );
        }
diff --git a/SpamBlacklist_body.php b/SpamBlacklist_body.php
index 137947a..c1b90e5 100644
--- a/SpamBlacklist_body.php
+++ b/SpamBlacklist_body.php
@@ -54,6 +54,8 @@
        function filter( array $links, Title $title = null, $preventLog = 
false, $mode = 'check' ) {
                $statsd = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
                $cache = ObjectCache::getLocalClusterInstance();
+
+               sort( $links );
                $key = $cache->makeKey(
                        'blacklist',
                        $this->getBlacklistType(),

-- 
To view, visit https://gerrit.wikimedia.org/r/309497
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f1b2c4d3033015de0e9a6d58776fe0ad32c4775
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpamBlacklist
Gerrit-Branch: wmf/1.28.0-wmf.18
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to