Vergleich admin/modules/config/settings.php - 1.8.27 - 1.8.29

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

if(!$errors)
{


if(!$errors)
{

			if($mybb->input['type'] == "custom")
{
$options_code = $mybb->input['extra'];
}
else if($mybb->input['extra'])

			if($mybb->input['extra'])





			{
$options_code = "{$mybb->input['type']}\n{$mybb->input['extra']}";
}

			{
$options_code = "{$mybb->input['type']}\n{$mybb->input['extra']}";
}

Zeile 361Zeile 357
	$sub_tabs['change_settings'] = array(
'title' => $lang->change_settings,
'link' => "index.php?module=config-settings"

	$sub_tabs['change_settings'] = array(
'title' => $lang->change_settings,
'link' => "index.php?module=config-settings"

	);


	);


	$sub_tabs['add_setting'] = array(
'title' => $lang->add_new_setting,
'link' => "index.php?module=config-settings&action=add",
'description' => $lang->add_new_setting_desc

	$sub_tabs['add_setting'] = array(
'title' => $lang->add_new_setting,
'link' => "index.php?module=config-settings&action=add",
'description' => $lang->add_new_setting_desc

	);

	);


$sub_tabs['add_setting_group'] = array(
'title' => $lang->add_new_setting_group,
'link' => "index.php?module=config-settings&action=addgroup"


$sub_tabs['add_setting_group'] = array(
'title' => $lang->add_new_setting_group,
'link' => "index.php?module=config-settings&action=addgroup"

	);


	);


	$sub_tabs['modify_setting'] = array(
'title' => $lang->modify_existing_settings,
'link' => "index.php?module=config-settings&action=manage"

	$sub_tabs['modify_setting'] = array(
'title' => $lang->modify_existing_settings,
'link' => "index.php?module=config-settings&action=manage"

Zeile 382Zeile 378
	$page->output_nav_tabs($sub_tabs, 'add_setting');

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

	$page->output_nav_tabs($sub_tabs, 'add_setting');

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





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

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

	}


	}


	$form_container = new FormContainer($lang->add_new_setting);
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $mybb->get_input('title'), array('id' => 'title')), 'title');
$form_container->output_row($lang->description, "", $form->generate_text_area('description', $mybb->get_input('description'), array('id' => 'description')), 'description');

	$form_container = new FormContainer($lang->add_new_setting);
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $mybb->get_input('title'), array('id' => 'title')), 'title');
$form_container->output_row($lang->description, "", $form->generate_text_area('description', $mybb->get_input('description'), array('id' => 'description')), 'description');

Zeile 462Zeile 458
	{
flash_message($lang->error_invalid_sid, 'error');
admin_redirect("index.php?module=config-settings");

	{
flash_message($lang->error_invalid_sid, 'error');
admin_redirect("index.php?module=config-settings");

	}

	}


// Prevent editing of default
if($setting['isdefault'] == 1)
{
flash_message($lang->error_cannot_edit_default, 'error');


// Prevent editing of default
if($setting['isdefault'] == 1)
{
flash_message($lang->error_cannot_edit_default, 'error');

		admin_redirect("index.php?module=config-settings&action=manage");
}


		admin_redirect("index.php?module=config-settings&action=manage");
}


	$plugins->run_hooks("admin_config_settings_edit");

$type = explode("\n", $setting['optionscode'], 2);
$type = trim($type[0]);
if($type == "php")

	$plugins->run_hooks("admin_config_settings_edit");

$type = explode("\n", $setting['optionscode'], 2);
$type = trim($type[0]);
if($type == "php")

	{

	{

		flash_message($lang->error_cannot_edit_php, 'error');
admin_redirect("index.php?module=config-settings&action=manage");
}

		flash_message($lang->error_cannot_edit_php, 'error');
admin_redirect("index.php?module=config-settings&action=manage");
}

Zeile 486Zeile 482
		if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;

		if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;

		}


		}


		if(!trim($mybb->input['name']))
{
$errors[] = $lang->error_missing_name;

		if(!trim($mybb->input['name']))
{
$errors[] = $lang->error_missing_name;

		}

		}

		$query = $db->simple_select("settings", "title", "name='".$db->escape_string($mybb->input['name'])."' AND sid != '{$setting['sid']}'");
if($db->num_rows($query) > 0)

		$query = $db->simple_select("settings", "title", "name='".$db->escape_string($mybb->input['name'])."' AND sid != '{$setting['sid']}'");
if($db->num_rows($query) > 0)

		{

		{

			$dup_setting_title = $db->fetch_field($query, 'title');
$errors[] = $lang->sprintf($lang->error_duplicate_name, $dup_setting_title);

			$dup_setting_title = $db->fetch_field($query, 'title');
$errors[] = $lang->sprintf($lang->error_duplicate_name, $dup_setting_title);

		}

		}


// do some type filtering
$mybb->input['type'] = str_replace("\n", "", $mybb->input['type']);


// do some type filtering
$mybb->input['type'] = str_replace("\n", "", $mybb->input['type']);

Zeile 513Zeile 509

if(!$errors)
{


if(!$errors)
{

			if($mybb->input['type'] == "custom")
{
$options_code = $mybb->input['extra'];
}
else if($mybb->input['extra'])

			if($mybb->input['extra'])





			{
$options_code = "{$mybb->input['type']}\n{$mybb->input['extra']}";
}

			{
$options_code = "{$mybb->input['type']}\n{$mybb->input['extra']}";
}

Zeile 1930Zeile 1922
		while($group = $db->fetch_array($query))
{
$group_lang_var = "setting_group_{$group['name']}";

		while($group = $db->fetch_array($query))
{
$group_lang_var = "setting_group_{$group['name']}";

			if($lang->$group_lang_var)

			if(isset($lang->$group_lang_var))

			{
$group_title = htmlspecialchars_uni($lang->$group_lang_var);
}

			{
$group_title = htmlspecialchars_uni($lang->$group_lang_var);
}

Zeile 1940Zeile 1932
			}

$group_desc_lang_var = "setting_group_{$group['name']}_desc";

			}

$group_desc_lang_var = "setting_group_{$group['name']}_desc";

			if($lang->$group_desc_lang_var)

			if(isset($lang->$group_desc_lang_var))

			{
$group_desc = htmlspecialchars_uni($lang->$group_desc_lang_var);
}

			{
$group_desc = htmlspecialchars_uni($lang->$group_desc_lang_var);
}