X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Finst_lang.php;h=3ed51a6819fdae185b24d2b5385f277bca4ab5f3;hb=4618ee761a2d5ea779858009710ed43e12325c6f;hp=73591b6606d564b46d66bea38e5831277daeec68;hpb=5b8f4c4b4aa8cf996bc071f116bfce1273200fa2;p=fa-stable.git diff --git a/admin/inst_lang.php b/admin/inst_lang.php index 73591b66..3ed51a68 100644 --- a/admin/inst_lang.php +++ b/admin/inst_lang.php @@ -17,7 +17,7 @@ include_once($path_to_root."/includes/packages.inc"); include_once($path_to_root . "/admin/db/maintenance_db.inc"); include_once($path_to_root . "/includes/ui.inc"); -if ($use_popup_windows) +if ($SysPrefs->use_popup_windows) $js = get_js_open_window(900, 500); page(_($help_context = "Install/Update Languages"), false, false, "", $js); @@ -30,7 +30,7 @@ simple_page_mode(true); // function display_languages() { - global $table_style, $installed_languages, $dflt_lang, $GetText; + global $installed_languages, $dflt_lang, $GetText; $th = array(_("Language"), _("Name"), _("Encoding"), _("Right To Left"), _("Installed"), _("Available"), _("Default"), "", ""); @@ -151,16 +151,16 @@ function handle_submit($id) $dflt_lang = $_POST['code']; } - $installed_languages[$id]['code'] = $_POST['code']; + $installed_languages[$id]['code'] = clean_file_name($_POST['code']); $installed_languages[$id]['name'] = $_POST['name']; - $installed_languages[$id]['path'] = 'lang/' . $_POST['code']; + $installed_languages[$id]['path'] = 'lang/' . clean_file_name(get_post('code')); $installed_languages[$id]['encoding'] = $_POST['encoding']; $installed_languages[$id]['rtl'] = (bool)$_POST['rtl']; $installed_languages[$id]['package'] = ''; $installed_languages[$id]['version'] = ''; if (!write_lang()) return false; - $directory = $path_to_root . "/lang/" . $_POST['code']; + $directory = $path_to_root . "/lang/" . clean_file_name(get_post('code')); if (!file_exists($directory)) { mkdir($directory);