Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5986464
UserEditCountUpdateHookHandler.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
783 B
Referenced Files
None
Subscribers
None
UserEditCountUpdateHookHandler.php
View Options
<?php
namespace
MediaWiki\Extension\CentralAuth\Hooks\Handlers
;
use
MediaWiki\Extension\CentralAuth\CentralAuthEditCounter
;
use
MediaWiki\Extension\CentralAuth\User\CentralAuthUser
;
use
MediaWiki\Hook\UserEditCountUpdateHook
;
class
UserEditCountUpdateHookHandler
implements
UserEditCountUpdateHook
{
private
CentralAuthEditCounter
$editCounter
;
public
function
__construct
(
CentralAuthEditCounter
$editCounter
)
{
$this
->
editCounter
=
$editCounter
;
}
/** @inheritDoc */
public
function
onUserEditCountUpdate
(
$infos
):
void
{
foreach
(
$infos
as
$info
)
{
$centralUser
=
CentralAuthUser
::
getInstanceByName
(
$info
->
getUser
()->
getName
()
);
if
(
$centralUser
->
isAttached
()
)
{
$this
->
editCounter
->
increment
(
$centralUser
,
$info
->
getIncrement
()
);
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Oct 4, 00:07 (2 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
74/91/f8c7ba8da7d6a3f56bf07c0ed696
Default Alt Text
UserEditCountUpdateHookHandler.php (783 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment