Gerharddiller85 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/305249
Change subject: SaferEdit: using extension.json
......................................................................
SaferEdit: using extension.json
Change-Id: I2c1c9b317fc46ef997c374f4b4e21720e5c4a6c4
---
M SaferEdit/SaferEdit.class.php
M SaferEdit/SaferEdit.setup.php
A SaferEdit/extension.json
3 files changed, 53 insertions(+), 60 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions
refs/changes/49/305249/1
diff --git a/SaferEdit/SaferEdit.class.php b/SaferEdit/SaferEdit.class.php
index 69f0c05..8110b49 100644
--- a/SaferEdit/SaferEdit.class.php
+++ b/SaferEdit/SaferEdit.class.php
@@ -39,32 +39,6 @@
class SaferEdit extends BsExtensionMW {
private $aIntermediateEditsForCurrentTitle = null;
- /**
- * Constructor of SaferEdit class
- */
- public function __construct() {
- wfProfileIn( 'BS::'.__METHOD__ );
-
- // Base settings
- $this->mExtensionFile = __FILE__;
- $this->mExtensionType = EXTTYPE::VARIABLE;
- $this->mInfo = array(
- EXTINFO::NAME => 'SaferEdit',
- EXTINFO::DESCRIPTION => 'bs-saferedit-desc',
- EXTINFO::AUTHOR => array ( 'Markus Glaser',
'Tobias Weichart' ),
- EXTINFO::VERSION => 'default',
- EXTINFO::STATUS => 'default',
- EXTINFO::PACKAGE => 'default',
- EXTINFO::URL =>
'https://help.bluespice.com/index.php/SaferEdit',
- EXTINFO::DEPS => array(
-
'bluespice' => '2.22.0',
-
'StateBar' => '2.22.0'
-
)
- );
- $this->mExtensionKey = 'MW::SaferEdit';
-
- wfProfileOut( 'BS::'.__METHOD__ );
- }
/**
* Initialization of SaferEdit extension
diff --git a/SaferEdit/SaferEdit.setup.php b/SaferEdit/SaferEdit.setup.php
index cde2da6..48e007f 100644
--- a/SaferEdit/SaferEdit.setup.php
+++ b/SaferEdit/SaferEdit.setup.php
@@ -1,35 +1,2 @@
<?php
-
-BsExtensionManager::registerExtension('SaferEdit',
BsRUNLEVEL::FULL|BsRUNLEVEL::REMOTE);
-
-$wgMessagesDirs['SaferEdit'] = __DIR__ . '/i18n';
-
-$wgAutoloadClasses['SaferEdit'] = __DIR__ . '/SaferEdit.class.php';
-
-$wgResourceModules['ext.bluespice.saferedit.general'] = array(
- 'scripts' => 'bluespice.SaferEdit.general.js',
- 'position' => 'bottom',
- 'localBasePath' => $IP .
'/extensions/BlueSpiceExtensions/SaferEdit/resources',
- 'remoteExtPath' => 'BlueSpiceExtensions/SaferEdit/resources',
-);
-
-$wgResourceModules['ext.bluespice.saferedit.editmode'] = array(
- 'scripts' => 'bluespice.SaferEdit.editmode.js',
- 'messages' => array(
- 'bs-saferedit-lastsavedversion',
- 'bs-saferedit-restore',
- 'bs-extjs-cancel',
- 'bs-saferedit-unsavedchanges',
- 'bs-saferedit-othersectiontitle',
- 'bs-saferedit-othersectiontext1',
- 'bs-saferedit-othersectiontext2',
- 'bs-saferedit-othersectiontext3'
- ),
- 'dependencies' => array(
- 'ext.bluespice.saferedit.general'
- ),
- 'localBasePath' => $IP .
'/extensions/BlueSpiceExtensions/SaferEdit/resources',
- 'remoteExtPath' => 'BlueSpiceExtensions/SaferEdit/resources',
-);
-
-$wgHooks['LoadExtensionSchemaUpdates'][] = 'SaferEdit::getSchemaUpdates';
\ No newline at end of file
+wfLoadExtension( 'BlueSpiceExtensions/SaferEdit' );
\ No newline at end of file
diff --git a/SaferEdit/extension.json b/SaferEdit/extension.json
new file mode 100644
index 0000000..23918c0
--- /dev/null
+++ b/SaferEdit/extension.json
@@ -0,0 +1,52 @@
+{
+ "name": "SaferEdit",
+ "version": "2.27.0",
+ "url": "https://help.bluespice.com/index.php/SaferEdit",
+ "author": "Markus Glaser,Tobias Weichart",
+ "descriptionmsg": "bs-saferedit-desc",
+ "type": "bluespice",
+ "bsgExtensions": {
+ "SaferEdit": {
+ "className": "SaferEdit",
+ "extPath": "/BlueSpiceExtensions/SaferEdit"
+ }
+ },
+ "MessagesDirs": {
+ "SaferEdit": [
+ "i18n"
+ ]
+ },
+ "AutoloadClasses": {
+ "SaferEdit": "SaferEdit.class.php"
+ },
+ "ResourceModules": {
+ "ext.bluespice.saferedit.general": {
+ "scripts": "bluespice.SaferEdit.general.js",
+ "position": "bottom"
+ },
+ "ext.bluespice.saferedit.editmode": {
+ "scripts": "bluespice.SaferEdit.editmode.js",
+ "messages": [
+ "bs-saferedit-lastsavedversion",
+ "bs-saferedit-restore",
+ "bs-extjs-cancel",
+ "bs-saferedit-unsavedchanges",
+ "bs-saferedit-othersectiontitle",
+ "bs-saferedit-othersectiontext1",
+ "bs-saferedit-othersectiontext2",
+ "bs-saferedit-othersectiontext3"
+ ],
+ "dependencies": [
+ "ext.bluespice.saferedit.general"
+ ]
+ }
+ },
+ "ResourceFileModulePaths": {
+ "localBasePath":
"/extensions/BlueSpiceExtensions/SaferEdit/resources",
+ "remoteExtPath": "BlueSpiceExtensions/SaferEdit/resources"
+ },
+ "Hooks": {
+ "LoadExtensionSchemaUpdates": "SaferEdit::getSchemaUpdates"
+ },
+ "manifest_version": 1
+}
--
To view, visit https://gerrit.wikimedia.org/r/305249
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c1c9b317fc46ef997c374f4b4e21720e5c4a6c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Gerharddiller85 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits