mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-27 17:50:44 +00:00
Update reference in WikiEditor
Logs data from WikiEditor Bug: T337270 Change-Id: I69b4ea31397915ce1e90cff91e44b3648d57f389
This commit is contained in:
parent
7ee41eae64
commit
d7993a35b8
|
@ -31,6 +31,7 @@ use MediaWiki\Preferences\Hook\GetPreferencesHook;
|
||||||
use MediaWiki\ResourceLoader as RL;
|
use MediaWiki\ResourceLoader as RL;
|
||||||
use MediaWiki\User\UserEditTracker;
|
use MediaWiki\User\UserEditTracker;
|
||||||
use MediaWiki\User\UserOptionsLookup;
|
use MediaWiki\User\UserOptionsLookup;
|
||||||
|
use MediaWiki\WikiMap\WikiMap;
|
||||||
use MessageLocalizer;
|
use MessageLocalizer;
|
||||||
use MWCryptRand;
|
use MWCryptRand;
|
||||||
use OutputPage;
|
use OutputPage;
|
||||||
|
@ -138,6 +139,7 @@ class Hooks implements
|
||||||
$page = $article->getPage();
|
$page = $article->getPage();
|
||||||
$title = $article->getTitle();
|
$title = $article->getTitle();
|
||||||
$revisionRecord = $page->getRevisionRecord();
|
$revisionRecord = $page->getRevisionRecord();
|
||||||
|
$skin = $article->getContext()->getSkin();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'action' => $action,
|
'action' => $action,
|
||||||
|
@ -155,6 +157,10 @@ class Hooks implements
|
||||||
'user_is_temp' => $user->isTemp(),
|
'user_is_temp' => $user->isTemp(),
|
||||||
'user_editcount' => $this->userEditTracker->getUserEditCount( $user ) ?: 0,
|
'user_editcount' => $this->userEditTracker->getUserEditCount( $user ) ?: 0,
|
||||||
'mw_version' => MW_VERSION,
|
'mw_version' => MW_VERSION,
|
||||||
|
'skin' => $skin->getSkinName(),
|
||||||
|
'is_bot' => $user->isRegistered() && $user->isBot(),
|
||||||
|
'is_anon' => $user->isAnon(),
|
||||||
|
'wiki' => WikiMap::getCurrentWikiId(),
|
||||||
] + $data;
|
] + $data;
|
||||||
|
|
||||||
$bucket = ExtensionRegistry::getInstance()->isLoaded( 'DiscussionTools' ) ?
|
$bucket = ExtensionRegistry::getInstance()->isLoaded( 'DiscussionTools' ) ?
|
||||||
|
@ -177,7 +183,7 @@ class Hooks implements
|
||||||
EventLogging::submit(
|
EventLogging::submit(
|
||||||
'eventlogging_EditAttemptStep',
|
'eventlogging_EditAttemptStep',
|
||||||
[
|
[
|
||||||
'$schema' => '/analytics/legacy/editattemptstep/1.4.1',
|
'$schema' => '/analytics/legacy/editattemptstep/2.0.0',
|
||||||
'event' => $data,
|
'event' => $data,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue