Merge "Remove 'move' from LogPage::getTitleLink"
[lhc/web/wiklou.git] / includes / WebStart.php
index 71454f0..2ae72dc 100644 (file)
@@ -40,12 +40,6 @@ if ( ini_get( 'register_globals' ) ) {
 header( 'X-Content-Type-Options: nosniff' );
 
 $wgRequestTime = microtime( true );
-# getrusage() does not exist on the Microsoft Windows platforms, catching this
-if ( function_exists ( 'getrusage' ) ) {
-       $wgRUstart = getrusage();
-} else {
-       $wgRUstart = array();
-}
 unset( $IP );
 
 # Valid web server entry point, enable includes.
@@ -61,18 +55,15 @@ define( 'MEDIAWIKI', true );
 # if we don't have permissions on parent directories.
 $IP = getenv( 'MW_INSTALL_PATH' );
 if ( $IP === false ) {
-       if ( realpath( '.' ) ) {
-               $IP = realpath( '.' );
-       } else {
-               $IP = dirname( __DIR__ );
-       }
+       $IP = realpath( '.' ) ?: dirname( __DIR__ );
 }
 
-# Start the autoloader, so that extensions can derive classes from core files
-require_once "$IP/includes/AutoLoader.php";
-
 # Load the profiler
 require_once "$IP/includes/profiler/Profiler.php";
+$wgRUstart = wfGetRusage() ?: array();
+
+# Start the autoloader, so that extensions can derive classes from core files
+require_once "$IP/includes/AutoLoader.php";
 
 # Load up some global defines.
 require_once "$IP/includes/Defines.php";