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);
//
function display_languages()
{
- global $table_style, $installed_languages, $dflt_lang;
+ global $installed_languages, $dflt_lang, $GetText;
$th = array(_("Language"), _("Name"), _("Encoding"), _("Right To Left"),
_("Installed"), _("Available"), _("Default"), "", "");
else
alt_table_row_color($k);
- $support = $_SESSION['get_text']->check_support($lang, $charset);
+ $support = $GetText->check_support($lang, $charset);
- if (function_exists('gettext') && !$support && !get_post('DisplayAll')) continue;
+ if (function_exists('gettext') && !$support && !get_post('DisplayAll') && $lang != 'C') continue;
label_cell($lang);
label_cell($available ? get_package_view_str($lang, $lang_name) : $lang_name);
if (is_uploaded_file($_FILES['uploadfile']['tmp_name']))
{
$file1 = $_FILES['uploadfile']['tmp_name'];
- $file2 = $directory . "/LC_MESSAGES/".$_POST['code'].".po";
+ $code = preg_replace('/[^a-zA-Z_]/', '', $_POST['code']);
+ $file2 = $directory . "/LC_MESSAGES/$code.po";
if (file_exists($file2))
unlink($file2);
move_uploaded_file($file1, $file2);
if (is_uploaded_file($_FILES['uploadfile2']['tmp_name']))
{
$file1 = $_FILES['uploadfile2']['tmp_name'];
- $file2 = $directory . "/LC_MESSAGES/".$_POST['code'].".mo";
+ $code = preg_replace('/[^a-zA-Z_]/', '', $_POST['code']);
+ $file2 = $directory . "/LC_MESSAGES/$code.mo";
if (file_exists($file2))
unlink($file2);
move_uploaded_file($file1, $file2);
//---------------------------------------------------------------------------------------------
end_page();
-?>
\ No newline at end of file