Zeile 45 | Zeile 45 |
---|
{ $info = str_replace("\\", "\\\\", $info); $info = str_replace('$', '\$', $info);
|
{ $info = str_replace("\\", "\\\\", $info); $info = str_replace('$', '\$', $info);
|
| if($key == 'admin' || $key == 'rtl') { $info = (int)$info; }
|
$newlanginfo[$key] = str_replace("\"", '\"', $info); }
| $newlanginfo[$key] = str_replace("\"", '\"', $info); }
|
Zeile 296 | Zeile 302 |
---|
$value = $l[$phrase]; if(my_strtolower($langinfo['charset']) == "utf-8") {
|
$value = $l[$phrase]; if(my_strtolower($langinfo['charset']) == "utf-8") {
|
$value = preg_replace("#%u([0-9A-F]{1,4})#ie", "dec_to_utf8(hexdec('$1'));", $value);
| $value = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return dec_to_utf8(hexdec($matches[1]));'), $value);
|
} else {
|
} else {
|
$value = preg_replace("#%u([0-9A-F]{1,4})#ie", "'&#'.hexdec('$1').';'", $value);
| $value = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return "&#".hexdec($matches[1]).";";'), $value);
|
} $form_container->output_row($description, $phrase, $form->generate_text_area("edit[$phrase]", $value, array('id' => 'lang_'.$phrase, 'rows' => 2, 'style' => "width: 98%; padding: 4px;")), 'lang_'.$phrase, array('width' => '50%'));
| } $form_container->output_row($description, $phrase, $form->generate_text_area("edit[$phrase]", $value, array('id' => 'lang_'.$phrase, 'rows' => 2, 'style' => "width: 98%; padding: 4px;")), 'lang_'.$phrase, array('width' => '50%'));
|
Zeile 441 | Zeile 447 |
---|
$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", $file);
| echo $form->generate_hidden_field("file", htmlspecialchars_uni($file));
|
echo $form->generate_hidden_field("lang", $editlang); echo $form->generate_hidden_field("editwith", $editwith); echo $form->generate_hidden_field("inadmin", intval($mybb->input['inadmin']));
| echo $form->generate_hidden_field("lang", $editlang); echo $form->generate_hidden_field("editwith", $editwith); echo $form->generate_hidden_field("inadmin", intval($mybb->input['inadmin']));
|
Zeile 458 | Zeile 464 |
---|
$page->output_alert($lang->alert_note_cannot_write); }
|
$page->output_alert($lang->alert_note_cannot_write); }
|
$form_container = new FormContainer($file);
| $form_container = new FormContainer(htmlspecialchars_uni($file));
|
if($editwithfile) { // Editing with another file
| if($editwithfile) { // Editing with another file
|
Zeile 470 | Zeile 476 |
---|
{ if(my_strtolower($langinfo['charset']) == "utf-8") {
|
{ if(my_strtolower($langinfo['charset']) == "utf-8") {
|
$withvars[$key] = preg_replace("#%u([0-9A-F]{1,4})#ie", "dec_to_utf8(hexdec('$1'));", $withvars[$key]); $value = preg_replace("#%u([0-9A-F]{1,4})#ie", "dec_to_utf8(hexdec('$1'));", $value);
| $withvars[$key] = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return dec_to_utf8(hexdec($matches[1]));'), $withvars[$key]); $value = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return dec_to_utf8(hexdec($matches[1]));'), $value);
|
} else {
|
} else {
|
$withvars[$key] = preg_replace("#%u([0-9A-F]{1,4})#ie", "dec_to_utf8(hexdec('$1'));", $withvars[$key]); $value = preg_replace("#%u([0-9A-F]{1,4})#ie", "'&#'.hexdec('$1').';'", $value);
| $withvars[$key] = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return dec_to_utf8(hexdec($matches[1]));'), $withvars[$key]); $value = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return "&#".hexdec($matches[1]).";";'), $value);
|
} $form_container->output_row($key, "", $form->generate_text_area("", $withvars[$key], array('disabled' => true, 'rows' => 2, 'style' => "width: 98%; padding: 4px;")), "", array('width' => '50%', 'skip_construct' => true)); $form_container->output_row($key, "", $form->generate_text_area("edit[$key]", $value, array('id' => 'lang_'.$key, 'rows' => 2, 'style' => "width: 98%; padding: 4px;")), 'lang_'.$key, array('width' => '50%'));
| } $form_container->output_row($key, "", $form->generate_text_area("", $withvars[$key], array('disabled' => true, 'rows' => 2, 'style' => "width: 98%; padding: 4px;")), "", array('width' => '50%', 'skip_construct' => true)); $form_container->output_row($key, "", $form->generate_text_area("edit[$key]", $value, array('id' => 'lang_'.$key, 'rows' => 2, 'style' => "width: 98%; padding: 4px;")), 'lang_'.$key, array('width' => '50%'));
|
Zeile 492 | Zeile 498 |
---|
{ if(my_strtolower($langinfo['charset']) == "utf-8") {
|
{ if(my_strtolower($langinfo['charset']) == "utf-8") {
|
$value = preg_replace("#%u([0-9A-F]{1,4})#ie", "dec_to_utf8(hexdec('$1'));", $value);
| $value = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return dec_to_utf8(hexdec($matches[1]));'), $value);
|
} else {
|
} else {
|
$value = preg_replace("#%u([0-9A-F]{1,4})#ie", "'&#'.hexdec('$1').';'", $value);
| $value = preg_replace_callback("#%u([0-9A-F]{1,4})#i", create_function('$matches', 'return "&#".hexdec($matches[1]).";";'), $value);
|
} $form_container->output_row($key, "", $form->generate_text_area("edit[$key]", $value, array('id' => 'lang_'.$key, 'rows' => 2, 'style' => "width: 98%; padding: 4px;")), 'lang_'.$key, array('width' => '50%')); }
| } $form_container->output_row($key, "", $form->generate_text_area("edit[$key]", $value, array('id' => 'lang_'.$key, 'rows' => 2, 'style' => "width: 98%; padding: 4px;")), 'lang_'.$key, array('width' => '50%')); }
|