Vergleich admin/modules/config/languages.php - 1.8.30 - 1.8.33

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 181Zeile 181
{
// Validate input
$editlang = basename($mybb->input['lang']);

{
// Validate input
$editlang = basename($mybb->input['lang']);

 

if(in_array($editlang, array('.', '..')))
{
flash_message($lang->error_folders_fail, 'error');
admin_redirect("index.php?module=config-languages");
}


	$folder = MYBB_ROOT."inc/languages/".$editlang."/";

$page->add_breadcrumb_item(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editlang])), "index.php?module=config-languages&amp;action=quick_edit&amp;lang=".htmlspecialchars_uni($editlang));

	$folder = MYBB_ROOT."inc/languages/".$editlang."/";

$page->add_breadcrumb_item(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editlang])), "index.php?module=config-languages&amp;action=quick_edit&amp;lang=".htmlspecialchars_uni($editlang));

Zeile 240Zeile 247
				{
// validation - we fetch from input only variables that are defined in $quick_phrases array
$contents_file[$key] = $mybb->input['edit'][$key];

				{
// validation - we fetch from input only variables that are defined in $quick_phrases array
$contents_file[$key] = $mybb->input['edit'][$key];

				}

				}

				// Save edited language file
if($fp = @fopen($folder.$file, "w"))
{

				// Save edited language file
if($fp = @fopen($folder.$file, "w"))
{

Zeile 299Zeile 306
		'title' => $lang->language_files,
'link' => "index.php?module=config-languages&amp;action=edit&amp;lang=".$editlang,
'description' => $lang->language_files_desc

		'title' => $lang->language_files,
'link' => "index.php?module=config-languages&amp;action=edit&amp;lang=".$editlang,
'description' => $lang->language_files_desc

	);


	);


	$sub_tabs['quick_phrases'] = array(
'title' => $lang->quick_phrases,
'link' => "index.php?module=config-languages&amp;action=quick_phrases&amp;lang=".$editlang,

	$sub_tabs['quick_phrases'] = array(
'title' => $lang->quick_phrases,
'link' => "index.php?module=config-languages&amp;action=quick_phrases&amp;lang=".$editlang,

Zeile 359Zeile 366
			}

$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%'));

		}
}

		}
}


$form_container->end();



$form_container->end();


Zeile 368Zeile 375

$form->output_submit_wrapper($buttons);
$form->end();


$form->output_submit_wrapper($buttons);
$form->end();





	$page->output_footer();
}


	$page->output_footer();
}


Zeile 376Zeile 383
{
// Validate input
$editlang = basename($mybb->input['lang']);

{
// Validate input
$editlang = basename($mybb->input['lang']);

 

if(in_array($editlang, array('.', '..')))
{
flash_message($lang->error_folders_fail, 'error');
admin_redirect("index.php?module=config-languages");
}


	$folder = MYBB_ROOT."inc/languages/".$editlang."/";

$page->add_breadcrumb_item(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editlang])), "index.php?module=config-languages&amp;action=edit&amp;lang=".htmlspecialchars_uni($editlang));

	$folder = MYBB_ROOT."inc/languages/".$editlang."/";

$page->add_breadcrumb_item(preg_replace("<\?|\?>", "<span>?</span>", htmlspecialchars_uni($languages[$editlang])), "index.php?module=config-languages&amp;action=edit&amp;lang=".htmlspecialchars_uni($editlang));





	$editwith = basename($mybb->get_input('editwith'));

	$editwith = basename($mybb->get_input('editwith'));

 

if(in_array($editwith, array('.', '..')))
{
flash_message($lang->error_folders_fail, 'error');
admin_redirect("index.php?module=config-languages");
}



	$editwithfolder = '';

if($editwith)

	$editwithfolder = '';

if($editwith)

Zeile 390Zeile 412

// Validate that edited language pack really exists
if(file_exists(MYBB_ROOT."inc/languages/".$editlang.".php"))


// Validate that edited language pack really exists
if(file_exists(MYBB_ROOT."inc/languages/".$editlang.".php"))

	{

	{

		// Then validate edited language pack folders (and try to fix them if missing)
if(!is_dir($folder))
{

		// Then validate edited language pack folders (and try to fix them if missing)
if(!is_dir($folder))
{

Zeile 405Zeile 427
	if(!file_exists($folder) || !file_exists($folder."admin"))
{
flash_message($lang->error_folders_fail, 'error');

	if(!file_exists($folder) || !file_exists($folder."admin"))
{
flash_message($lang->error_folders_fail, 'error');

		admin_redirect("index.php?module=config-languages");

		admin_redirect("index.php?module=config-languages");

	}

// If we edit in compare mode, verify that at least folders of compared language exists

	}

// If we edit in compare mode, verify that at least folders of compared language exists

Zeile 421Zeile 443
	{
// Validate input
$file = basename($mybb->input['file']);

	{
// Validate input
$file = basename($mybb->input['file']);

 

if(in_array($file, array('.', '..')))
{
flash_message($lang->error_folders_fail, 'error');
admin_redirect("index.php?module=config-languages");
}


		if($mybb->get_input('inadmin') == 1)
{
$file = 'admin/'.$file;

		if($mybb->get_input('inadmin') == 1)
{
$file = 'admin/'.$file;