jenkins-bot has submitted this change and it was merged.
Change subject: Shorten if/else to ternary expressions in WebStart.php
......................................................................
Shorten if/else to ternary expressions in WebStart.php
Change-Id: Ia12af16e1a6346fac169d5c2a2eee330050bd149
---
M includes/WebStart.php
1 file changed, 2 insertions(+), 10 deletions(-)
Approvals:
Aude: Looks good to me, approved
Parent5446: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/includes/WebStart.php b/includes/WebStart.php
index 71454f0..e137628 100644
--- a/includes/WebStart.php
+++ b/includes/WebStart.php
@@ -41,11 +41,7 @@
$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 @@
# 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
--
To view, visit https://gerrit.wikimedia.org/r/148503
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia12af16e1a6346fac169d5c2a2eee330050bd149
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Withoutaname <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits