mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamBlacklist
synced 2024-11-27 16:40:04 +00:00
Use core's externallinks lookup
Depends-On: I8ae9ef388957b0c04efa281f3bc3b5796bec17fe Bug: T326251 Change-Id: Ic326c6ba4476093cb62a8d1ce82da44c32b7d1e1
This commit is contained in:
parent
ac817efa52
commit
1d8b60b7b9
|
@ -10,7 +10,7 @@
|
|||
"type": "antispam",
|
||||
"license-name": "GPL-2.0-or-later",
|
||||
"requires": {
|
||||
"MediaWiki": ">= 1.38.0"
|
||||
"MediaWiki": ">= 1.41.0"
|
||||
},
|
||||
"GroupPermissions": {
|
||||
"user": {
|
||||
|
|
|
@ -6,6 +6,7 @@ use ExtensionRegistry;
|
|||
use LogPage;
|
||||
use ManualLogEntry;
|
||||
use MediaWiki\CheckUser\Hooks as CUHooks;
|
||||
use MediaWiki\ExternalLinks\ExternalLinksLookup;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use ObjectCache;
|
||||
use RequestContext;
|
||||
|
@ -192,12 +193,9 @@ class SpamBlacklist extends BaseBlacklist {
|
|||
static function ( $oldValue, &$ttl, array &$setOpts ) use ( $title, $fname ) {
|
||||
$dbr = wfGetDB( DB_REPLICA );
|
||||
$setOpts += Database::getCacheSetOptions( $dbr );
|
||||
|
||||
return $dbr->selectFieldValues(
|
||||
'externallinks',
|
||||
'el_to',
|
||||
// should be zero queries
|
||||
[ 'el_from' => $title->getArticleID() ],
|
||||
return ExternalLinksLookup::getExternalLinksForPage(
|
||||
$title->getArticleID(),
|
||||
$dbr,
|
||||
$fname
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue