From 679970382a92f5f43e69f05f32f0dd5851db59f6 Mon Sep 17 00:00:00 2001 From: Robin Pepermans Date: Mon, 12 Dec 2011 21:56:26 +0000 Subject: [PATCH] Simplify code (minor) --- includes/installer/WebInstallerOutput.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/includes/installer/WebInstallerOutput.php b/includes/installer/WebInstallerOutput.php index 9eb2c2c6a5..a28cda09a2 100644 --- a/includes/installer/WebInstallerOutput.php +++ b/includes/installer/WebInstallerOutput.php @@ -144,11 +144,7 @@ class WebInstallerOutput { */ public function getDir() { global $wgLang; - if( !is_object( $wgLang ) || !$wgLang->isRtl() ) { - return 'ltr'; - } else { - return 'rtl'; - } + return is_object( $wgLang ) ? $wgLang->getDir() : 'ltr'; } /** @@ -156,11 +152,7 @@ class WebInstallerOutput { */ public function getLanguageCode() { global $wgLang; - if( !is_object( $wgLang ) ) { - return 'en'; - } else { - return $wgLang->getCode(); - } + return is_object( $wgLang ) ? $wgLang->getCode() : 'en'; } /** -- 2.20.1