Separate class for view and print links.
[fa-stable.git] / includes / lang / language.php
index 1ec47d17766321e07abd07f3c808d3337e4622b3..ea428fca07b5463e3cfc310142b05ad98a9610ec 100644 (file)
@@ -12,7 +12,7 @@
 // Prevent register_globals vulnerability
 if (isset($_GET['path_to_root']) || isset($_POST['path_to_root']))
        die("Restricted access");
-include_once($path_to_root . "/lang/installed_languages.inc");
+@include_once($path_to_root . "/lang/installed_languages.inc");
 include_once($path_to_root . "/includes/lang/gettext.php");
 
 class language 
@@ -30,7 +30,7 @@ class language
                global $dflt_lang;
                
                $this->name = $name;
-               $this->code = $code ? $code : ($dflt_lang ? $dflt_lang : 'en_GB');
+               $this->code = $code ? $code : ($dflt_lang ? $dflt_lang : 'C');
                $this->encoding = $encoding;
                $this->dir = $dir;
        }
@@ -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);
                }