Zeile 94 | Zeile 94 |
---|
log_admin_action($editlang);
flash_message($lang->success_langprops_updated, 'success');
|
log_admin_action($editlang);
flash_message($lang->success_langprops_updated, 'success');
|
admin_redirect("index.php?module=config-languages&action=edit&lang={$editlang}&editwith={$editwith}");
| admin_redirect("index.php?module=config-languages&action=edit&lang=".htmlspecialchars_uni($editlang)."&editwith=".htmlspecialchars_uni($editwith));
|
} else {
| } else {
|
Zeile 102 | Zeile 102 |
---|
} }
|
} }
|
$page->add_breadcrumb_item(preg_replace("<\?|\?>", "<span>?</span>", $languages[$editlang]), "index.php?module=config-languages&action=edit&lang={$editlang}");
| $page->add_breadcrumb_item(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editlang])), "index.php?module=config-languages&action=edit&lang=".htmlspecialchars_uni($editlang));
|
$page->add_breadcrumb_item($lang->nav_editing_set);
$page->output_header($lang->languages);
| $page->add_breadcrumb_item($lang->nav_editing_set);
$page->output_header($lang->languages);
|
Zeile 183 | Zeile 183 |
---|
$editlang = basename($mybb->input['lang']); $folder = MYBB_ROOT."inc/languages/".$editlang."/";
|
$editlang = basename($mybb->input['lang']); $folder = MYBB_ROOT."inc/languages/".$editlang."/";
|
$page->add_breadcrumb_item(preg_replace("<\?|\?>", "<span>?</span>", $languages[$editlang]), "index.php?module=config-languages&action=quick_edit&lang={$editlang}");
| $page->add_breadcrumb_item(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editlang])), "index.php?module=config-languages&action=quick_edit&lang=".htmlspecialchars_uni($editlang));
|
// Validate that this language pack really exists if(file_exists(MYBB_ROOT."inc/languages/".$editlang.".php"))
| // Validate that this language pack really exists if(file_exists(MYBB_ROOT."inc/languages/".$editlang.".php"))
|
Zeile 250 | Zeile 250 |
---|
$lang_file_credits .= "// MyBB Language Pack File.\n"; $lang_file_credits .= "// This file has been generated by MyBB - buildin language pack editor.\n"; $lang_file_credits .= "// ".str_repeat('=',80)."\n";
|
$lang_file_credits .= "// MyBB Language Pack File.\n"; $lang_file_credits .= "// This file has been generated by MyBB - buildin language pack editor.\n"; $lang_file_credits .= "// ".str_repeat('=',80)."\n";
|
$lang_file_credits .= "// Friendly name of the language : ".preg_replace("#<\?|\?>#i", " ", $langinfo['name'])."\n"; $lang_file_credits .= "// Author of the language pack : ".preg_replace("#<\?|\?>#i", " ", $langinfo['author'])."\n"; $lang_file_credits .= "// Language pack translators website : ".preg_replace("#<\?|\?>#i", " ", $langinfo['website'])."\n"; $lang_file_credits .= "// Compatible version of MyBB : ".preg_replace("#<\?|\?>#i", " ", $langinfo['version'])."\n"; $lang_file_credits .= "// Last edited in MyBB Editor by : ".preg_replace("#<\?|\?>#i", " ", $mybb->user['username'])."\n";
| $lang_file_credits .= "// Friendly name of the language : ".preg_replace("#<\?|\?>|\r|\n#i", " ", $langinfo['name'])."\n"; $lang_file_credits .= "// Author of the language pack : ".preg_replace("#<\?|\?>|\r|\n#i", " ", $langinfo['author'])."\n"; $lang_file_credits .= "// Language pack translators website : ".preg_replace("#<\?|\?>|\r|\n#i", " ", $langinfo['website'])."\n"; $lang_file_credits .= "// Compatible version of MyBB : ".preg_replace("#<\?|\?>|\r|\n#i", " ", $langinfo['version'])."\n"; $lang_file_credits .= "// Last edited in MyBB Editor by : ".preg_replace("#<\?|\?>|\r|\n#i", " ", $mybb->user['username'])."\n";
|
$lang_file_credits .= "// Last edited date : ".gmdate("r")."\n"; $lang_file_credits .= "// ".str_repeat('-',80)."\n\n";
| $lang_file_credits .= "// Last edited date : ".gmdate("r")."\n"; $lang_file_credits .= "// ".str_repeat('-',80)."\n\n";
|
Zeile 345 | Zeile 345 |
---|
$value = $l[$phrase]; if(my_strtolower($langinfo['charset']) == "utf-8") {
|
$value = $l[$phrase]; if(my_strtolower($langinfo['charset']) == "utf-8") {
|
$value = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return dec_to_utf8(hexdec($matches[1]));'), $value);
| $value = preg_replace_callback("#%u([0-9A-F]{1,4})#i", 'encode_language_string_utf8', $value);
|
} else {
|
} else {
|
$value = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return "&#".hexdec($matches[1]).";";'), $value);
| $value = preg_replace_callback("#%u([0-9A-F]{1,4})#i", 'encode_language_string', $value);
|
}
$form_container->output_row($description, $phrase, $form->generate_text_area("edit[$phrase]", $value, array('id' => 'lang_'.$phrase, 'rows' => 2, 'class' => "langeditor_textarea_edit {$quickphrases_dir_class}")), 'lang_'.$phrase, array('width' => '50%'));
| }
$form_container->output_row($description, $phrase, $form->generate_text_area("edit[$phrase]", $value, array('id' => 'lang_'.$phrase, 'rows' => 2, 'class' => "langeditor_textarea_edit {$quickphrases_dir_class}")), 'lang_'.$phrase, array('width' => '50%'));
|
Zeile 372 | Zeile 372 |
---|
$editlang = basename($mybb->input['lang']); $folder = MYBB_ROOT."inc/languages/".$editlang."/";
|
$editlang = basename($mybb->input['lang']); $folder = MYBB_ROOT."inc/languages/".$editlang."/";
|
$page->add_breadcrumb_item(preg_replace("<\?|\?>", "<span>?</span>", $languages[$editlang]), "index.php?module=config-languages&action=edit&lang={$editlang}");
| $page->add_breadcrumb_item(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editlang])), "index.php?module=config-languages&action=edit&lang=".htmlspecialchars_uni($editlang));
|
$editwith = basename($mybb->input['editwith']); $editwithfolder = '';
| $editwith = basename($mybb->input['editwith']); $editwithfolder = '';
|
Zeile 413 | Zeile 413 |
---|
{ $file = 'admin/'.$file; }
|
{ $file = 'admin/'.$file; }
|
$page->add_breadcrumb_item($file);
| $page->add_breadcrumb_item(htmlspecialchars_uni($file));
|
$editfile = $folder.$file; $withfile = '';
| $editfile = $folder.$file; $withfile = '';
|
Zeile 457 | Zeile 457 |
---|
$lang_file_credits .= "// MyBB Language Pack File.\n"; $lang_file_credits .= "// This file has been generated by MyBB - buildin language pack editor.\n"; $lang_file_credits .= "// ".str_repeat('=',80)."\n";
|
$lang_file_credits .= "// MyBB Language Pack File.\n"; $lang_file_credits .= "// This file has been generated by MyBB - buildin language pack editor.\n"; $lang_file_credits .= "// ".str_repeat('=',80)."\n";
|
$lang_file_credits .= "// Friendly name of the language : ".preg_replace("#<\?|\?>#i", " ", $langinfo['name'])."\n"; $lang_file_credits .= "// Author of the language pack : ".preg_replace("#<\?|\?>#i", " ", $langinfo['author'])."\n"; $lang_file_credits .= "// Language pack translators website : ".preg_replace("#<\?|\?>#i", " ", $langinfo['website'])."\n"; $lang_file_credits .= "// Compatible version of MyBB : ".preg_replace("#<\?|\?>#i", " ", $langinfo['version'])."\n"; $lang_file_credits .= "// Last edited in MyBB Editor by : ".preg_replace("#<\?|\?>#i", " ", $mybb->user['username'])."\n";
| $lang_file_credits .= "// Friendly name of the language : ".preg_replace("#<\?|\?>|\r|\n#i", " ", $langinfo['name'])."\n"; $lang_file_credits .= "// Author of the language pack : ".preg_replace("#<\?|\?>|\r|\n#i", " ", $langinfo['author'])."\n"; $lang_file_credits .= "// Language pack translators website : ".preg_replace("#<\?|\?>|\r|\n#i", " ", $langinfo['website'])."\n"; $lang_file_credits .= "// Compatible version of MyBB : ".preg_replace("#<\?|\?>|\r|\n#i", " ", $langinfo['version'])."\n"; $lang_file_credits .= "// Last edited in MyBB Editor by : ".preg_replace("#<\?|\?>|\r|\n#i", " ", $mybb->user['username'])."\n";
|
$lang_file_credits .= "// Last edited date : ".gmdate("r")."\n"; $lang_file_credits .= "// ".str_repeat('-',80)."\n\n";
| $lang_file_credits .= "// Last edited date : ".gmdate("r")."\n"; $lang_file_credits .= "// ".str_repeat('-',80)."\n\n";
|
Zeile 478 | Zeile 478 |
---|
log_admin_action($editlang, $editfile, $mybb->get_input('inadmin', MyBB::INPUT_INT));
flash_message($lang->success_langfile_updated, 'success');
|
log_admin_action($editlang, $editfile, $mybb->get_input('inadmin', MyBB::INPUT_INT));
flash_message($lang->success_langfile_updated, 'success');
|
admin_redirect("index.php?module=config-languages&action=edit&lang={$editlang}&editwith={$editwith}");
| admin_redirect("index.php?module=config-languages&action=edit&lang=".htmlspecialchars_uni($editlang)."&editwith=".htmlspecialchars_uni($editwith));
|
} else {
| } else {
|
Zeile 529 | Zeile 529 |
---|
$page->output_nav_tabs($sub_tabs, "edit_language_variables");
$form = new Form("index.php?module=config-languages&action=edit", "post", "edit");
|
$page->output_nav_tabs($sub_tabs, "edit_language_variables");
$form = new Form("index.php?module=config-languages&action=edit", "post", "edit");
|
echo $form->generate_hidden_field("file", htmlspecialchars_uni($file));
| echo $form->generate_hidden_field("file", $file);
|
echo $form->generate_hidden_field("lang", $editlang); echo $form->generate_hidden_field("editwith", $editwith); echo $form->generate_hidden_field("inadmin", $mybb->get_input('inadmin', MyBB::INPUT_INT));
| echo $form->generate_hidden_field("lang", $editlang); echo $form->generate_hidden_field("editwith", $editwith); echo $form->generate_hidden_field("inadmin", $mybb->get_input('inadmin', MyBB::INPUT_INT));
|
Zeile 551 | Zeile 551 |
---|
{ // Editing with another file
|
{ // Editing with another file
|
$form_container->output_row_header(preg_replace("<\?|\?>", "<span>?</span>", $languages[$editwith])); $form_container->output_row_header(preg_replace("<\?|\?>", "<span>?</span>", $languages[$editlang]));
| $form_container->output_row_header(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editwith]))); $form_container->output_row_header(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editlang])));
|
foreach($withvars as $key => $value) { if(my_strtolower($langinfo['charset']) == "utf-8") {
|
foreach($withvars as $key => $value) { if(my_strtolower($langinfo['charset']) == "utf-8") {
|
$withvars[$key] = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return dec_to_utf8(hexdec($matches[1]));'), $withvars[$key]); $editvars[$key] = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return dec_to_utf8(hexdec($matches[1]));'), $editvars[$key]);
| $withvars[$key] = preg_replace_callback("#%u([0-9A-F]{1,4})#i", 'encode_language_string_utf8', $withvars[$key]); $editvars[$key] = preg_replace_callback("#%u([0-9A-F]{1,4})#i", 'encode_language_string_utf8', $editvars[$key]);
|
} else {
|
} else {
|
$withvars[$key] = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return dec_to_utf8(hexdec($matches[1]));'), $withvars[$key]); $editvars[$key] = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return "&#".hexdec($matches[1]).";";'), $editvars[$key]);
| $withvars[$key] = preg_replace_callback("#%u([0-9A-F]{1,4})#i", 'encode_language_string_utf8', $withvars[$key]); $editvars[$key] = preg_replace_callback("#%u([0-9A-F]{1,4})#i", 'encode_language_string', $editvars[$key]);
|
}
// Find problems and differences in editfile in comparision to editwithfile
| }
// Find problems and differences in editfile in comparision to editwithfile
|
Zeile 595 | Zeile 595 |
---|
{ if(my_strtolower($langinfo['charset']) == "utf-8") {
|
{ if(my_strtolower($langinfo['charset']) == "utf-8") {
|
$editvars[$key] = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return dec_to_utf8(hexdec($matches[1]));'), $editvars[$key]);
| $editvars[$key] = preg_replace_callback("#%u([0-9A-F]{1,4})#i", 'encode_language_string_utf8', $editvars[$key]);
|
} else {
|
} else {
|
$editvars[$key] = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return "&#".hexdec($matches[1]).";";'), $editvars[$key]);
| $editvars[$key] = preg_replace_callback("#%u([0-9A-F]{1,4})#i", 'encode_language_string', $editvars[$key]);
|
}
$form_container->output_row("", "", "", "", array('width' => '50%', 'skip_construct' => true));
| }
$form_container->output_row("", "", "", "", array('width' => '50%', 'skip_construct' => true));
|
Zeile 611 | Zeile 611 |
---|
else { // Editing individually
|
else { // Editing individually
|
$form_container->output_row_header(preg_replace("<\?|\?>", "<span>?</span>", $languages[$editlang]));
| $form_container->output_row_header(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editlang])));
|
// Make each editing row from current file that we edit foreach($editvars as $key => $value) { if(my_strtolower($langinfo['charset']) == "utf-8") {
|
// Make each editing row from current file that we edit foreach($editvars as $key => $value) { if(my_strtolower($langinfo['charset']) == "utf-8") {
|
$value = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return dec_to_utf8(hexdec($matches[1]));'), $value);
| $value = preg_replace_callback("#%u([0-9A-F]{1,4})#i", 'encode_language_string_utf8', $value);
|
} else {
|
} else {
|
$value = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return "&#".hexdec($matches[1]).";";'), $value);
| $value = preg_replace_callback("#%u([0-9A-F]{1,4})#i", 'encode_language_string', $value);
|
} $form_container->output_row($key, "", $form->generate_text_area("edit[$key]", $value, array('id' => 'lang_'.$key, 'rows' => 2, 'class' => "langeditor_textarea_edit {$editlang_dir_class}")), 'lang_'.$key, array('width' => '50%')); }
| } $form_container->output_row($key, "", $form->generate_text_area("edit[$key]", $value, array('id' => 'lang_'.$key, 'rows' => 2, 'class' => "langeditor_textarea_edit {$editlang_dir_class}")), 'lang_'.$key, array('width' => '50%')); }
|
Zeile 669 | Zeile 669 |
---|
$table = new Table; if($editwithfolder) {
|
$table = new Table; if($editwithfolder) {
|
$table->construct_header(preg_replace("<\?|\?>", "<span>?</span>", $languages[$editwith]));
| $table->construct_header(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editwith])));
|
$table->construct_header($lang->phrases, array("class" => "align_center", "width" => 100));
|
$table->construct_header($lang->phrases, array("class" => "align_center", "width" => 100));
|
$table->construct_header(preg_replace("<\?|\?>", "<span>?</span>", $languages[$editlang]));
| $table->construct_header(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editlang])));
|
$table->construct_header($lang->issues, array("class" => "align_center", "width" => 100)); $table->construct_header($lang->controls, array("class" => "align_center", "width" => 100)); } else {
|
$table->construct_header($lang->issues, array("class" => "align_center", "width" => 100)); $table->construct_header($lang->controls, array("class" => "align_center", "width" => 100)); } else {
|
$table->construct_header(preg_replace("<\?|\?>", "<span>?</span>", $languages[$editlang]));
| $table->construct_header(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editlang])));
|
$table->construct_header($lang->phrases, array("class" => "align_center", "width" => 100)); $table->construct_header($lang->controls, array("class" => "align_center", "width" => 100)); }
| $table->construct_header($lang->phrases, array("class" => "align_center", "width" => 100)); $table->construct_header($lang->controls, array("class" => "align_center", "width" => 100)); }
|
Zeile 735 | Zeile 735 |
---|
$icon_issues = "<span class='langeditor_warning' title='".$lang->issues_warning."'></span>"; }
|
$icon_issues = "<span class='langeditor_warning' title='".$lang->issues_warning."'></span>"; }
|
$table->construct_cell($file, array("class" => "langeditor_editwithfile"));
| $table->construct_cell(htmlspecialchars_uni($file), array("class" => "langeditor_editwithfile"));
|
$table->construct_cell(count($editvars_left), array("class" => "langeditor_phrases")); $table->construct_cell("", array("class" => "langeditor_editfile")); $table->construct_cell($icon_issues, array("class" => "langeditor_issues"));
|
$table->construct_cell(count($editvars_left), array("class" => "langeditor_phrases")); $table->construct_cell("", array("class" => "langeditor_editfile")); $table->construct_cell($icon_issues, array("class" => "langeditor_issues"));
|
$table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang={$editlang}&editwith={$editwith}&file={$file}\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
| $table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang=".htmlspecialchars_uni($editlang)."&editwith=".htmlspecialchars_uni($editwith)."&file=".htmlspecialchars_uni($file)."\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
|
$table->construct_row(); } foreach($files_right as $key => $file)
| $table->construct_row(); } foreach($files_right as $key => $file)
|
Zeile 749 | Zeile 749 |
---|
unset($l);
$icon_issues = "<span class='langeditor_ok' title='".$lang->issues_ok."'></span>";
|
unset($l);
$icon_issues = "<span class='langeditor_ok' title='".$lang->issues_ok."'></span>";
|
if(count($editvars_right >0))
| if(count($editvars_right) >0)
|
{ $icon_issues = "<span class='langeditor_nothingtocompare' title='".$lang->issues_nothingtocompare."'></span>"; }
$table->construct_cell("", array("class" => "langeditor_editwithfile")); $table->construct_cell("", array("class" => "langeditor_phrases"));
|
{ $icon_issues = "<span class='langeditor_nothingtocompare' title='".$lang->issues_nothingtocompare."'></span>"; }
$table->construct_cell("", array("class" => "langeditor_editwithfile")); $table->construct_cell("", array("class" => "langeditor_phrases"));
|
$table->construct_cell($file, array("class" => "langeditor_editfile"));
| $table->construct_cell(htmlspecialchars_uni($file), array("class" => "langeditor_editfile"));
|
$table->construct_cell($icon_issues, array("class" => "langeditor_issues"));
|
$table->construct_cell($icon_issues, array("class" => "langeditor_issues"));
|
$table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang={$editlang}&editwith={$editwith}&file={$file}\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
| $table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang=".htmlspecialchars_uni($editlang)."&editwith=".htmlspecialchars_uni($editwith)."&file=".htmlspecialchars_uni($file)."\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
|
$table->construct_row(); } foreach($files_both as $key => $file)
| $table->construct_row(); } foreach($files_both as $key => $file)
|
Zeile 770 | Zeile 770 |
---|
$editvars_right = (array)$l; unset($l);
|
$editvars_right = (array)$l; unset($l);
|
$table->construct_cell($file, array("class" => "langeditor_editwithfile"));
| $table->construct_cell(htmlspecialchars_uni($file), array("class" => "langeditor_editwithfile"));
|
$table->construct_cell(count($editvars_left), array("class" => "langeditor_phrases"));
|
$table->construct_cell(count($editvars_left), array("class" => "langeditor_phrases"));
|
$table->construct_cell($file, array("class" => "langeditor_editfile"));
| $table->construct_cell(htmlspecialchars_uni($file), array("class" => "langeditor_editfile"));
|
$icon_issues = "<span class='langeditor_ok' title='".$lang->issues_ok."'></span>";
| $icon_issues = "<span class='langeditor_ok' title='".$lang->issues_ok."'></span>";
|
Zeile 792 | Zeile 792 |
---|
}
$table->construct_cell($icon_issues, array("class" => "langeditor_issues"));
|
}
$table->construct_cell($icon_issues, array("class" => "langeditor_issues"));
|
$table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang={$editlang}&editwith={$editwith}&file={$file}\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
| $table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang=".htmlspecialchars_uni($editlang)."&editwith=".htmlspecialchars_uni($editwith)."&file=".htmlspecialchars_uni($file)."\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
|
$table->construct_row(); } }
| $table->construct_row(); } }
|
Zeile 804 | Zeile 804 |
---|
$editvars_count = (array)$l; unset($l);
|
$editvars_count = (array)$l; unset($l);
|
$table->construct_cell($file, array("class" => "langeditor_editfile"));
| $table->construct_cell(htmlspecialchars_uni($file), array("class" => "langeditor_editfile"));
|
$table->construct_cell(count($editvars_count), array("class" => "langeditor_phrases"));
|
$table->construct_cell(count($editvars_count), array("class" => "langeditor_phrases"));
|
$table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang={$editlang}&editwith={$editwith}&file={$file}\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
| $table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang=".htmlspecialchars_uni($editlang)."&editwith=".htmlspecialchars_uni($editwith)."&file=".htmlspecialchars_uni($file)."\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
|
$table->construct_row(); } }
| $table->construct_row(); } }
|
Zeile 824 | Zeile 824 |
---|
$table = new Table; if($editwithfolder) {
|
$table = new Table; if($editwithfolder) {
|
$table->construct_header(preg_replace("<\?|\?>", "<span>?</span>", $languages[$editwith]));
| $table->construct_header(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editwith])));
|
$table->construct_header($lang->phrases, array("class" => "align_center", "width" => 100));
|
$table->construct_header($lang->phrases, array("class" => "align_center", "width" => 100));
|
$table->construct_header(preg_replace("<\?|\?>", "<span>?</span>", $languages[$editlang]));
| $table->construct_header(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editlang])));
|
$table->construct_header($lang->issues, array("class" => "align_center", "width" => 100)); $table->construct_header($lang->controls, array("class" => "align_center", "width" => 100)); } else {
|
$table->construct_header($lang->issues, array("class" => "align_center", "width" => 100)); $table->construct_header($lang->controls, array("class" => "align_center", "width" => 100)); } else {
|
$table->construct_header(preg_replace("<\?|\?>", "<span>?</span>", $languages[$editlang]));
| $table->construct_header(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editlang])));
|
$table->construct_header($lang->phrases, array("class" => "align_center", "width" => 100)); $table->construct_header($lang->controls, array("class" => "align_center", "width" => 100)); }
| $table->construct_header($lang->phrases, array("class" => "align_center", "width" => 100)); $table->construct_header($lang->controls, array("class" => "align_center", "width" => 100)); }
|
Zeile 890 | Zeile 890 |
---|
$icon_issues = "<span class='langeditor_warning' title='".$lang->issues_warning."'></span>"; }
|
$icon_issues = "<span class='langeditor_warning' title='".$lang->issues_warning."'></span>"; }
|
$table->construct_cell($file, array("class" => "langeditor_editwithfile"));
| $table->construct_cell(htmlspecialchars_uni($file), array("class" => "langeditor_editwithfile"));
|
$table->construct_cell(count($editvars_left), array("class" => "langeditor_phrases")); $table->construct_cell("", array("class" => "langeditor_editfile")); $table->construct_cell($icon_issues, array("class" => "langeditor_issues"));
|
$table->construct_cell(count($editvars_left), array("class" => "langeditor_phrases")); $table->construct_cell("", array("class" => "langeditor_editfile")); $table->construct_cell($icon_issues, array("class" => "langeditor_issues"));
|
$table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang={$editlang}&editwith={$editwith}&file={$config['admindir']}/{$file}&inadmin=1\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
| $table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang=".htmlspecialchars_uni($editlang)."&editwith=".htmlspecialchars_uni($editwith)."&file={$config['admindir']}/".htmlspecialchars_uni($file)."&inadmin=1\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
|
$table->construct_row(); } foreach($files_right as $key => $file)
| $table->construct_row(); } foreach($files_right as $key => $file)
|
Zeile 904 | Zeile 904 |
---|
unset($l);
$icon_issues = "<span class='langeditor_ok' title='".$lang->issues_ok."'></span>";
|
unset($l);
$icon_issues = "<span class='langeditor_ok' title='".$lang->issues_ok."'></span>";
|
if(count($editvars_right >0))
| if(count($editvars_right) >0)
|
{ $icon_issues = "<span class='langeditor_nothingtocompare' title='".$lang->issues_nothingtocompare."'></span>"; }
$table->construct_cell("", array("class" => "langeditor_editwithfile")); $table->construct_cell("", array("class" => "langeditor_phrases"));
|
{ $icon_issues = "<span class='langeditor_nothingtocompare' title='".$lang->issues_nothingtocompare."'></span>"; }
$table->construct_cell("", array("class" => "langeditor_editwithfile")); $table->construct_cell("", array("class" => "langeditor_phrases"));
|
$table->construct_cell($file, array("class" => "langeditor_editfile"));
| $table->construct_cell(htmlspecialchars_uni($file), array("class" => "langeditor_editfile"));
|
$table->construct_cell($icon_issues, array("class" => "langeditor_issues"));
|
$table->construct_cell($icon_issues, array("class" => "langeditor_issues"));
|
$table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang={$editlang}&editwith={$editwith}&file={$config['admindir']}/{$file}&inadmin=1\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
| $table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang=".htmlspecialchars_uni($editlang)."&editwith=".htmlspecialchars_uni($editwith)."&file={$config['admindir']}/".htmlspecialchars_uni($file)."&inadmin=1\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
|
$table->construct_row(); } foreach($files_both as $key => $file)
| $table->construct_row(); } foreach($files_both as $key => $file)
|
Zeile 925 | Zeile 925 |
---|
$editvars_right = (array)$l; unset($l);
|
$editvars_right = (array)$l; unset($l);
|
$table->construct_cell($file, array("class" => "langeditor_editwithfile"));
| $table->construct_cell(htmlspecialchars_uni($file), array("class" => "langeditor_editwithfile"));
|
$table->construct_cell(count($editvars_left), array("class" => "langeditor_phrases"));
|
$table->construct_cell(count($editvars_left), array("class" => "langeditor_phrases"));
|
$table->construct_cell($file, array("class" => "langeditor_editfile"));
| $table->construct_cell(htmlspecialchars_uni($file), array("class" => "langeditor_editfile"));
|
$icon_issues = "<span class='langeditor_ok' title='".$lang->issues_ok."'></span>";
| $icon_issues = "<span class='langeditor_ok' title='".$lang->issues_ok."'></span>";
|
Zeile 947 | Zeile 947 |
---|
}
$table->construct_cell($icon_issues, array("class" => "langeditor_issues"));
|
}
$table->construct_cell($icon_issues, array("class" => "langeditor_issues"));
|
$table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang={$editlang}&editwith={$editwith}&file={$config['admindir']}/{$file}&inadmin=1\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
| $table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang=".htmlspecialchars_uni($editlang)."&editwith=".htmlspecialchars_uni($editwith)."&file={$config['admindir']}/".htmlspecialchars_uni($file)."&inadmin=1\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
|
$table->construct_row(); } }
| $table->construct_row(); } }
|
Zeile 959 | Zeile 959 |
---|
$editvars_count = (array)$l; unset($l);
|
$editvars_count = (array)$l; unset($l);
|
$table->construct_cell($file, array("class" => "langeditor_editfile"));
| $table->construct_cell(htmlspecialchars_uni($file), array("class" => "langeditor_editfile"));
|
$table->construct_cell(count($editvars_count), array("class" => "langeditor_phrases"));
|
$table->construct_cell(count($editvars_count), array("class" => "langeditor_phrases"));
|
$table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang={$editlang}&editwith={$editwith}&file={$config['admindir']}/{$file}&inadmin=1\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
| $table->construct_cell("<a href=\"index.php?module=config-languages&action=edit&lang=".htmlspecialchars_uni($editlang)."&editwith=".htmlspecialchars_uni($editwith)."&file={$config['admindir']}/".htmlspecialchars_uni($file)."&inadmin=1\">{$lang->edit}</a>", array("class" => "langeditor_edit"));
|
$table->construct_row(); } }
| $table->construct_row(); } }
|
Zeile 991 | Zeile 991 |
---|
$sub_tabs['find_language'] = array( 'title' => $lang->find_language_packs, 'link' => "https://community.mybb.com/mods.php?action=browse&category=19",
|
$sub_tabs['find_language'] = array( 'title' => $lang->find_language_packs, 'link' => "https://community.mybb.com/mods.php?action=browse&category=19",
|
'target' => "_blank"
| 'link_target' => "_blank", 'link_rel' => "noopener"
|
);
$plugins->run_hooks("admin_config_languages_start");
| );
$plugins->run_hooks("admin_config_languages_start");
|
Zeile 1007 | Zeile 1008 |
---|
foreach($languages as $key1 => $langname1) {
|
foreach($languages as $key1 => $langname1) {
|
$langselectlangs[$key1] = $lang->sprintf($lang->edit_with, preg_replace("<\?|\?>", "<span>?</span>", $langname1));
| $langselectlangs[$key1] = $lang->sprintf($lang->edit_with, preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($langname1)));
|
}
foreach($languages as $key => $langname)
| }
foreach($languages as $key => $langname)
|
Zeile 1016 | Zeile 1017 |
---|
if(!empty($langinfo['website'])) {
|
if(!empty($langinfo['website'])) {
|
$author = "<a href=\"{$langinfo['website']}\" target=\"_blank\">{$langinfo['author']}</a>";
| $author = "<a href=\"".htmlspecialchars_uni($langinfo['website'])."\" target=\"_blank\" rel=\"noopener\">".htmlspecialchars_uni($langinfo['author'])."</a>";
|
} else {
|
} else {
|
$author = $langinfo['author'];
| $author = htmlspecialchars_uni($langinfo['author']);
|
}
|
}
|
$table->construct_cell("<span class='langeditor_info_name'>".preg_replace("<\?|\?>", "<span>?</span>", $langinfo['name'])."</span><br /><span class='langeditor_info_author'>{$author}</span>"); $table->construct_cell($langinfo['version'], array("class" => "align_center"));
| $table->construct_cell("<span class='langeditor_info_name'>".preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($langinfo['name']))."</span><br /><span class='langeditor_info_author'>".$author."</span>"); $table->construct_cell(htmlspecialchars_uni($langinfo['version']), array("class" => "align_center"));
|
|
|
$popup = new PopupMenu("language_{$key}", $lang->options); $popup->add_item($lang->edit_language_variables, "index.php?module=config-languages&action=edit&lang={$key}");
| $popup = new PopupMenu("language_".htmlspecialchars_uni($key), $lang->options); $popup->add_item($lang->edit_language_variables, "index.php?module=config-languages&action=edit&lang=".htmlspecialchars_uni($key));
|
foreach($langselectlangs as $key1 => $langname1) { if($key != $key1) {
|
foreach($langselectlangs as $key1 => $langname1) { if($key != $key1) {
|
$popup->add_item($langname1, "index.php?module=config-languages&action=edit&lang={$key}&editwith={$key1}");
| $popup->add_item($langname1, "index.php?module=config-languages&action=edit&lang=".htmlspecialchars_uni($key)."&editwith=".htmlspecialchars_uni($key1));
|
} }
|
} }
|
$popup->add_item($lang->edit_properties, "index.php?module=config-languages&action=edit_properties&lang={$key}");
| $popup->add_item($lang->edit_properties, "index.php?module=config-languages&action=edit_properties&lang=".htmlspecialchars_uni($key));
|
$table->construct_cell($popup->fetch(), array("class" => "align_center")); $table->construct_row(); }
| $table->construct_cell($popup->fetch(), array("class" => "align_center")); $table->construct_row(); }
|
Zeile 1049 | Zeile 1050 |
---|
$table->output($lang->installed_language_packs);
$page->output_footer();
|
$table->output($lang->installed_language_packs);
$page->output_footer();
|
| }
/** * Fixes url encoded unicode characters * * @param string $string The string to encode. * @return string The encoded string. */ function encode_language_string_utf8($matches) { return dec_to_utf8(hexdec($matches[1])); }
/** * Fixes url encoded unicode characters * * @param string $string The string to encode. * @return string The encoded string. */ function encode_language_string($matches) { return "&#".hexdec($matches[1]).";";
|
}
| }
|