Index: trunk/extensions/Scripting/Scripting.php |
— | — | @@ -82,15 +82,12 @@ |
83 | 83 | $wgScriptingEngineConf = array(); |
84 | 84 | |
85 | 85 | /** |
86 | | - * Script namespace numbers. Should be redefined before |
87 | | - * the inlcusion of the extension. |
| 86 | + * Script namespace numbers. |
88 | 87 | */ |
89 | | -if( !isset( $wgScriptingNamespaceNumbers ) ) { |
90 | | - $wgScriptingNamespaceNumbers = array( |
91 | | - 'Module' => 20, |
92 | | - 'Module_talk' => 21, |
93 | | - ); |
94 | | -} |
| 88 | +$wgScriptingNamespaceNumbers = array( |
| 89 | + 'Module' => 20, |
| 90 | + 'Module_talk' => 21, |
| 91 | +); |
95 | 92 | |
96 | 93 | /** |
97 | 94 | * Turn on to true if you have linked or copied wikiscripts.php and |
— | — | @@ -98,5 +95,10 @@ |
99 | 96 | */ |
100 | 97 | $wgScriptingUseGeSHi = false; |
101 | 98 | |
102 | | -define( 'NS_MODULE', $wgScriptingNamespaceNumbers['Module'] ); |
103 | | -define( 'NS_MODULE_TALK', $wgScriptingNamespaceNumbers['Module_talk'] ); |
| 99 | +function efDefineScriptingNamespace() { |
| 100 | + global $wgScriptingNamespaceNumbers; |
| 101 | + define( 'NS_MODULE', $wgScriptingNamespaceNumbers['Module'] ); |
| 102 | + define( 'NS_MODULE_TALK', $wgScriptingNamespaceNumbers['Module_talk'] ); |
| 103 | +} |
| 104 | + |
| 105 | +$wgExtensionFunctions[] = 'efDefineScriptingNamespace'; |