Vergleich admin/modules/config/settings.php - 1.6.13 - 1.6.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 345Zeile 345
			{
$options_code = $mybb->input['type'];
}

			{
$options_code = $mybb->input['type'];
}

 

$mybb->input['name'] = str_replace("\\", '', $mybb->input['name']);
$mybb->input['name'] = str_replace('$', '', $mybb->input['name']);
$mybb->input['name'] = str_replace("'", '', $mybb->input['name']);


$new_setting = array(
"name" => $db->escape_string($mybb->input['name']),


$new_setting = array(
"name" => $db->escape_string($mybb->input['name']),

Zeile 367Zeile 371
			flash_message($lang->success_setting_added, 'success');
admin_redirect("index.php?module=config-settings&action=manage");
}

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

	}

	}


$page->add_breadcrumb_item($lang->add_new_setting);
$page->output_header($lang->board_settings." - ".$lang->add_new_setting);


$page->add_breadcrumb_item($lang->add_new_setting);
$page->output_header($lang->board_settings." - ".$lang->add_new_setting);

Zeile 400Zeile 404
	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->input['title'], array('id' => 'title')), 'title');


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

Zeile 433Zeile 437
	$form_container->output_row($lang->type." <em>*</em>", "", $form->generate_select_box("type", $setting_types, $mybb->input['type'], array('id' => 'type')), 'type');
$form_container->output_row($lang->extra, $lang->extra_desc, $form->generate_text_area('extra', $mybb->input['extra'], array('id' => 'extra')), 'extra', array(), array('id' => 'row_extra'));
$form_container->output_row($lang->value, "", $form->generate_text_area('value', $mybb->input['value'], array('id' => 'value')), 'value');

	$form_container->output_row($lang->type." <em>*</em>", "", $form->generate_select_box("type", $setting_types, $mybb->input['type'], array('id' => 'type')), 'type');
$form_container->output_row($lang->extra, $lang->extra_desc, $form->generate_text_area('extra', $mybb->input['extra'], array('id' => 'extra')), 'extra', array(), array('id' => 'row_extra'));
$form_container->output_row($lang->value, "", $form->generate_text_area('value', $mybb->input['value'], array('id' => 'value')), 'value');

	$form_container->end();

	$form_container->end();


$buttons[] = $form->generate_submit_button($lang->insert_new_setting);
$form->output_submit_wrapper($buttons);


$buttons[] = $form->generate_submit_button($lang->insert_new_setting);
$form->output_submit_wrapper($buttons);

Zeile 444Zeile 448
		// Add a star to the extra row since the "extra" is required if the box is shown
add_star("row_extra");
</script>';

		// Add a star to the extra row since the "extra" is required if the box is shown
add_star("row_extra");
</script>';





	$page->output_footer();
}

	$page->output_footer();
}





// Editing a particular setting
if($mybb->input['action'] == "edit")
{

// Editing a particular setting
if($mybb->input['action'] == "edit")
{

Zeile 455Zeile 459

$query = $db->simple_select("settings", "*", "sid='".intval($mybb->input['sid'])."'");
$setting = $db->fetch_array($query);


$query = $db->simple_select("settings", "*", "sid='".intval($mybb->input['sid'])."'");
$setting = $db->fetch_array($query);





	// Does the setting not exist?
if(!$setting['sid'])
{

	// Does the setting not exist?
if(!$setting['sid'])
{

Zeile 510Zeile 514
		if(!$errors)
{
if($mybb->input['type'] == "custom")

		if(!$errors)
{
if($mybb->input['type'] == "custom")

			{

			{

				$options_code = $mybb->input['extra'];

				$options_code = $mybb->input['extra'];

			}

			}

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

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

			{

			{

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

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

 

$mybb->input['name'] = str_replace("\\", '', $mybb->input['name']);
$mybb->input['name'] = str_replace('$', '', $mybb->input['name']);
$mybb->input['name'] = str_replace("'", '', $mybb->input['name']);


			$updated_setting = array(
"name" => $db->escape_string($mybb->input['name']),
"title" => $db->escape_string($mybb->input['title']),

			$updated_setting = array(
"name" => $db->escape_string($mybb->input['name']),
"title" => $db->escape_string($mybb->input['title']),

Zeile 961Zeile 970

// Page header only if not AJAX
if(!isset($mybb->input['ajax_search']))


// Page header only if not AJAX
if(!isset($mybb->input['ajax_search']))

		{

		{

			$page->add_breadcrumb_item($lang->settings_search);
$page->output_header($lang->board_settings." - {$lang->settings_search}");
}

			$page->add_breadcrumb_item($lang->settings_search);
$page->output_header($lang->board_settings." - {$lang->settings_search}");
}

Zeile 977Zeile 986
		$query = $db->simple_select("settinggroups", "*", "gid = '".intval($mybb->input['gid'])."'");
$groupinfo = $db->fetch_array($query);
$cache_groups[$groupinfo['gid']] = $groupinfo;

		$query = $db->simple_select("settinggroups", "*", "gid = '".intval($mybb->input['gid'])."'");
$groupinfo = $db->fetch_array($query);
$cache_groups[$groupinfo['gid']] = $groupinfo;


if(!$db->num_rows($query))
{
$page->output_error($lang->error_invalid_gid2);
}

// Cache settings
$query = $db->simple_select("settings", "*", "gid='".intval($mybb->input['gid'])."'", array('order_by' => 'disporder'));
while($setting = $db->fetch_array($query))
{
$cache_settings[$setting['gid']][$setting['sid']] = $setting;


if(!$db->num_rows($query))
{
$page->output_error($lang->error_invalid_gid2);








		}


		}


		if(!$db->num_rows($query))
{
flash_message($lang->error_no_settings_found, 'error');
admin_redirect("index.php?module=config-settings");
}

$group_lang_var = "setting_group_{$groupinfo['name']}";
if(isset($lang->$group_lang_var))
{








		// Cache settings
$query = $db->simple_select("settings", "*", "gid='".intval($mybb->input['gid'])."'", array('order_by' => 'disporder'));
while($setting = $db->fetch_array($query))
{
$cache_settings[$setting['gid']][$setting['sid']] = $setting;
}

if(!$db->num_rows($query))
{
flash_message($lang->error_no_settings_found, 'error');
admin_redirect("index.php?module=config-settings");
}

$group_lang_var = "setting_group_{$groupinfo['name']}";
if(isset($lang->$group_lang_var))
{

			$groupinfo['title'] = $lang->$group_lang_var;
}

			$groupinfo['title'] = $lang->$group_lang_var;
}





		// Page header
$page->add_breadcrumb_item($groupinfo['title']);
$page->output_header($lang->board_settings." - {$groupinfo['title']}");

		// Page header
$page->add_breadcrumb_item($groupinfo['title']);
$page->output_header($lang->board_settings." - {$groupinfo['title']}");





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

echo $form->generate_hidden_field("gid", $groupinfo['gid']);

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

echo $form->generate_hidden_field("gid", $groupinfo['gid']);

	}

	}

	else
{
// All settings list

	else
{
// All settings list

Zeile 1030Zeile 1039
		while($setting = $db->fetch_array($query))
{
$cache_settings[$setting['gid']][$setting['sid']] = $setting;

		while($setting = $db->fetch_array($query))
{
$cache_settings[$setting['gid']][$setting['sid']] = $setting;

		}


		}


		// Page header
$page->add_breadcrumb_item($lang->show_all_settings);
$page->output_header($lang->board_settings." - {$lang->show_all_settings}");

		// Page header
$page->add_breadcrumb_item($lang->show_all_settings);
$page->output_header($lang->board_settings." - {$lang->show_all_settings}");

Zeile 1052Zeile 1061
		$form_container = new FormContainer($groupinfo['title']);

if(empty($cache_settings[$groupinfo['gid']]))

		$form_container = new FormContainer($groupinfo['title']);

if(empty($cache_settings[$groupinfo['gid']]))

        {
$form_container->output_cell($lang->error_no_settings_found);
$form_container->construct_row();

$form_container->end();
echo '<br />';

		{
$form_container->output_cell($lang->error_no_settings_found);
$form_container->construct_row();








            continue;
}




			$form_container->end();
echo '<br />';

continue;
}


foreach($cache_settings[$groupinfo['gid']] as $setting)
{


foreach($cache_settings[$groupinfo['gid']] as $setting)
{

Zeile 1340Zeile 1349
			this.spinner = new ActivityIndicator("body", {image: "../images/spinner_big.gif"});
pars = "module=config-settings&action=change&ajax_search=1&search="+encodeURIComponent(this.search_box.value);
new Ajax.Request("index.php", {

			this.spinner = new ActivityIndicator("body", {image: "../images/spinner_big.gif"});
pars = "module=config-settings&action=change&ajax_search=1&search="+encodeURIComponent(this.search_box.value);
new Ajax.Request("index.php", {

			    method: "get",

				method: "get",

				parameters: pars,

				parameters: pars,

			    onComplete: this.onComplete.bind(this)

				onComplete: this.onComplete.bind(this)

			});
}
},

			});
}
},