Merge "Plural rules: updates for UTS #35 Rev 33"
[lhc/web/wiklou.git] / includes / Setup.php
index 2e083d8..531d1a4 100644 (file)
@@ -36,6 +36,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 
 $fname = 'Setup.php';
 wfProfileIn( $fname );
+wfProfileIn( $fname  . '-defaults' );
 
 // Check to see if we are at the file scope
 if ( !isset( $wgVersion ) ) {
@@ -102,10 +103,10 @@ if ( isset( $wgFileStore['deleted']['directory'] ) ) {
        $wgDeletedDirectory = $wgFileStore['deleted']['directory'];
 }
 
-if ( isset( $wgFooterIcons['copyright'] ) &&
-       isset( $wgFooterIcons['copyright']['copyright'] ) &&
-       $wgFooterIcons['copyright']['copyright'] === array() )
-{
+if ( isset( $wgFooterIcons['copyright'] )
+       && isset( $wgFooterIcons['copyright']['copyright'] )
+       && $wgFooterIcons['copyright']['copyright'] === array()
+{
        if ( isset( $wgCopyrightIcon ) && $wgCopyrightIcon ) {
                $wgFooterIcons['copyright']['copyright'] = $wgCopyrightIcon;
        } elseif ( $wgRightsIcon || $wgRightsText ) {
@@ -119,10 +120,10 @@ if ( isset( $wgFooterIcons['copyright'] ) &&
        }
 }
 
-if ( isset( $wgFooterIcons['poweredby'] ) &&
-       isset( $wgFooterIcons['poweredby']['mediawiki'] ) &&
-       $wgFooterIcons['poweredby']['mediawiki']['src'] === null )
-{
+if ( isset( $wgFooterIcons['poweredby'] )
+       && isset( $wgFooterIcons['poweredby']['mediawiki'] )
+       && $wgFooterIcons['poweredby']['mediawiki']['src'] === null
+{
        $wgFooterIcons['poweredby']['mediawiki']['src'] = "$wgStylePath/common/images/poweredby_mediawiki_88x31.png";
 }
 
@@ -247,11 +248,6 @@ foreach ( $wgForeignFileRepos as &$repo ) {
 }
 unset( $repo ); // no global pollution; destroy reference
 
-if ( is_null( $wgEnableAutoRotation ) ) {
-       // Only enable auto-rotation when the bitmap handler can rotate
-       $wgEnableAutoRotation = BitmapHandler::canRotate();
-}
-
 if ( $wgRCFilterByAge ) {
        # # Trim down $wgRCLinkDays so that it only lists links which are valid
        # # as determined by $wgRCMaxAge.
@@ -293,7 +289,6 @@ if ( $wgMetaNamespace === false ) {
        $wgMetaNamespace = str_replace( ' ', '_', $wgSitename );
 }
 
-
 // Default value is either the suhosin limit or -1 for unlimited
 if ( $wgResourceLoaderMaxQueryLength === false ) {
        $maxValueLength = ini_get( 'suhosin.get.max_value_length' );
@@ -402,11 +397,15 @@ if ( $wgRC2UDPAddress ) {
        );
 }
 
+wfProfileOut( $fname  . '-defaults' );
+
 // Disable MWDebug for command line mode, this prevents MWDebug from eating up
 // all the memory from logging SQL queries on maintenance scripts
 global $wgCommandLineMode;
 if ( $wgDebugToolbar && !$wgCommandLineMode ) {
+       wfProfileIn( $fname . '-debugtoolbar' );
        MWDebug::init();
+       wfProfileOut( $fname . '-debugtoolbar' );
 }
 
 if ( !class_exists( 'AutoLoader' ) ) {
@@ -420,10 +419,10 @@ wfProfileOut( $fname . '-exception' );
 wfProfileIn( $fname . '-includes' );
 require_once "$IP/includes/normal/UtfNormalUtil.php";
 require_once "$IP/includes/GlobalFunctions.php";
-require_once "$IP/includes/ProxyTools.php";
 require_once "$IP/includes/normal/UtfNormalDefines.php";
 wfProfileOut( $fname . '-includes' );
 
+wfProfileIn( $fname . '-defaults2' );
 if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) {
        $wgSecureLogin = false;
        wfWarn( 'Secure login was enabled on a server that only supports HTTP or HTTPS. Disabling secure login.' );
@@ -432,7 +431,9 @@ if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) {
 # Now that GlobalFunctions is loaded, set defaults that depend
 # on it.
 if ( $wgTmpDirectory === false ) {
+       wfProfileIn( $fname . '-tempDir' );
        $wgTmpDirectory = wfTempDir();
+       wfProfileOut( $fname . '-tempDir' );
 }
 
 if ( $wgCanonicalServer === false ) {
@@ -456,6 +457,7 @@ if ( !$wgHTCPRouting && $wgHTCPMulticastAddress ) {
        );
 }
 
+wfProfileOut( $fname . '-defaults2' );
 wfProfileIn( $fname . '-misc1' );
 
 # Raise the memory limit if it's too low