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

Change subject: NamespaceManager: include namespace number in write hook
......................................................................

NamespaceManager: include namespace number in write hook

This allows extensions to refer to the namespace even when a namespace
is being added and a number cannot yet be found.

Change-Id: I464c49185985eec8311e13b6aba6ff914f067447
---
M NamespaceManager/NamespaceManager.class.php
M NamespaceManager/doc/Hooks.txt
2 files changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/NamespaceManager/NamespaceManager.class.php 
b/NamespaceManager/NamespaceManager.class.php
index 8eaf352..19cc383 100644
--- a/NamespaceManager/NamespaceManager.class.php
+++ b/NamespaceManager/NamespaceManager.class.php
@@ -189,7 +189,7 @@
                return true;
        }
 
-       public function onWriteNamespaceConfiguration( &$sSaveContent, 
$sConstName, $aDefinition ) {
+       public function onWriteNamespaceConfiguration( &$sSaveContent, 
$sConstName, $iNs, $aDefinition ) {
                if ( isset( $aDefinition[ 'content' ] ) && 
$aDefinition['content'] === true ) {
                        $sSaveContent .= "\$GLOBALS['wgContentNamespaces'][] = 
{$sConstName};\n";
                }
@@ -265,7 +265,7 @@
                                        $sSaveContent .= 
"\$GLOBALS['wgExtraNamespaces'][{$sConstName}] = '" . $aDefinition['name'] . 
"';\n";
                                }
 
-                               Hooks::run( 
'NamespaceManager::writeNamespaceConfiguration', array( &$sSaveContent, 
$sConstName, $aDefinition ) );
+                               Hooks::run( 
'NamespaceManager::writeNamespaceConfiguration', array( &$sSaveContent, 
$sConstName, $iNS, $aDefinition ) );
                                if ( !$bIsSystemNs && isset( 
$aDefinition['alias'] ) && $aDefinition['alias'] ) {
                                        $sSaveContent .= 
"\$GLOBALS['wgNamespaceAliases']['{$aDefinition['alias']}'] = {$sConstName};\n";
                                }
diff --git a/NamespaceManager/doc/Hooks.txt b/NamespaceManager/doc/Hooks.txt
index ae50424..02ff094 100644
--- a/NamespaceManager/doc/Hooks.txt
+++ b/NamespaceManager/doc/Hooks.txt
@@ -36,6 +36,7 @@
 'NamespaceManager::writeNamespaceConfiguration':
 &$sSaveContent:
  $sConstName:
+ $iNs:
  $aDefinition:
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I464c49185985eec8311e13b6aba6ff914f067447
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to