Stamping the installed_languags.inc file with 'rtl' = false, causes 'rtl'.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 7 Aug 2010 09:27:37 +0000 (09:27 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 7 Aug 2010 09:27:37 +0000 (09:27 +0000)
The value: 'rtl' = false will make the variable as isset.

CHANGELOG.txt
includes/lang/language.php
includes/session.inc

index 16b519aac7c343b73d03ce2593beff31c80473a6..cf4f0cce341be394a2d5043d66302576d9133a4e 100644 (file)
@@ -19,6 +19,12 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+07-Aut-2010 Joe Hunt
+# Stamping the installed_languags.inc file with 'rtl' = false, causes 'rtl'.
+  The value: 'rtl' = false will make the variable as isset.
+$ /includes/lang/languages.php
+  /includes/session.inc
+  
 06-Aug-2010 Janusz Dobrowolski
 # Fixed page title
 $ /gl/gl_bank.php
index 1ec47d17766321e07abd07f3c808d3337e4622b3..2c32d84c46a23cd958935139a277794fff81e535 100644 (file)
@@ -62,7 +62,7 @@ class language
                        $this->code = $lang['code'];
                        $this->encoding = $lang['encoding'];
                        $this->version = @$lang['version'];
-                       $this->dir = isset($lang['rtl']) ? 'rtl' : 'ltr';
+                       $this->dir = (isset($lang['rtl']) && $lang['rtl'] === true) ? 'rtl' : 'ltr';
                        $locale = $path_to_root . "/lang/" . $this->code . "/locale.inc";
                        $this->is_locale_file = file_exists($locale);
                }
index 4a6b083a8e1cae90787c14cc5aebd00a8823be73..97c8e1045158592c4411a1888cba49db3ade227a 100644 (file)
@@ -188,7 +188,7 @@ if (!isset($_SESSION['language']) || !method_exists($_SESSION['language'], 'set_
 {
        $l = array_search_value($dflt_lang, $installed_languages,  'code');
        $_SESSION['language'] = new language($l['name'], $l['code'], $l['encoding'],
-        isset($l['rtl']) ? 'rtl' : 'ltr');
+        (isset($l['rtl']) && $l['rtl'] === true) ? 'rtl' : 'ltr');
 }
 
 $_SESSION['language']->set_language($_SESSION['language']->code);