The aging reports / inquiries had a 1 day error in presentation. Fixed.
[fa-stable.git] / includes / hooks.inc
index ab2d2bdc6af5b1cb00f193e5fb1158c603f6c6b8..71717fc154202a4071612a4060bb428b3f371e6b 100644 (file)
@@ -225,9 +225,10 @@ function install_hooks()
        $Hooks = array();
        
        // include current language related $Hooks object if locale file exists
-       if (file_exists($path_to_root . "/lang/".$_SESSION['language']->code."/locale.inc"))
+       $lang_code  = clean_file_name($_SESSION['language']->code);
+       if (file_exists($path_to_root . "/lang/" . $lang_code . "/locale.inc"))
        {
-               include_once($path_to_root . "/lang/".$_SESSION['language']->code."/locale.inc");
+               include_once($path_to_root . "/lang/" . $lang_code . "/locale.inc");
                $code = $_SESSION['language']->code;
                $hook_class = 'hooks_'.$code;
                $Hooks[$code] = new $hook_class;