mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-12 00:38:42 +00:00
Merge "Pass function name to HttpRequestFactory::get"
This commit is contained in:
commit
9197309fea
|
@ -305,9 +305,14 @@ class TitleBlacklist {
|
|||
if ( !is_string( $result )
|
||||
|| ( !$warn && !mt_rand( 0, $wgTitleBlacklistCaching['warningchance'] ) )
|
||||
) {
|
||||
$result = Http::get( $url );
|
||||
$result = MediaWikiServices::getInstance()->getHttpRequestFactory()
|
||||
->get( $url, [], __METHOD__ );
|
||||
$cache->set( $warnkey, 1, $wgTitleBlacklistCaching['warningexpiry'] );
|
||||
$cache->set( $key, $result, $wgTitleBlacklistCaching['expiry'] );
|
||||
if ( !$result ) {
|
||||
wfDebugLog( 'TitleBlacklist-cache', "Error loading title blacklist from $url\n" );
|
||||
$result = '';
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
|
Loading…
Reference in a new issue