Niharika29 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/378125 )
Change subject: Register Eventlogging schema ...................................................................... Register Eventlogging schema Bug: T175756 Change-Id: Icf48d609ce7dd6117137a066e87eb08fe8ee981d (cherry picked from commit dbabca174c5d040d47503877aacc3a3c34a3a92a) --- M extension.json M includes/Hooks.php 2 files changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleCreationWorkflow refs/changes/25/378125/1 diff --git a/extension.json b/extension.json index 7b53a0e..3448f74 100644 --- a/extension.json +++ b/extension.json @@ -12,7 +12,8 @@ "Hooks": { "CustomEditor": "ArticleCreationWorkflow\\Hooks::onCustomEditor", "ShowMissingArticle": "ArticleCreationWorkflow\\Hooks::onShowMissingArticle", - "BeforePageDisplay": "ArticleCreationWorkflow\\Hooks::onBeforePageDisplay" + "BeforePageDisplay": "ArticleCreationWorkflow\\Hooks::onBeforePageDisplay", + "EventLoggingRegisterSchemas": "ArticleCreationWorkflow\\Hooks::onEventLoggingRegisterSchemas" }, "AutoloadClasses": { "ArticleCreationWorkflow\\Hooks": "includes/Hooks.php", @@ -42,6 +43,15 @@ "ArticleCreationLandingPage": { "description": "The name of the wiki page to which users should be redirected if intercepted.", "value": "Project:Article wizard" + }, + "ArticleCreationEventLoggingSchemas": { + "value": { + "ArticleCreationWorkflow": { + "enabled": true, + "revision": 17145434 + } + }, + "merge_strategy": "array_plus_2d" } }, "ConfigRegistry": { diff --git a/includes/Hooks.php b/includes/Hooks.php index 5c92238..22d131f 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -84,4 +84,19 @@ $out->addModules( 'ext.acw.eventlogging' ); } } + + /** + * EventLoggingRegisterSchemas hook handler + * Register our eventlogging schema + * + * @param array &$schemas Schemas array for eventlogging + */ + public static function onEventLoggingRegisterSchemas( array &$schemas ) { + global $wgArticleCreationEventLoggingSchemas; + foreach ( $wgArticleCreationEventLoggingSchemas as $schema => $property ) { + if ( $property['enabled'] ) { + $schemas[$schema] = $property['revision']; + } + } + } } -- To view, visit https://gerrit.wikimedia.org/r/378125 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf48d609ce7dd6117137a066e87eb08fe8ee981d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticleCreationWorkflow Gerrit-Branch: wmf/1.30.0-wmf.18 Gerrit-Owner: Niharika29 <nko...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits