Vergleich admin/modules/config/languages.php - 1.8.29 - 1.8.34

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 20Zeile 20

$plugins->run_hooks("admin_config_languages_begin");



$plugins->run_hooks("admin_config_languages_begin");


 
$no_write = null;

if($mybb->input['action'] == "edit_properties")
{
$editlang = basename($mybb->input['lang']);

if($mybb->input['action'] == "edit_properties")
{
$editlang = basename($mybb->input['lang']);

Zeile 181Zeile 182
{
// 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 248
				{
// 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 307
		'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 367
			}

$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 376

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


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





	$page->output_footer();
}


	$page->output_footer();
}


Zeile 376Zeile 384
{
// 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 413

// 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 428
	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 444
	{
// 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;

Zeile 949Zeile 979
					$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&amp;action=edit&amp;lang=".htmlspecialchars_uni($editlang)."&amp;editwith=".htmlspecialchars_uni($editwith)."&amp;file={$config['admindir']}/".htmlspecialchars_uni($file)."&amp;inadmin=1\">{$lang->edit}</a>", array("class" => "langeditor_edit"));

					$table->construct_cell("<a href=\"index.php?module=config-languages&amp;action=edit&amp;lang=".htmlspecialchars_uni($editlang)."&amp;editwith=".htmlspecialchars_uni($editwith)."&amp;file=".htmlspecialchars_uni($file)."&amp;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 968Zeile 998
					$table->construct_cell("", array("class" => "langeditor_phrases"));
$table->construct_cell(htmlspecialchars_uni($file), array("class" => "langeditor_editfile"));
$table->construct_cell($icon_issues, array("class" => "langeditor_issues"));

					$table->construct_cell("", array("class" => "langeditor_phrases"));
$table->construct_cell(htmlspecialchars_uni($file), array("class" => "langeditor_editfile"));
$table->construct_cell($icon_issues, array("class" => "langeditor_issues"));

					$table->construct_cell("<a href=\"index.php?module=config-languages&amp;action=edit&amp;lang=".htmlspecialchars_uni($editlang)."&amp;editwith=".htmlspecialchars_uni($editwith)."&amp;file={$config['admindir']}/".htmlspecialchars_uni($file)."&amp;inadmin=1\">{$lang->edit}</a>", array("class" => "langeditor_edit"));

					$table->construct_cell("<a href=\"index.php?module=config-languages&amp;action=edit&amp;lang=".htmlspecialchars_uni($editlang)."&amp;editwith=".htmlspecialchars_uni($editwith)."&amp;file=".htmlspecialchars_uni($file)."&amp;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 1002Zeile 1032
					}

$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&amp;action=edit&amp;lang=".htmlspecialchars_uni($editlang)."&amp;editwith=".htmlspecialchars_uni($editwith)."&amp;file={$config['admindir']}/".htmlspecialchars_uni($file)."&amp;inadmin=1\">{$lang->edit}</a>", array("class" => "langeditor_edit"));

					$table->construct_cell("<a href=\"index.php?module=config-languages&amp;action=edit&amp;lang=".htmlspecialchars_uni($editlang)."&amp;editwith=".htmlspecialchars_uni($editwith)."&amp;file=".htmlspecialchars_uni($file)."&amp;inadmin=1\">{$lang->edit}</a>", array("class" => "langeditor_edit"));

					$table->construct_row();
}
}

					$table->construct_row();
}
}