From: Robin Pepermans Date: Mon, 12 Dec 2011 21:56:26 +0000 (+0000) Subject: Simplify code (minor) X-Git-Tag: 1.31.0-rc.0~26028 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/modifier.php?a=commitdiff_plain;h=679970382a92f5f43e69f05f32f0dd5851db59f6;p=lhc%2Fweb%2Fwiklou.git Simplify code (minor) --- 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'; } /**