Move up devunt's name to Developers
[lhc/web/wiklou.git] / includes / Setup.php
index 7c0c7c4..1324ed8 100644 (file)
@@ -74,9 +74,6 @@ if ( $wgStylePath === false ) {
 if ( $wgLocalStylePath === false ) {
        $wgLocalStylePath = "$wgScriptPath/skins";
 }
-if ( $wgStyleDirectory === false ) {
-       $wgStyleDirectory = "$IP/skins";
-}
 if ( $wgExtensionAssetsPath === false ) {
        $wgExtensionAssetsPath = "$wgScriptPath/extensions";
 }
@@ -362,10 +359,15 @@ if ( $wgMetaNamespace === false ) {
        $wgMetaNamespace = str_replace( ' ', '_', $wgSitename );
 }
 
-// Default value is either the suhosin limit or -1 for unlimited
+// Default value is 2000 or the suhosin limit if it is between 1 and 2000
 if ( $wgResourceLoaderMaxQueryLength === false ) {
-       $maxValueLength = ini_get( 'suhosin.get.max_value_length' );
-       $wgResourceLoaderMaxQueryLength = $maxValueLength > 0 ? $maxValueLength : -1;
+       $suhosinMaxValueLength = (int) ini_get( 'suhosin.get.max_value_length' );
+       if ( $suhosinMaxValueLength > 0 && $suhosinMaxValueLength < 2000 ) {
+               $wgResourceLoaderMaxQueryLength = $suhosinMaxValueLength;
+       } else {
+               $wgResourceLoaderMaxQueryLength = 2000;
+       }
+       unset($suhosinMaxValueLength);
 }
 
 /**
@@ -483,6 +485,10 @@ require_once "$IP/includes/libs/normal/UtfNormalUtil.php";
 
 $ps_default2 = Profiler::instance()->scopedProfileIn( $fname . '-defaults2' );
 
+if ( $wgScriptExtension !== '.php' || defined( 'MW_ENTRY_PHP5' ) ) {
+       wfWarn( 'Script extensions other than ".php" are deprecated.' );
+}
+
 if ( $wgCanonicalServer === false ) {
        $wgCanonicalServer = wfExpandUrl( $wgServer, PROTO_HTTP );
 }
@@ -514,15 +520,25 @@ if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) {
 
 // Now that GlobalFunctions is loaded, set defaults that depend on it.
 if ( $wgTmpDirectory === false ) {
-       $ps_tmpdir = Profiler::instance()->scopedProfileIn( $fname . '-tempDir' );
        $wgTmpDirectory = wfTempDir();
-       Profiler::instance()->scopedProfileOut( $ps_tmpdir );
 }
 
 // We don't use counters anymore. Left here for extensions still
 // expecting this to exist. Should be removed sometime 1.26 or later.
 $wgDisableCounters = true;
 
+if ( $wgMainWANCache === false ) {
+       // Setup a WAN cache from $wgMainCacheType with no relayer.
+       // Sites using multiple datacenters can configure a relayer.
+       $wgMainWANCache = 'mediawiki-main-default';
+       $wgWANObjectCaches[$wgMainWANCache] = array(
+               'class'         => 'WANObjectCache',
+               'cacheId'       => $wgMainCacheType,
+               'pool'          => 'mediawiki-main-default',
+               'relayerConfig' => array( 'class' => 'EventRelayerNull' )
+       );
+}
+
 Profiler::instance()->scopedProfileOut( $ps_default2 );
 
 $ps_misc = Profiler::instance()->scopedProfileIn( $fname . '-misc1' );
@@ -546,6 +562,10 @@ if ( is_null( $wgLocalTZoffset ) ) {
        $wgLocalTZoffset = date( 'Z' ) / 60;
 }
 
+if ( !$wgDBerrorLogTZ ) {
+       $wgDBerrorLogTZ = $wgLocaltimezone;
+}
+
 // Useful debug output
 if ( $wgCommandLineMode ) {
        $wgRequest = new FauxRequest( array() );