mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-24 00:06:49 +00:00
Merge "Replace use of old $wgVersion constant with MW_VERSION"
This commit is contained in:
commit
b2f709e5ff
|
@ -13,7 +13,7 @@
|
||||||
"license-name": "GPL-2.0-or-later",
|
"license-name": "GPL-2.0-or-later",
|
||||||
"type": "editor",
|
"type": "editor",
|
||||||
"requires": {
|
"requires": {
|
||||||
"MediaWiki": ">= 1.34.0"
|
"MediaWiki": ">= 1.34.1"
|
||||||
},
|
},
|
||||||
"MessagesDirs": {
|
"MessagesDirs": {
|
||||||
"WikiEditor": [
|
"WikiEditor": [
|
||||||
|
|
|
@ -27,7 +27,7 @@ class WikiEditorHooks {
|
||||||
* @return bool Whether the event was logged or not.
|
* @return bool Whether the event was logged or not.
|
||||||
*/
|
*/
|
||||||
public static function doEventLogging( $action, $article, $data = [] ) {
|
public static function doEventLogging( $action, $article, $data = [] ) {
|
||||||
global $wgVersion, $wgWMESchemaEditAttemptStepSamplingRate;
|
global $wgWMESchemaEditAttemptStepSamplingRate;
|
||||||
$extensionRegistry = ExtensionRegistry::getInstance();
|
$extensionRegistry = ExtensionRegistry::getInstance();
|
||||||
if ( !$extensionRegistry->isLoaded( 'EventLogging' ) ) {
|
if ( !$extensionRegistry->isLoaded( 'EventLogging' ) ) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -61,7 +61,7 @@ class WikiEditorHooks {
|
||||||
'revision_id' => $revisionRecord ? $revisionRecord->getId() : 0,
|
'revision_id' => $revisionRecord ? $revisionRecord->getId() : 0,
|
||||||
'user_id' => $user->getId(),
|
'user_id' => $user->getId(),
|
||||||
'user_editcount' => $user->getEditCount() ?: 0,
|
'user_editcount' => $user->getEditCount() ?: 0,
|
||||||
'mw_version' => $wgVersion,
|
'mw_version' => MW_VERSION,
|
||||||
] + $data;
|
] + $data;
|
||||||
|
|
||||||
if ( $user->isAnon() ) {
|
if ( $user->isAnon() ) {
|
||||||
|
|
Loading…
Reference in a new issue