mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-11-27 17:50:25 +00:00
Register EventLogging schema in extension.json
Change-Id: I4079f13a6708ad4376b7686c3926cd59ff90aaa7
This commit is contained in:
parent
d76a4fde65
commit
0837f19dcd
|
@ -36,9 +36,6 @@
|
|||
"BeforePageDisplay": [
|
||||
"RelatedArticles\\Hooks::onBeforePageDisplay"
|
||||
],
|
||||
"EventLoggingRegisterSchemas": [
|
||||
"RelatedArticles\\Hooks::onEventLoggingRegisterSchemas"
|
||||
],
|
||||
"ResourceLoaderGetConfigVars": [
|
||||
"RelatedArticles\\Hooks::onResourceLoaderGetConfigVars"
|
||||
],
|
||||
|
@ -155,6 +152,9 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"EventLoggingSchemas": {
|
||||
"RelatedArticles": 16352530
|
||||
},
|
||||
"config": {
|
||||
"@RelatedArticlesCardLimit": "Maximum number of articles that should be shown in RelatedArticles widget. This limit is derived from limits in TextExtracts and PageImages extensions. Number should be between 1 and 20.",
|
||||
"RelatedArticlesCardLimit": 3,
|
||||
|
|
|
@ -123,26 +123,6 @@ class Hooks {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* EventLoggingRegisterSchemas hook handler.
|
||||
*
|
||||
* Registers our EventLogging schemas so that they can be converted to
|
||||
* ResourceLoaderSchemaModules by the EventLogging extension.
|
||||
*
|
||||
* If the module has already been registered in
|
||||
* onResourceLoaderRegisterModules, then it is overwritten.
|
||||
*
|
||||
* @param array &$schemas The schemas currently registered with the EventLogging
|
||||
* extension
|
||||
* @return bool Always true
|
||||
*/
|
||||
public static function onEventLoggingRegisterSchemas( &$schemas ) {
|
||||
// @see https://meta.wikimedia.org/wiki/Schema:RelatedArticles
|
||||
$schemas['RelatedArticles'] = 16352530;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* ResourceLoaderGetConfigVars hook handler for setting a config variable
|
||||
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars
|
||||
|
|
Loading…
Reference in a new issue