Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/304682
Change subject: Adapt code sample to provide the extension.json version instead
of PHP
......................................................................
Adapt code sample to provide the extension.json version instead of PHP
Change-Id: I247354081cae1e1def41aac4f408b39e37f14585
---
M i18n/core/en.json
M i18n/core/qqq.json
M includes/JsonSchemaContent.php
3 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventLogging
refs/changes/82/304682/1
diff --git a/i18n/core/en.json b/i18n/core/en.json
index 609ae24..6e6af30 100644
--- a/i18n/core/en.json
+++ b/i18n/core/en.json
@@ -8,8 +8,8 @@
"eventlogging-invalid-json": "Invalid JSON",
"eventlogging-revision-id": "Revision $1",
"eventlogging-code-sample-logging-on-server-side": "PHP logging",
- "eventlogging-code-sample-module-setup": "PHP setup for JavaScript
logging",
+ "eventlogging-code-sample-module-setup-json": "extension.json setup for
JavaScript logging",
"eventlogging-code-sample-logging-on-client-side": "JavaScript logging",
"eventlogging-error-move-source": "Schema pages may not be renamed",
"eventlogging-error-move-destination": "Pages may not be renamed to
Schema pages"
-}
\ No newline at end of file
+}
diff --git a/i18n/core/qqq.json b/i18n/core/qqq.json
index 1ff3784..a017d04 100644
--- a/i18n/core/qqq.json
+++ b/i18n/core/qqq.json
@@ -12,7 +12,7 @@
"eventlogging-invalid-json": "Error shown when an editor attempts to
save a Schema article edit that is not valid JSON.\n{{Identical|Invalid JSON}}",
"eventlogging-revision-id": "The numeric ID of the displayed revision,
shown in the page subtitle.\n\nParameters:\n* $1 - revision
ID\n{{Identical|Revision}}",
"eventlogging-code-sample-logging-on-server-side": "Code sample for
logging a server-side event",
- "eventlogging-code-sample-module-setup": "Code sample for setting up a
ResourceLoader module",
+ "eventlogging-code-sample-module-setup-json": "Code sample for setting
up a ResourceLoader module",
"eventlogging-code-sample-logging-on-client-side": "Code sample for
logging a client-side event",
"eventlogging-error-move-source": "Error shown when an editor attempts
to move a page in the \"Schema\" namespace, which controls the functioning of
this extension.",
"eventlogging-error-move-destination": "Error shown when an editor
attempts to move an article into the Schema namespace"
diff --git a/includes/JsonSchemaContent.php b/includes/JsonSchemaContent.php
index 4e06c08..05deaea 100644
--- a/includes/JsonSchemaContent.php
+++ b/includes/JsonSchemaContent.php
@@ -122,9 +122,9 @@
'header' =>
'eventlogging-code-sample-logging-on-server-side',
'code' => "EventLogging::logEvent( '$dbKey',
$revId, \$event );",
], [
- 'language' => 'php',
- 'header' =>
'eventlogging-code-sample-module-setup',
- 'code' => "\$wgEventLoggingSchemas[ '{$dbKey}'
] = {$revId};",
+ 'language' => 'json',
+ 'header' =>
'eventlogging-code-sample-module-setup-json',
+ 'code' => "{\n\t\"EventLoggingSchemas\":
{\n\t\t\"$dbKey\": $revId\n\t}\n}",
], [
'language' => 'javascript',
'header' =>
'eventlogging-code-sample-logging-on-client-side',
--
To view, visit https://gerrit.wikimedia.org/r/304682
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I247354081cae1e1def41aac4f408b39e37f14585
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits