X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWebStart.php;h=e137628c5ea9ea10c75fc2763dd40619fb97f0b8;hb=ab20f80116acb97eb8f5a0020d7a701c9178af28;hp=71454f04568b96ad2d96f7f20912d25770fe55f5;hpb=b38e0afa615b6badbae7bdc2f50142894e94fa70;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WebStart.php b/includes/WebStart.php index 71454f0456..e137628c5e 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -41,11 +41,7 @@ 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(); -} +$wgRUstart = function_exists( 'getrusage' ) ? getrusage() : array(); unset( $IP ); # Valid web server entry point, enable includes. @@ -61,11 +57,7 @@ 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