Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7401842
ServiceWiring.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1018 B
Referenced Files
None
Subscribers
None
ServiceWiring.php
View Options
<?php
use
MediaWiki\MediaWikiServices
;
use
MediaWiki\Registration\ExtensionRegistry
;
// PHPUnit doesn't understand code coverage for code outside of classes/functions,
// like service wiring files. This *is* tested though, see
// tests/phpunit/integration/ServiceWiringTest.php
// @codeCoverageIgnoreStart
/*
* CheckUser provides a service for this, but
* we define our own nullable here to make CheckUser a soft dependency
*/
return
[
'NukeIPLookup'
=>
static
function
(
MediaWikiServices
$services
)
{
// Allow IP lookups if CheckUser is present and temp user config is known and enabled
if
(
!
ExtensionRegistry
::
getInstance
()->
isLoaded
(
'CheckUser'
)
)
{
return
null
;
}
$tempUserConfig
=
$services
->
getTempUserConfig
();
$tempUserIsKnown
=
$tempUserConfig
->
isKnown
();
$tempUserIsEnabled
=
$tempUserConfig
->
isEnabled
();
if
(
!
$tempUserIsKnown
||
!
$tempUserIsEnabled
)
{
return
null
;
}
return
$services
->
get
(
'CheckUserTemporaryAccountsByIPLookup'
);
}
];
// @codeCoverageIgnoreEnd
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 21, 17:41 (14 h, 42 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b1/6d/6322134fc9a0fd01cb36f50d5173
Default Alt Text
ServiceWiring.php (1018 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment