mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-11-28 02:00:17 +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": [
|
"BeforePageDisplay": [
|
||||||
"RelatedArticles\\Hooks::onBeforePageDisplay"
|
"RelatedArticles\\Hooks::onBeforePageDisplay"
|
||||||
],
|
],
|
||||||
"EventLoggingRegisterSchemas": [
|
|
||||||
"RelatedArticles\\Hooks::onEventLoggingRegisterSchemas"
|
|
||||||
],
|
|
||||||
"ResourceLoaderGetConfigVars": [
|
"ResourceLoaderGetConfigVars": [
|
||||||
"RelatedArticles\\Hooks::onResourceLoaderGetConfigVars"
|
"RelatedArticles\\Hooks::onResourceLoaderGetConfigVars"
|
||||||
],
|
],
|
||||||
|
@ -155,6 +152,9 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"EventLoggingSchemas": {
|
||||||
|
"RelatedArticles": 16352530
|
||||||
|
},
|
||||||
"config": {
|
"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": "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,
|
"RelatedArticlesCardLimit": 3,
|
||||||
|
|
|
@ -123,26 +123,6 @@ class Hooks {
|
||||||
return true;
|
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
|
* ResourceLoaderGetConfigVars hook handler for setting a config variable
|
||||||
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars
|
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars
|
||||||
|
|
Loading…
Reference in a new issue