Vergleich admin/modules/config/spiders.php - 1.8.0 - 1.8.9

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 38Zeile 38
		{
$new_spider = array(
"name" => $db->escape_string($mybb->input['name']),

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

				"theme" => (int)$mybb->input['theme'],

				"theme" => $mybb->get_input('theme', MyBB::INPUT_INT),

				"language" => $db->escape_string($mybb->input['language']),

				"language" => $db->escape_string($mybb->input['language']),

				"usergroup" => (int)$mybb->input['usergroup'],

				"usergroup" => $mybb->get_input('usergroup', MyBB::INPUT_INT),

				"useragent" => $db->escape_string($mybb->input['useragent']),
"lastvisit" => 0
);
$sid = $db->insert_query("spiders", $new_spider);

				"useragent" => $db->escape_string($mybb->input['useragent']),
"lastvisit" => 0
);
$sid = $db->insert_query("spiders", $new_spider);


$cache->update_spiders();

 

$plugins->run_hooks("admin_config_spiders_add_commit");


$plugins->run_hooks("admin_config_spiders_add_commit");

 

$cache->update_spiders();


// Log admin action
log_admin_action($sid, $mybb->input['name']);


// Log admin action
log_admin_action($sid, $mybb->input['name']);

Zeile 88Zeile 88
	$languages = array_merge($languages, $lang->get_languages());
$form_container->output_row($lang->language_str, $lang->language_desc, $form->generate_select_box("language", $languages, $mybb->input['language'], array("id" => "language")), 'language');


	$languages = array_merge($languages, $lang->get_languages());
$form_container->output_row($lang->language_str, $lang->language_desc, $form->generate_select_box("language", $languages, $mybb->input['language'], array("id" => "language")), 'language');


	$form_container->output_row($lang->theme, $lang->theme_desc, build_theme_select("theme", $mybb->input['theme'], 0, "", true));

	$form_container->output_row($lang->theme, $lang->theme_desc, build_theme_select("theme", $mybb->input['theme'], 0, "", true, false, true));


$query = $db->simple_select("usergroups", "*", "", array("order_by" => "title", "order_dir" => "asc"));



$query = $db->simple_select("usergroups", "*", "", array("order_by" => "title", "order_dir" => "asc"));


Zeile 100Zeile 100
	if(!$mybb->input['usergroup'])
{
$mybb->input['usergroup'] = 1;

	if(!$mybb->input['usergroup'])
{
$mybb->input['usergroup'] = 1;

	}

	}

	$form_container->output_row($lang->user_group, $lang->user_group_desc, $form->generate_select_box("usergroup", $usergroups, $mybb->input['usergroup'], array("id" => "usergroup")), 'usergroup');

	$form_container->output_row($lang->user_group, $lang->user_group_desc, $form->generate_select_box("usergroup", $usergroups, $mybb->input['usergroup'], array("id" => "usergroup")), 'usergroup');







	$form_container->end();
$buttons[] = $form->generate_submit_button($lang->save_bot);
$form->output_submit_wrapper($buttons);
$form->end();

	$form_container->end();
$buttons[] = $form->generate_submit_button($lang->save_bot);
$form->output_submit_wrapper($buttons);
$form->end();





	$page->output_footer();
}

	$page->output_footer();
}





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

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

{
$query = $db->simple_select("spiders", "*", "sid='".$mybb->get_input('sid', 1)."'");
$spider = $db->fetch_array($query);

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

{
$query = $db->simple_select("spiders", "*", "sid='".$mybb->get_input('sid', MyBB::INPUT_INT)."'");
$spider = $db->fetch_array($query);

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

	{
flash_message($lang->error_invalid_bot, 'error');

	{
flash_message($lang->error_invalid_bot, 'error');

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


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


	// User clicked no
if($mybb->input['no'])
{

	// User clicked no
if($mybb->input['no'])
{

Zeile 136Zeile 136
	{
// Delete the spider
$db->delete_query("spiders", "sid='{$spider['sid']}'");

	{
// Delete the spider
$db->delete_query("spiders", "sid='{$spider['sid']}'");


$cache->update_spiders();






		$plugins->run_hooks("admin_config_spiders_delete_commit");

		$plugins->run_hooks("admin_config_spiders_delete_commit");

 

$cache->update_spiders();


// Log admin action
log_admin_action($spider['sid'], $spider['name']);


// Log admin action
log_admin_action($spider['sid'], $spider['name']);

Zeile 155Zeile 155

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


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

	$query = $db->simple_select("spiders", "*", "sid='".$mybb->get_input('sid', 1)."'");

	$query = $db->simple_select("spiders", "*", "sid='".$mybb->get_input('sid', MyBB::INPUT_INT)."'");

	$spider = $db->fetch_array($query);

// Does the spider not exist?

	$spider = $db->fetch_array($query);

// Does the spider not exist?

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

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

		}


		}


		if(!trim($mybb->input['useragent']))
{
$errors[] = $lang->error_missing_agent;
}

		if(!trim($mybb->input['useragent']))
{
$errors[] = $lang->error_missing_agent;
}





		if(!$errors)
{
$updated_spider = array(
"name" => $db->escape_string($mybb->input['name']),

		if(!$errors)
{
$updated_spider = array(
"name" => $db->escape_string($mybb->input['name']),

				"theme" => (int)$mybb->input['theme'],

				"theme" => $mybb->get_input('theme', MyBB::INPUT_INT),

				"language" => $db->escape_string($mybb->input['language']),

				"language" => $db->escape_string($mybb->input['language']),

				"usergroup" => (int)$mybb->input['usergroup'],

				"usergroup" => $mybb->get_input('usergroup', MyBB::INPUT_INT),

				"useragent" => $db->escape_string($mybb->input['useragent'])
);

				"useragent" => $db->escape_string($mybb->input['useragent'])
);

 

$plugins->run_hooks("admin_config_spiders_edit_commit");


			$db->update_query("spiders", $updated_spider, "sid='{$spider['sid']}'");

$cache->update_spiders();

			$db->update_query("spiders", $updated_spider, "sid='{$spider['sid']}'");

$cache->update_spiders();


$plugins->run_hooks("admin_config_spiders_edit_commit");

 

// Log admin action
log_admin_action($spider['sid'], $mybb->input['name']);


// Log admin action
log_admin_action($spider['sid'], $mybb->input['name']);

Zeile 233Zeile 234
	$languages = array_merge($languages, $lang->get_languages());
$form_container->output_row($lang->language_str, $lang->language_desc, $form->generate_select_box("language", $languages, $spider_data['language'], array("id" => "language")), 'language');


	$languages = array_merge($languages, $lang->get_languages());
$form_container->output_row($lang->language_str, $lang->language_desc, $form->generate_select_box("language", $languages, $spider_data['language'], array("id" => "language")), 'language');


	$form_container->output_row($lang->theme, $lang->theme_desc, build_theme_select("theme", $spider_data['theme'], 0, "", true));

	$form_container->output_row($lang->theme, $lang->theme_desc, build_theme_select("theme", $spider_data['theme'], 0, "", true, false, true));


$query = $db->simple_select("usergroups", "*", "", array("order_by" => "title", "order_dir" => "asc"));
while($usergroup = $db->fetch_array($query))


$query = $db->simple_select("usergroups", "*", "", array("order_by" => "title", "order_dir" => "asc"));
while($usergroup = $db->fetch_array($query))