X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fhooks.inc;h=71717fc154202a4071612a4060bb428b3f371e6b;hb=e27f352665019d956e8bb4dc4b4086146f6e0535;hp=ab2d2bdc6af5b1cb00f193e5fb1158c603f6c6b8;hpb=cb7da60bef5f27507540f827e4a03ede8d08f684;p=fa-stable.git diff --git a/includes/hooks.inc b/includes/hooks.inc index ab2d2bdc..71717fc1 100644 --- a/includes/hooks.inc +++ b/includes/hooks.inc @@ -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;