mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-09-24 02:39:48 +00:00
Define namespace constants after whole configuration was loaded. This allows $wgScriptingNamespaceNumbers to be defined just like any other configuration variable.
This commit is contained in:
parent
fa2dd80ead
commit
78fc58f457
|
@ -82,15 +82,12 @@ $wgScriptingEngine = false;
|
||||||
$wgScriptingEngineConf = array();
|
$wgScriptingEngineConf = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Script namespace numbers. Should be redefined before
|
* Script namespace numbers.
|
||||||
* the inlcusion of the extension.
|
|
||||||
*/
|
*/
|
||||||
if( !isset( $wgScriptingNamespaceNumbers ) ) {
|
$wgScriptingNamespaceNumbers = array(
|
||||||
$wgScriptingNamespaceNumbers = array(
|
'Module' => 20,
|
||||||
'Module' => 20,
|
'Module_talk' => 21,
|
||||||
'Module_talk' => 21,
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turn on to true if you have linked or copied wikiscripts.php and
|
* Turn on to true if you have linked or copied wikiscripts.php and
|
||||||
|
@ -98,5 +95,10 @@ if( !isset( $wgScriptingNamespaceNumbers ) ) {
|
||||||
*/
|
*/
|
||||||
$wgScriptingUseGeSHi = false;
|
$wgScriptingUseGeSHi = false;
|
||||||
|
|
||||||
define( 'NS_MODULE', $wgScriptingNamespaceNumbers['Module'] );
|
function efDefineScriptingNamespace() {
|
||||||
define( 'NS_MODULE_TALK', $wgScriptingNamespaceNumbers['Module_talk'] );
|
global $wgScriptingNamespaceNumbers;
|
||||||
|
define( 'NS_MODULE', $wgScriptingNamespaceNumbers['Module'] );
|
||||||
|
define( 'NS_MODULE_TALK', $wgScriptingNamespaceNumbers['Module_talk'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
$wgExtensionFunctions[] = 'efDefineScriptingNamespace';
|
||||||
|
|
Loading…
Reference in a new issue