Gerharddiller85 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/305215

Change subject: FormattingHelp: using extension.json
......................................................................

FormattingHelp: using extension.json

Change-Id: I7e30add4a67e9b21e6af9ee28f9d5238ee559792
---
M FormattingHelp/FormattingHelp.class.php
M FormattingHelp/FormattingHelp.setup.php
A FormattingHelp/extension.json
3 files changed, 46 insertions(+), 54 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/15/305215/1

diff --git a/FormattingHelp/FormattingHelp.class.php 
b/FormattingHelp/FormattingHelp.class.php
index 9a28200..3a5311a 100644
--- a/FormattingHelp/FormattingHelp.class.php
+++ b/FormattingHelp/FormattingHelp.class.php
@@ -36,30 +36,6 @@
  * @subpackage FormattingHelp
  */
 class FormattingHelp extends BsExtensionMW {
-
-       /**
-        * Constructor of FormattingHelp class
-        */
-       public function __construct() {
-               wfProfileIn( 'BS::'.__METHOD__ );
-
-               $this->mExtensionFile = __FILE__;
-               $this->mExtensionType = EXTTYPE::VARIABLE;
-               $this->mInfo = array(
-                       EXTINFO::NAME        => 'FormattingHelp',
-                       EXTINFO::DESCRIPTION => 'bs-formattinghelp-desc',
-                       EXTINFO::AUTHOR      => 'Markus Glaser',
-                       EXTINFO::VERSION     => 'default',
-                       EXTINFO::STATUS      => 'default',
-                       EXTINFO::PACKAGE     => 'default',
-                       EXTINFO::URL         => 
'https://help.bluespice.com/index.php/FormattingHelp',
-                       EXTINFO::DEPS        => array('bluespice' => '2.22.0')
-               );
-               $this->mExtensionKey = 'MW::FormattingHelp';
-
-               wfProfileOut( 'BS::'.__METHOD__ );
-       }
-
        /**
         * Initialization of Blog extension
         */
diff --git a/FormattingHelp/FormattingHelp.setup.php 
b/FormattingHelp/FormattingHelp.setup.php
index 7abab9e..ee76d59 100644
--- a/FormattingHelp/FormattingHelp.setup.php
+++ b/FormattingHelp/FormattingHelp.setup.php
@@ -1,31 +1,2 @@
 <?php
-BsExtensionManager::registerExtension('FormattingHelp', 
BsRUNLEVEL::FULL|BsRUNLEVEL::REMOTE);
-
-$wgAutoloadClasses['FormattingHelp'] = __DIR__ . '/FormattingHelp.class.php';
-
-$wgMessagesDirs['FormattingHelp'] = __DIR__ . '/i18n';
-
-$wgAutoloadClasses['BSApiTasksFormattingHelp'] = __DIR__ . 
'/includes/api/BSApiTasksFormattingHelp.php';
-$wgAPIModules['bs-formattinghelp'] = 'BSApiTasksFormattingHelp';
-
-$aResourceModuleTemplate = array(
-       'localBasePath' => __DIR__ . '/resources',
-       'remoteExtPath' => 'BlueSpiceExtensions/FormattingHelp/resources'
-);
-
-$wgResourceModules['ext.bluespice.formattinghelp'] = array(
-       'scripts' => 'bluespice.formattinghelp.js',
-       'messages' => array(
-               'bs-formattinghelp-formatting',
-               'bs-formattinghelp-help-text'
-       ),
-       'dependencies' => 'mediawiki.action.edit',
-) + $aResourceModuleTemplate;
-
-$wgResourceModules['ext.bluespice.formattinghelp.styles'] = array(
-       'styles' => 'bluespice.formattinghelp.css',
-       'position' => 'top'
-) + $aResourceModuleTemplate;
-
-unset($aResourceModuleTemplate);
-unset( $sDir );
\ No newline at end of file
+wfLoadExtension( 'BlueSpiceExtensions/FormattingHelp' );
\ No newline at end of file
diff --git a/FormattingHelp/extension.json b/FormattingHelp/extension.json
new file mode 100644
index 0000000..463b10f
--- /dev/null
+++ b/FormattingHelp/extension.json
@@ -0,0 +1,45 @@
+{
+        "name": "FormattingHelp",
+       "version": "2.27.0",
+       "url": "https://help.bluespice.com/index.php/FormattingHelp";,
+       "author": "Markus Glaser",
+       "descriptionmsg": "bs-formattinghelp-desc",
+       "type": "bluespice",
+       "bsgExtensions": {
+               "FormattingHelp": {
+                       "className": "FormattingHelp",
+                       "extPath": "/BlueSpiceExtensions/FormattingHelp"
+               }
+       },
+       "APIModules": {
+               "bs-formattinghelp": "BSApiTasksFormattingHelp"
+       },
+       "MessagesDirs": {
+               "FormattingHelp": [
+                       "i18n"
+               ]
+       },
+       "AutoloadClasses": {
+               "FormattingHelp": "FormattingHelp.class.php",
+               "BSApiTasksFormattingHelp": 
"includes/api/BSApiTasksFormattingHelp.php"
+       },
+       "ResourceModules": {
+               "ext.bluespice.formattinghelp": {
+                       "scripts": "bluespice.formattinghelp.js",
+                       "messages": [
+                               "bs-formattinghelp-formatting",
+                               "bs-formattinghelp-help-text"
+                       ],
+                       "dependencies": "mediawiki.action.edit"
+               },
+               "ext.bluespice.formattinghelp.styles": {
+                       "styles": "bluespice.formattinghelp.css",
+                       "position": "top"
+               }
+       },
+       "ResourceFileModulePaths": {
+               "localBasePath": "resources",
+               "remoteExtPath": "BlueSpiceExtensions/FormattingHelp/resources"
+       },
+       "manifest_version": 1
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e30add4a67e9b21e6af9ee28f9d5238ee559792
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Gerharddiller85 <gerharddil...@icloud.com>

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

Reply via email to