Robert Vogel has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/394030 )
Change subject: BlueSpiceNamespaceManager: Change config
..
BlueSpiceNamespaceManager: Change config
Added config-data in extension.json.
Removed BsConfig::registerVar-methods in main-class.
Corrected get-methods.
Changed manifest-version to version 2.
Corrected get-methods
Change-Id: I39d65b93f1afb9efb2b07f90162b360cb6134a0c
---
M NamespaceManager.class.php
M extension.json
M includes/api/BSApiNamespaceTasks.php
3 files changed, 19 insertions(+), 9 deletions(-)
Approvals:
Pwirth: Verified; Looks good to me, approved
diff --git a/NamespaceManager.class.php b/NamespaceManager.class.php
index 2ef82c3..c6d4c3c 100644
--- a/NamespaceManager.class.php
+++ b/NamespaceManager.class.php
@@ -67,8 +67,6 @@
public function initExt() {
wfProfileIn( 'BS::'.__METHOD__ );
- BsConfig::registerVar( 'MW::NamespaceManager::NsOffset', 2999,
BsConfig::TYPE_INT, BsConfig::LEVEL_PRIVATE );
-
$this->mCore->registerPermission(
'namespacemanager-viewspecialpage', array( 'sysop' ), array( 'type' => 'global'
) );
$this->setHook( 'NamespaceManager::editNamespace',
'onEditNamespace', true );
diff --git a/extension.json b/extension.json
index f521382..c399168 100644
--- a/extension.json
+++ b/extension.json
@@ -10,10 +10,14 @@
],
"descriptionmsg": "bs-namespacemanager-desc",
"type": "bluespice",
- "bsgExtensions": {
- "BlueSpiceNamespaceManager": {
- "className": "NamespaceManager",
- "extPath": "/BlueSpiceNamespaceManager"
+ "attributes": {
+ "BlueSpiceFoundation": {
+ "Extensions": {
+ "BlueSpiceNamespaceManager": {
+ "className": "NamespaceManager",
+ "extPath": "/BlueSpiceNamespaceManager"
+ }
+ }
}
},
"callback": "NamespaceManager::onRegistration",
@@ -40,6 +44,12 @@
},
"ExtensionMessagesFiles": {
"NamespaceManagerAlias":
"includes/specials/SpecialNamespaceManager.alias.php"
+ },
+ "config-prefix": "bsg",
+ "config": {
+ "NamespaceManagerNsOffset": {
+ "value": 2999
+ }
},
"AutoloadClasses": {
"NamespaceManager": "NamespaceManager.class.php",
@@ -80,5 +90,5 @@
"remoteExtPath": "BlueSpiceNamespaceManager"
},
"load_composer_autoloader" : true,
- "manifest_version": 1
+ "manifest_version": 2
}
diff --git a/includes/api/BSApiNamespaceTasks.php
b/includes/api/BSApiNamespaceTasks.php
index 7ec9db0..4cc7a85 100644
--- a/includes/api/BSApiNamespaceTasks.php
+++ b/includes/api/BSApiNamespaceTasks.php
@@ -111,8 +111,10 @@
$iNS = key( $aNamespaces ) + 1;
reset( $aNamespaces );
- if ( $iNS < BsConfig::get( 'MW::NamespaceManager::NsOffset' ) )
{
- $iNS = BsConfig::get( 'MW::NamespaceManager::NsOffset'
) + 1;
+ $config =
\MediaWiki\MediaWikiServices::getInstance()->getConfigFactory()->makeConfig(
'bsg' );
+
+ if ( $iNS < $config->get( 'MW::NamespaceManager::NsOffset' ) ) {
+ $iNS = $config->get( 'MW::NamespaceManager::NsOffset' )
+ 1;
}
$sResult = true;
--
To view, visit https://gerrit.wikimedia.org/r/394030
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I39d65b93f1afb9efb2b07f90162b360cb6134a0c
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/BlueSpiceNamespaceManager
Gerrit-Branch: master
Gerrit-Owner: Pmiguelpirzer
Gerrit-Reviewer: Ljonka
Gerrit-Reviewer: Mglaser
Gerrit-Reviewer: Pwirth
Gerrit-Reviewer: Robert Vogel
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits