mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-24 00:05:00 +00:00
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:
parent
8fa74a8bb3
commit
d6312c80c4
|
@ -3,6 +3,6 @@
|
|||
$namespaceNames = array();
|
||||
|
||||
$namespaceNames['en'] = array(
|
||||
NS_MODULE => 'Module',
|
||||
NS_MODULE_TALK => 'Module_talk',
|
||||
828 => 'Module',
|
||||
829 => 'Module_talk',
|
||||
);
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue