X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fhooks.inc;h=cb5cddfa9db3e604635b80a3ab52023cb0dd3cbb;hb=9451db1760036985de791ba24c442801e37f37de;hp=1621d8f48cbc6a9c371101d74b7ff9be9636ede4;hpb=fa43a9c974d05b77517a0d8e3e510ef4a088632e;p=fa-stable.git diff --git a/includes/hooks.inc b/includes/hooks.inc index 1621d8f4..cb5cddfa 100644 --- a/includes/hooks.inc +++ b/includes/hooks.inc @@ -226,9 +226,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;