"$something ? false : true" is silly.
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 8341be4..81705d3 100644 (file)
@@ -563,9 +563,16 @@ function wfGetLangObj( $langcode = false ) {
        return $wgContLang;
 }
 
+/**
+ * Use this instead of $wgContLang, when working with user interface.
+ * User interface is currently hard coded according to wiki content language
+ * in many ways, especially regarding to text direction. There is lots stuff
+ * to fix, hence this function to keep the old behaviour unless the global
+ * $wgBetterDirectionality is enabled (or removed when everything works).
+ */
 function wfUILang() {
        global $wgBetterDirectionality;
-       return wfGetLangObj( $wgBetterDirectionality ? false: true );
+       return wfGetLangObj( !$wgBetterDirectionality );
 }
 
 /**
@@ -578,7 +585,7 @@ function wfUILang() {
  *    defined in languages/Language.php
  *
  * This function also takes extra optional parameters (not
- * shown in the function definition), which can by used to
+ * shown in the function definition), which can be used to
  * insert variable text into the predefined message.
  */
 function wfMsg( $key ) {