Zeile 270 | Zeile 270 |
---|
$table = new Table; // Check if file is writable, before allowing submission
|
$table = new Table; // Check if file is writable, before allowing submission
|
$no_write = 0;
| $no_write = null;
|
foreach($quick_phrases as $file => $phrases) {
| foreach($quick_phrases as $file => $phrases) {
|
Zeile 296 | Zeile 296 |
---|
$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 359 | Zeile 359 |
---|
{ $editwithfile = $editwithfolder.$file; }
|
{ $editwithfile = $editwithfolder.$file; }
|
if(!file_exists($editfile) || ($editwithfile && !file_exists($editwithfile)))
| if(!file_exists($editfile) || ($editwithfile && !file_exists($editwithfile)) || $file == '.' || $file == '..')
|
{ flash_message($lang->error_invalid_file, 'error'); admin_redirect("index.php?module=config-languages");
| { flash_message($lang->error_invalid_file, 'error'); admin_redirect("index.php?module=config-languages");
|
Zeile 451 | Zeile 451 |
---|
}
// Check if file is writable, before allowing submission
|
}
// Check if file is writable, before allowing submission
|
$no_write = 0;
| $no_write = null;
|
if(!is_writable($editfile)) { $no_write = 1;
| if(!is_writable($editfile)) { $no_write = 1;
|
Zeile 470 | Zeile 470 |
---|
{ 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 492 |
---|
{ 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%')); }
|