Mglaser has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/350424 )
Change subject: Updated onWriteNamespaceConfiguration to new signature
......................................................................
Updated onWriteNamespaceConfiguration to new signature
This fixes a bug where newly added namespaces would not keep the
SMW setting
Change-Id: Ib590ceecacab21eda34d82c99291ae6ccec12f04
---
M includes/BSSMWCNamespaceManager.php
1 file changed, 5 insertions(+), 3 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceSMWConnector
refs/changes/24/350424/1
diff --git a/includes/BSSMWCNamespaceManager.php
b/includes/BSSMWCNamespaceManager.php
index a4c7d33..aa2c12d 100644
--- a/includes/BSSMWCNamespaceManager.php
+++ b/includes/BSSMWCNamespaceManager.php
@@ -29,7 +29,7 @@
public static function onEditNamespace( &$aNamespaceDefinitions, &$iNS,
$aAdditionalSettings, $bUseInternalDefaults = false ) {
- if ( !$bUseInternalDefaults ) {
+ if ( !$bUseInternalDefaults && isset(
$aAdditionalSettings['smw'] ) ) {
$aNamespaceDefinitions[$iNS][ 'smw' ] =
$aAdditionalSettings['smw'];
}
else {
@@ -38,10 +38,12 @@
return true;
}
- public static function onWriteNamespaceConfiguration( &$sSaveContent,
$sConstName, $aDefinition ) {
+ public static function onWriteNamespaceConfiguration( &$sSaveContent,
$sConstName, $iNsID, $aDefinition ) {
global $smwgNamespacesWithSemanticLinks;
- $iNsID = constant( $sConstName );
+ if ( $iNsID === null ) {
+ return true;
+ }
$bCurrentlyActivated = isset( $smwgNamespacesWithSemanticLinks[
$iNsID ] )
? $smwgNamespacesWithSemanticLinks[ $iNsID ]
: false;
--
To view, visit https://gerrit.wikimedia.org/r/350424
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib590ceecacab21eda34d82c99291ae6ccec12f04
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceSMWConnector
Gerrit-Branch: master
Gerrit-Owner: Mglaser <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits