(bug 737) only use the post-parse link placeholders within replaceInternalLinks().
[lhc/web/wiklou.git] / includes / Setup.php
index 792acd9..adea16a 100644 (file)
@@ -47,6 +47,10 @@ if( $wgUseSquid && isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
        $wgIP = '127.0.0.1';
 }
 
+if ( $wgUseData ) {
+       $wgExtraNamespaces[20] = 'Data' ;
+       $wgExtraNamespaces[21] = 'Data_talk' ;
+}
 
 $fname = 'Setup.php';
 wfProfileIn( $fname );
@@ -204,10 +208,9 @@ $wgLoadBalancer->loadMasterPos();
 wfProfileOut( $fname.'-database' );
 wfProfileIn( $fname.'-User' );
 
-# Extension setup functions
-# Entries should be added to this variable during the inclusion 
-# of the extension file. This allows the extension to perform 
-# any necessary initialisation in the fully initialised environment
+# Skin setup functions
+# Entries can be added to this variable during the inclusion 
+# of the extension file. Skins can then perform any necessary initialisation.
 foreach ( $wgSkinExtensionFunctions as $func ) {
        $func();
 }
@@ -250,6 +253,10 @@ function setupLangObj(&$langclass, $langcode) {
 
 require_once( 'languages/Language.php' );
 
+# $wgLanguageCode may be changed later to fit with user preference.
+# The content language will remain fixed as per the configuration,
+# so let's keep it.
+$wgContLanguageCode = $wgLanguageCode;
 $wgContLangClass = 'Language' . str_replace( '-', '_', ucfirst( $wgContLanguageCode ) );
 
 $wgContLang = setupLangObj( $wgContLangClass, $wgContLangClass );
@@ -343,7 +350,7 @@ $wgArticle = new Article($wgTitle);
 wfProfileOut( $fname.'-misc2' );
 wfProfileIn( $fname.'-extensions' );
 
-# Extension setup functions
+# Extension setup functions for extensions other than skins
 # Entries should be added to this variable during the inclusion 
 # of the extension file. This allows the extension to perform 
 # any necessary initialisation in the fully initialised environment