Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/372910 )

Change subject: Cleanup incorrect usage of config_prefix, use 
ResourceFileModulePaths
......................................................................

Cleanup incorrect usage of config_prefix, use ResourceFileModulePaths

config_prefix is meant for a migration of variables using the legacy $eg
prefix, not for each extension to define their own.

Also use the ResourceFileModulePaths feature to specify all resources
are in the modules/ directory so it doesn't need to be repeated for each
file.

Change-Id: Iab7b0ea68aae547ffe541e411910f2ff120de625
---
M BoilerPlate.hooks.php
M extension.json
2 files changed, 14 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BoilerPlate 
refs/changes/10/372910/1

diff --git a/BoilerPlate.hooks.php b/BoilerPlate.hooks.php
index f850b31..d166e90 100644
--- a/BoilerPlate.hooks.php
+++ b/BoilerPlate.hooks.php
@@ -9,10 +9,14 @@
 class BoilerPlateHooks {
 
        /**
-        * @return GlobalVarConfig
+        * Hook: NameOfHook
+        *
+        * @param string $arg1 First argument
+        * @param bool $arg2 Second argument
+        * @param bool $arg3 Third argument
         */
-       public static function makeConfig() {
-               return new GlobalVarConfig( 'boilerplate' );
+       public static function onNameOfHook( $arg1, $arg2, $arg3 ) {
+               // Stub
        }
 
 }
diff --git a/extension.json b/extension.json
index 852177e..928541b 100644
--- a/extension.json
+++ b/extension.json
@@ -12,12 +12,11 @@
                "BoilerPlateHooks": "BoilerPlate.hooks.php",
                "SpecialHelloWorld": "specials/SpecialHelloWorld.php"
        },
-       "config_prefix": "boilerplate",
        "ConfigRegistry": {
-               "boilerplate": "BoilerPlateHooks::makeConfig"
+               "boilerplate": "GlobalVarConfig::newInstance"
        },
        "config": {
-               "EnableFoo": {
+               "BoilerPlateEnableFoo": {
                        "value": true,
                        "description": "Whether or not the foo feature is 
enabled."
                }
@@ -38,19 +37,19 @@
        "ResourceModules": {
                "ext.boilerPlate.foo": {
                        "scripts": [
-                               "modules/ext.boilerPlate.js",
-                               "modules/ext.boilerPlate.foo.js"
+                               "ext.boilerPlate.js",
+                               "ext.boilerPlate.foo.js"
                        ],
                        "styles": [
-                               "modules/ext.boilerPlate.foo.css"
+                               "ext.boilerPlate.foo.css"
                        ],
                        "messages": [],
                        "dependencies": []
                }
        },
        "ResourceFileModulePaths": {
-               "localBasePath": "",
-               "remoteExtPath": "BoilerPlate"
+               "localBasePath": "modules",
+               "remoteExtPath": "BoilerPlate/modules"
        },
        "SpecialPages": {
                "HelloWorld": "SpecialHelloWorld"

-- 
To view, visit https://gerrit.wikimedia.org/r/372910
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab7b0ea68aae547ffe541e411910f2ff120de625
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BoilerPlate
Gerrit-Branch: master
Gerrit-Owner: Legoktm <lego...@member.fsf.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to