Add process cache support to WANObjectCache
[lhc/web/wiklou.git] / includes / Setup.php
index 86df4b8..67c99c9 100644 (file)
@@ -48,10 +48,10 @@ if ( !isset( $wgVersion ) ) {
 $ps_default = Profiler::instance()->scopedProfileIn( $fname . '-defaults' );
 
 if ( $wgScript === false ) {
-       $wgScript = "$wgScriptPath/index$wgScriptExtension";
+       $wgScript = "$wgScriptPath/index.php";
 }
 if ( $wgLoadScript === false ) {
-       $wgLoadScript = "$wgScriptPath/load$wgScriptExtension";
+       $wgLoadScript = "$wgScriptPath/load.php";
 }
 
 if ( $wgArticlePath === false ) {
@@ -68,17 +68,18 @@ if ( !empty( $wgActionPaths ) && !isset( $wgActionPaths['view'] ) ) {
        $wgActionPaths['view'] = $wgArticlePath;
 }
 
+if ( $wgResourceBasePath === null ) {
+       $wgResourceBasePath = $wgScriptPath;
+}
 if ( $wgStylePath === false ) {
-       $wgStylePath = "$wgScriptPath/skins";
+       $wgStylePath = "$wgResourceBasePath/skins";
 }
 if ( $wgLocalStylePath === false ) {
+       // Avoid wgResourceBasePath here since that may point to a different domain (e.g. CDN)
        $wgLocalStylePath = "$wgScriptPath/skins";
 }
 if ( $wgExtensionAssetsPath === false ) {
-       $wgExtensionAssetsPath = "$wgScriptPath/extensions";
-}
-if ( $wgResourceBasePath === null ) {
-       $wgResourceBasePath = $wgScriptPath;
+       $wgExtensionAssetsPath = "$wgResourceBasePath/extensions";
 }
 
 if ( $wgLogo === false ) {
@@ -185,7 +186,7 @@ if ( !$wgLocalFileRepo ) {
                'name' => 'local',
                'directory' => $wgUploadDirectory,
                'scriptDirUrl' => $wgScriptPath,
-               'scriptExtension' => $wgScriptExtension,
+               'scriptExtension' => '.php',
                'url' => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath,
                'hashLevels' => $wgHashedUploadDirectory ? 2 : 0,
                'thumbScriptUrl' => $wgThumbnailScriptPath,
@@ -502,10 +503,6 @@ require_once "$IP/includes/compat/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 );
 }
@@ -521,11 +518,11 @@ unset( $serverParts );
 
 // Set defaults for configuration variables
 // that are derived from the server name by default
-if ( $wgEmergencyContact === false ) {
+// Note: $wgEmergencyContact and $wgPasswordSender may be false or empty string (T104142)
+if ( !$wgEmergencyContact ) {
        $wgEmergencyContact = 'wikiadmin@' . $wgServerName;
 }
-
-if ( $wgPasswordSender === false ) {
+if ( !$wgPasswordSender ) {
        $wgPasswordSender = 'apache@' . $wgServerName;
 }
 
@@ -680,12 +677,6 @@ if ( !is_object( $wgAuth ) ) {
  */
 $wgTitle = null;
 
-/**
- * @deprecated since 1.24 Use DeferredUpdates::addUpdate instead
- * @var array
- */
-$wgDeferredUpdateList = array();
-
 Profiler::instance()->scopedProfileOut( $ps_globals );
 $ps_extensions = Profiler::instance()->scopedProfileIn( $fname . '-extensions' );