Make the module namespace ID a large fixed integer

Fix for bug 37641. Referencing a constant defined in the extension
registration file breaks some scripts. Referencing a constant defined in
an extension setup function is even worse. So it's not really possible
to configure the namespace number.

To update:

UPDATE page SET page_namespace=page_namespace+808
WHERE page_namespace IN (20,21);

Change-Id: I18e53127147f62a8b2058537f7b054c253ba126e
This commit is contained in:
Tim Starling 2012-08-15 10:57:30 +10:00
parent 8fa74a8bb3
commit d6312c80c4
2 changed files with 4 additions and 17 deletions

View file

@ -3,6 +3,6 @@
$namespaceNames = array();
$namespaceNames['en'] = array(
NS_MODULE => 'Module',
NS_MODULE_TALK => 'Module_talk',
828 => 'Module',
829 => 'Module_talk',
);

View file

@ -134,14 +134,6 @@ $wgScribuntoEngineConf = array(
),
);
/**
* Script namespace numbers.
*/
$wgScribuntoNamespaceNumbers = array(
'Module' => 20,
'Module_talk' => 21,
);
/**
* Set to true to enable the SyntaxHighlight_GeSHi extension
*/
@ -152,10 +144,5 @@ $wgScribuntoUseGeSHi = false;
*/
$wgScribuntoUseCodeEditor = false;
function efDefineScribuntoNamespace() {
global $wgScribuntoNamespaceNumbers;
define( 'NS_MODULE', $wgScribuntoNamespaceNumbers['Module'] );
define( 'NS_MODULE_TALK', $wgScribuntoNamespaceNumbers['Module_talk'] );
}
$wgExtensionFunctions[] = 'efDefineScribuntoNamespace';
define( 'NS_MODULE', 828 );
define( 'NS_MODULE_TALK', 829 );