Vergleich admin/modules/config/languages.php - 1.8.1 - 1.8.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 44Zeile 44
		{
$info = str_replace("\\", "\\\\", $info);
$info = str_replace('$', '\$', $info);

		{
$info = str_replace("\\", "\\\\", $info);
$info = str_replace('$', '\$', $info);

			



			if($key == 'admin' || $key == 'rtl')
{
$info = (int)$info;
}

			if($key == 'admin' || $key == 'rtl')
{
$info = (int)$info;
}

			



			$newlanginfo[$key] = str_replace("\"", '\"', $info);
}


			$newlanginfo[$key] = str_replace("\"", '\"', $info);
}


Zeile 178Zeile 178
}

if($mybb->input['action'] == "quick_phrases")

}

if($mybb->input['action'] == "quick_phrases")

{
// Validate input
$editlang = basename($mybb->input['lang']);
$folder = MYBB_ROOT."inc/languages/".$editlang."/";


{
// Validate input
$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&amp;action=quick_edit&amp;lang={$editlang}");

// Validate that this language pack really exists

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

// Validate that this language pack really exists

Zeile 244Zeile 244
					// Lets make nice credits header in language file
$lang_file_credits = "<?php\n/**\n";
$lang_file_credits .= " * MyBB Copyright 2014 MyBB Group, All Rights Reserved\n *\n";

					// Lets make nice credits header in language file
$lang_file_credits = "<?php\n/**\n";
$lang_file_credits .= " * MyBB Copyright 2014 MyBB Group, All Rights Reserved\n *\n";

					$lang_file_credits .= " * Website: http://www.mybb.com\n";
$lang_file_credits .= " * License: http://www.mybb.com/about/license\n *\n */\n\n";

					$lang_file_credits .= " * Website: https://mybb.com\n";
$lang_file_credits .= " * License: https://mybb.com/about/license\n *\n */\n\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 .= "// MyBB Language Pack File.\n";
$lang_file_credits .= "// This file has been generated by MyBB - buildin language pack editor.\n";

Zeile 317Zeile 317
	foreach($quick_phrases as $file => $phrases)
{
if(file_exists($folder.$file) && !is_writable($folder.$file) || !is_writable($folder))

	foreach($quick_phrases as $file => $phrases)
{
if(file_exists($folder.$file) && !is_writable($folder.$file) || !is_writable($folder))

		{
$no_write = 1;
}
}


		{
$no_write = 1;
}
}


	if($no_write)
{
$page->output_alert($lang->alert_note_cannot_write);
}

	if($no_write)
{
$page->output_alert($lang->alert_note_cannot_write);
}





	$form_container = new FormContainer($lang->quick_phrases);

foreach($quick_phrases as $file => $phrases)

	$form_container = new FormContainer($lang->quick_phrases);

foreach($quick_phrases as $file => $phrases)

	{

	{

		unset($langinfo);
@include MYBB_ROOT."inc/languages/".$editlang.".php";
$quickphrases_dir_class = " langeditor_ltr";
if((int)$langinfo['rtl'] > 0)
{
$quickphrases_dir_class = " langeditor_rtl";

		unset($langinfo);
@include MYBB_ROOT."inc/languages/".$editlang.".php";
$quickphrases_dir_class = " langeditor_ltr";
if((int)$langinfo['rtl'] > 0)
{
$quickphrases_dir_class = " langeditor_rtl";

		}


		}


		@include $folder.$file;
foreach($phrases as $phrase => $description)
{

		@include $folder.$file;
foreach($phrases as $phrase => $description)
{

Zeile 354Zeile 354

$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();

$buttons[] = $form->generate_submit_button($lang->save_language_file, array('disabled' => $no_write));

	$form_container->end();

$buttons[] = $form->generate_submit_button($lang->save_language_file, array('disabled' => $no_write));

Zeile 388Zeile 388
		// Then validate edited language pack folders (and try to fix them if missing)
@mkdir($folder);
@mkdir($folder."admin");

		// Then validate edited language pack folders (and try to fix them if missing)
@mkdir($folder);
@mkdir($folder."admin");

	}


	}


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

Zeile 451Zeile 451
				// Lets make nice credits header in language file
$lang_file_credits = "<?php\n/**\n";
$lang_file_credits .= " * MyBB Copyright 2014 MyBB Group, All Rights Reserved\n *\n";

				// Lets make nice credits header in language file
$lang_file_credits = "<?php\n/**\n";
$lang_file_credits .= " * MyBB Copyright 2014 MyBB Group, All Rights Reserved\n *\n";

				$lang_file_credits .= " * Website: http://www.mybb.com\n";
$lang_file_credits .= " * License: http://www.mybb.com/about/license\n *\n */\n\n";

				$lang_file_credits .= " * Website: https://mybb.com\n";
$lang_file_credits .= " * License: https://mybb.com/about/license\n *\n */\n\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 .= "// MyBB Language Pack File.\n";
$lang_file_credits .= "// This file has been generated by MyBB - buildin language pack editor.\n";

Zeile 475Zeile 475
				$plugins->run_hooks("admin_config_languages_edit_commit");

// Log admin action

				$plugins->run_hooks("admin_config_languages_edit_commit");

// Log admin action

				log_admin_action($editlang, $editfile, (int)$mybb->input['inadmin']);

				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}");


flash_message($lang->success_langfile_updated, 'success');
admin_redirect("index.php?module=config-languages&action=edit&lang={$editlang}&editwith={$editwith}");

Zeile 529Zeile 529
		$page->output_nav_tabs($sub_tabs, "edit_language_variables");

$form = new Form("index.php?module=config-languages&amp;action=edit", "post", "edit");

		$page->output_nav_tabs($sub_tabs, "edit_language_variables");

$form = new Form("index.php?module=config-languages&amp;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("lang", $editlang);
echo $form->generate_hidden_field("editwith", $editwith);

		echo $form->generate_hidden_field("inadmin", (int)$mybb->input['inadmin']);

		echo $form->generate_hidden_field("inadmin", $mybb->get_input('inadmin', MyBB::INPUT_INT));

		if($errors)
{
$page->output_inline_error($errors);

		if($errors)
{
$page->output_inline_error($errors);

Zeile 546Zeile 546
			$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 && $withvars)
{
// Editing with another file

		if($editwithfile && $withvars)
{
// Editing with another file

Zeile 601Zeile 601
					{
$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", create_function('$matches', 'return "&#".hexdec($matches[1]).";";'), $editvars[$key]);
}

						



					$form_container->output_row("", "", "", "", array('width' => '50%', 'skip_construct' => true));
$form_container->output_row($key, "", $form->generate_text_area("edit[$key]", $editvars[$key], array('id' => 'lang_'.$key, 'rows' => 2, 'class' => "langeditor_textarea_edit {$editlang_dir_class}")), 'lang_'.$key, array('width' => '50%'));
}

					$form_container->output_row("", "", "", "", array('width' => '50%', 'skip_construct' => true));
$form_container->output_row($key, "", $form->generate_text_area("edit[$key]", $editvars[$key], array('id' => 'lang_'.$key, 'rows' => 2, 'class' => "langeditor_textarea_edit {$editlang_dir_class}")), 'lang_'.$key, array('width' => '50%'));
}

Zeile 990Zeile 990
	);
$sub_tabs['find_language'] = array(
'title' => $lang->find_language_packs,

	);
$sub_tabs['find_language'] = array(
'title' => $lang->find_language_packs,

		'link' => "http://community.mybb.com/mods.php?action=browse&category=19",

		'link' => "https://community.mybb.com/mods.php?action=browse&category=19",

		'target' => "_blank"
);


		'target' => "_blank"
);