Vergleich admin/modules/config/help_documents.php - 1.8.0 - 1.8.33

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

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

					"usetranslation" => (int)$mybb->input['usetranslation'],
"enabled" => (int)$mybb->input['enabled'],
"disporder" => (int)$mybb->input['disporder']

					"usetranslation" => $mybb->get_input('usetranslation', MyBB::INPUT_INT),
"enabled" => $mybb->get_input('enabled', MyBB::INPUT_INT),
"disporder" => $mybb->get_input('disporder', MyBB::INPUT_INT)

				);

$sid = $db->insert_query("helpsections", $sql_array);

				);

$sid = $db->insert_query("helpsections", $sql_array);

Zeile 110Zeile 110
		echo $form->generate_hidden_field("usetranslation", $mybb->input['usetranslation']);

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

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

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

		$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');
$form_container->output_row($lang->display_order, "", $form->generate_text_box('disporder', $mybb->input['disporder'], array('id' => 'disporder')), 'disporder');
$form_container->output_row($lang->enabled." <em>*</em>", "", $form->generate_yes_no_radio('enabled', $mybb->input['enabled']));

		$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('name', $mybb->get_input('name'), array('id' => 'name')), 'name');
$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $mybb->get_input('description'), array('id' => 'description')), 'description');
$form_container->output_row($lang->display_order, "", $form->generate_numeric_field('disporder', $mybb->get_input('disporder'), array('id' => 'disporder', 'min' => 0)), 'disporder');
$form_container->output_row($lang->enabled." <em>*</em>", "", $form->generate_yes_no_radio('enabled', $mybb->get_input('enabled')));

		$form_container->end();

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

		$form_container->end();

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

Zeile 121Zeile 121
		$form->output_submit_wrapper($buttons);
$form->end();
}

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





	// Add page
else
{

	// Add page
else
{

Zeile 133Zeile 133
			if(empty($mybb->input['sid']))
{
$errors[] = $lang->error_missing_sid;

			if(empty($mybb->input['sid']))
{
$errors[] = $lang->error_missing_sid;

			}

if(empty($mybb->input['name']))
{
$errors[] = $lang->error_document_missing_name;
}

if(empty($mybb->input['description']))
{
$errors[] = $lang->error_document_missing_description;
}

if(empty($mybb->input['document']))
{
$errors[] = $lang->error_document_missing_document;
}


			}

if(empty($mybb->input['name']))
{
$errors[] = $lang->error_document_missing_name;
}

if(empty($mybb->input['description']))
{
$errors[] = $lang->error_document_missing_description;
}

if(empty($mybb->input['document']))
{
$errors[] = $lang->error_document_missing_document;
}


			if(!isset($mybb->input['enabled']))
{
$errors[] = $lang->error_document_missing_enabled;

			if(!isset($mybb->input['enabled']))
{
$errors[] = $lang->error_document_missing_enabled;

			}


			}


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

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

			}


			}


			if(!is_array($errors))
{
$sql_array = array(

			if(!is_array($errors))
{
$sql_array = array(

					"sid" => $mybb->get_input('sid', 1),

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

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

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

					"usetranslation" => (int)$mybb->input['usetranslation'],
"enabled" => (int)$mybb->input['enabled'],
"disporder" => (int)$mybb->input['disporder']

					"usetranslation" => $mybb->get_input('usetranslation', MyBB::INPUT_INT),
"enabled" => $mybb->get_input('enabled', MyBB::INPUT_INT),
"disporder" => $mybb->get_input('disporder', MyBB::INPUT_INT)

				);

$hid = $db->insert_query("helpdocs", $sql_array);

				);

$hid = $db->insert_query("helpdocs", $sql_array);

Zeile 190Zeile 190
		$sub_tabs['manage_help_documents'] = array(
'title' => $lang->manage_help_documents,
'link' => "index.php?module=config-help_documents"

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

		);


		);


		$sub_tabs['add_help_document'] = array(
'title' => $lang->add_new_document,
'link' => "index.php?module=config-help_documents&amp;action=add&amp;type=document",
'description' => $lang->add_new_document_desc

		$sub_tabs['add_help_document'] = array(
'title' => $lang->add_new_document,
'link' => "index.php?module=config-help_documents&amp;action=add&amp;type=document",
'description' => $lang->add_new_document_desc

		);

		);


$sub_tabs['add_help_section'] = array(
'title' => $lang->add_new_section,


$sub_tabs['add_help_section'] = array(
'title' => $lang->add_new_section,

Zeile 206Zeile 206
		$page->output_nav_tabs($sub_tabs, 'add_help_document');

if($errors)

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

if($errors)

		{

		{

			$page->output_inline_error($errors);
}
else

			$page->output_inline_error($errors);
}
else

		{

		{

			// Select the largest existing display order
$query = $db->simple_select("helpdocs", "MAX(disporder) as maxdisp");
$mybb->input['disporder'] = $db->fetch_field($query, "maxdisp")+1;

			// Select the largest existing display order
$query = $db->simple_select("helpdocs", "MAX(disporder) as maxdisp");
$mybb->input['disporder'] = $db->fetch_field($query, "maxdisp")+1;

Zeile 220Zeile 220

$form = new Form("index.php?module=config-help_documents&amp;action=add&amp;type=document", "post", "add");
echo $form->generate_hidden_field("usetranslation", $mybb->input['usetranslation']);


$form = new Form("index.php?module=config-help_documents&amp;action=add&amp;type=document", "post", "add");
echo $form->generate_hidden_field("usetranslation", $mybb->input['usetranslation']);





		$form_container = new FormContainer($lang->add_new_document);
$query = $db->simple_select("helpsections", "sid, name");


		$form_container = new FormContainer($lang->add_new_document);
$query = $db->simple_select("helpsections", "sid, name");


Zeile 228Zeile 228
		while($section = $db->fetch_array($query))
{
$sections[$section['sid']] = $section['name'];

		while($section = $db->fetch_array($query))
{
$sections[$section['sid']] = $section['name'];

		}
$form_container->output_row($lang->section." <em>*</em>", "", $form->generate_select_box("sid", $sections, $mybb->input['sid'], array('id' => 'sid')), 'sid');
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');
$form_container->output_row($lang->document." <em>*</em>", "", $form->generate_text_area('document', $mybb->input['document'], array('id' => 'document')), 'document');
$form_container->output_row($lang->display_order, "", $form->generate_text_box('disporder', $mybb->input['disporder'], array('id' => 'disporder')), 'disporder');
$form_container->output_row($lang->enabled." <em>*</em>", "", $form->generate_yes_no_radio('enabled', $mybb->input['enabled']));

		}
$form_container->output_row($lang->section." <em>*</em>", "", $form->generate_select_box("sid", $sections, $mybb->get_input('sid'), array('id' => 'sid')), 'sid');
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('name', $mybb->get_input('name'), array('id' => 'name')), 'name');
$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $mybb->get_input('description'), array('id' => 'description')), 'description');
$form_container->output_row($lang->document." <em>*</em>", "", $form->generate_text_area('document', $mybb->get_input('document'), array('id' => 'document')), 'document');
$form_container->output_row($lang->display_order, "", $form->generate_numeric_field('disporder', $mybb->get_input('disporder'), array('id' => 'disporder', 'min' => 0)), 'disporder');
$form_container->output_row($lang->enabled." <em>*</em>", "", $form->generate_yes_no_radio('enabled', $mybb->get_input('enabled')));

		$form_container->end();

		$form_container->end();





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

$form->output_submit_wrapper($buttons);

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

$form->output_submit_wrapper($buttons);

Zeile 250Zeile 250
if($mybb->input['action'] == "edit")
{
$plugins->run_hooks("admin_config_help_documents_edit");

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





	// Edit a section

	// Edit a section

	if($mybb->input['sid'] && !$mybb->input['hid'])

	if(isset($mybb->input['sid']) && !$mybb->get_input('hid'))

	{

	{

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

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

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

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

 

if(!$section['sid'])
{
flash_message($lang->error_missing_section_id, 'error');
admin_redirect("index.php?module=config-help_documents");
}


$plugins->run_hooks("admin_config_help_documents_edit_section");

// Do edit?
if($mybb->request_method == "post")
{


$plugins->run_hooks("admin_config_help_documents_edit_section");

// Do edit?
if($mybb->request_method == "post")
{

			$sid = $mybb->get_input('sid', 1);


			$sid = $mybb->get_input('sid', MyBB::INPUT_INT);


			if(empty($sid))
{
$errors[] = $lang->error_invalid_sid;

			if(empty($sid))
{
$errors[] = $lang->error_invalid_sid;

Zeile 272Zeile 278
			if(empty($mybb->input['name']))
{
$errors[] = $lang->error_section_missing_name;

			if(empty($mybb->input['name']))
{
$errors[] = $lang->error_section_missing_name;

			}

			}


if(empty($mybb->input['description']))
{


if(empty($mybb->input['description']))
{

Zeile 285Zeile 291
			}

if($mybb->input['enabled'] != 1)

			}

if($mybb->input['enabled'] != 1)

			{

			{

				$mybb->input['enabled'] = 0;
}


				$mybb->input['enabled'] = 0;
}


Zeile 294Zeile 300
				$sql_array = array(
"name" => $db->escape_string($mybb->input['name']),
"description" => $db->escape_string($mybb->input['description']),

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

					"usetranslation" => (int)$mybb->input['usetranslation'],
"enabled" => (int)$mybb->input['enabled'],
"disporder" => (int)$mybb->input['disporder']

					"usetranslation" => $mybb->get_input('usetranslation', MyBB::INPUT_INT),
"enabled" => $mybb->get_input('enabled', MyBB::INPUT_INT),
"disporder" => $mybb->get_input('disporder', MyBB::INPUT_INT)

				);

				);





				$plugins->run_hooks("admin_config_help_documents_edit_section_commit");

				$plugins->run_hooks("admin_config_help_documents_edit_section_commit");





				$db->update_query("helpsections", $sql_array, "sid = '{$sid}'");

				$db->update_query("helpsections", $sql_array, "sid = '{$sid}'");





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


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


Zeile 312Zeile 318
		}

$page->add_breadcrumb_item($lang->edit_section);

		}

$page->add_breadcrumb_item($lang->edit_section);

		$page->output_header($lang->help_documents." - ".$lang->edit_section);


		$page->output_header($lang->help_documents." - ".$lang->edit_section);



$sub_tabs['edit_help_section'] = array(
'title' => $lang->edit_section,


$sub_tabs['edit_help_section'] = array(
'title' => $lang->edit_section,

			'link'	=> "index.php?module=config-help_documents&amp;action=edit&amp;sid=".$mybb->get_input('sid', 1),

			'link'	=> "index.php?module=config-help_documents&amp;action=edit&amp;sid=".$section['sid'],

			'description' => $lang->edit_section_desc
);


			'description' => $lang->edit_section_desc
);


Zeile 339Zeile 345

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



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


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

		echo $form->generate_hidden_field("sid", $section['sid']);

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


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


		$form_container = new FormContainer($lang->edit_section." ({$lang->id} ".$mybb->get_input('sid', 1).")");

		$form_container = new FormContainer($lang->edit_section." ({$lang->id} ".$section['sid'].")");

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

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

		$form_container->output_row($lang->display_order, "", $form->generate_text_box('disporder', $mybb->input['disporder'], array('id' => 'disporder')), 'disporder');

		$form_container->output_row($lang->display_order, "", $form->generate_numeric_field('disporder', $mybb->input['disporder'], array('id' => 'disporder', 'min' => 0)), 'disporder');

		$form_container->output_row($lang->enabled." <em>*</em>", "", $form->generate_yes_no_radio('enabled', $mybb->input['enabled']));
$form_container->end();


		$form_container->output_row($lang->enabled." <em>*</em>", "", $form->generate_yes_no_radio('enabled', $mybb->input['enabled']));
$form_container->end();


Zeile 358Zeile 364
	// Edit document
else
{

	// Edit document
else
{

 
		$query = $db->simple_select("helpdocs", "*", "hid = '".$mybb->get_input('hid', MyBB::INPUT_INT)."'");
$doc = $db->fetch_array($query);

// Invalid document?
if(!$doc['hid'])
{
flash_message($lang->error_missing_hid, 'error');
admin_redirect("index.php?module=config-help_documents");
}


		$plugins->run_hooks("admin_config_help_documents_edit_page");

		$plugins->run_hooks("admin_config_help_documents_edit_page");





		// Do edit?

		// Do edit?

 
		$hid = $mybb->get_input('hid', MyBB::INPUT_INT);


		if($mybb->request_method == "post")
{

		if($mybb->request_method == "post")
{

			$hid = (int)$mybb->input['hid'];


 
			if(empty($hid))
{
$errors[] = $lang->error_invalid_sid;

			if(empty($hid))
{
$errors[] = $lang->error_invalid_sid;

Zeile 376Zeile 392
			}

if(empty($mybb->input['description']))

			}

if(empty($mybb->input['description']))

			{

			{

				$errors[] = $lang->error_document_missing_description;
}

if(empty($mybb->input['document']))

				$errors[] = $lang->error_document_missing_description;
}

if(empty($mybb->input['document']))

			{

			{

				$errors[] = $lang->error_document_missing_document;
}


				$errors[] = $lang->error_document_missing_document;
}


Zeile 393Zeile 409
			if($mybb->input['enabled'] != 1)
{
$mybb->input['enabled'] = 0;

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

			}


			}


			if(!is_array($errors))
{
$sql_array = array(

			if(!is_array($errors))
{
$sql_array = array(

					"sid" => $mybb->get_input('sid', 1),

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

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

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

					"usetranslation" => (int)$mybb->input['usetranslation'],
"enabled" => (int)$mybb->input['enabled'],
"disporder" => (int)$mybb->input['disporder']

					"usetranslation" => $mybb->get_input('usetranslation', MyBB::INPUT_INT),
"enabled" => $mybb->get_input('enabled', MyBB::INPUT_INT),
"disporder" => $mybb->get_input('disporder', MyBB::INPUT_INT)

				);

$plugins->run_hooks("admin_config_help_documents_edit_page_commit");

				);

$plugins->run_hooks("admin_config_help_documents_edit_page_commit");





				$db->update_query("helpdocs", $sql_array, "hid = '{$hid}'");

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

				$db->update_query("helpdocs", $sql_array, "hid = '{$hid}'");

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





				flash_message($lang->success_help_document_updated, 'success');
admin_redirect('index.php?module=config-help_documents');
}

				flash_message($lang->success_help_document_updated, 'success');
admin_redirect('index.php?module=config-help_documents');
}

		}


		}


		$page->add_breadcrumb_item($lang->edit_document);
$page->output_header($lang->help_documents." - ".$lang->edit_document);

		$page->add_breadcrumb_item($lang->edit_document);
$page->output_header($lang->help_documents." - ".$lang->edit_document);







		$sub_tabs['edit_help_document'] = array(
'title' => $lang->edit_document,

		$sub_tabs['edit_help_document'] = array(
'title' => $lang->edit_document,

			'link'	=> "index.php?module=config-help_documents&amp;action=edit&amp;hid=".(int)$mybb->input['hid'],

			'link'	=> "index.php?module=config-help_documents&amp;action=edit&amp;hid=".$doc['hid'],

			'description' => $lang->edit_document_desc
);

			'description' => $lang->edit_document_desc
);





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

if($errors)

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

if($errors)

Zeile 437Zeile 453
		}
else
{

		}
else
{

			$query = $db->simple_select("helpdocs", "*", "hid = '".(int)$mybb->input['hid']."'");
$doc = $db->fetch_array($query);

 
			$mybb->input['hid'] = $doc['hid'];
$mybb->input['sid'] = $doc['sid'];
$mybb->input['name'] = $doc['name'];

			$mybb->input['hid'] = $doc['hid'];
$mybb->input['sid'] = $doc['sid'];
$mybb->input['name'] = $doc['name'];

Zeile 451Zeile 465

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



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


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

		echo $form->generate_hidden_field("hid", $doc['hid']);

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


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


		$form_container = new FormContainer($lang->edit_document." ({$lang->id} ".(int)$mybb->input['hid'].")");

		$form_container = new FormContainer($lang->edit_document." ({$lang->id} ".$doc['hid'].")");


$sections = array();
$query = $db->simple_select("helpsections", "sid, name");


$sections = array();
$query = $db->simple_select("helpsections", "sid, name");

Zeile 466Zeile 480
		$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');
$form_container->output_row($lang->document." <em>*</em>", "", $form->generate_text_area('document', $mybb->input['document'], array('id' => 'document')), 'document');

		$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');
$form_container->output_row($lang->document." <em>*</em>", "", $form->generate_text_area('document', $mybb->input['document'], array('id' => 'document')), 'document');

		$form_container->output_row($lang->display_order, "", $form->generate_text_box('disporder', $mybb->input['disporder'], array('id' => 'disporder')), 'disporder');

		$form_container->output_row($lang->display_order, "", $form->generate_numeric_field('disporder', $mybb->input['disporder'], array('id' => 'disporder', 'min' => 0)), 'disporder');

		$form_container->output_row($lang->enabled." <em>*</em>", "", $form->generate_yes_no_radio('enabled', $mybb->input['enabled']));
$form_container->end();


		$form_container->output_row($lang->enabled." <em>*</em>", "", $form->generate_yes_no_radio('enabled', $mybb->input['enabled']));
$form_container->end();


Zeile 483Zeile 497
if($mybb->input['action'] == "delete")
{
// User clicked no

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

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

	if($mybb->get_input('no'))

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

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

Zeile 496Zeile 510
		// Delete section
if(isset($mybb->input['sid']))
{

		// Delete section
if(isset($mybb->input['sid']))
{

			$sid = $mybb->get_input('sid', 1);

			$sid = $mybb->get_input('sid', MyBB::INPUT_INT);


$query = $db->simple_select("helpsections", "*", "sid='{$sid}'");
$section = $db->fetch_array($query);


$query = $db->simple_select("helpsections", "*", "sid='{$sid}'");
$section = $db->fetch_array($query);

Zeile 509Zeile 523
			}

// Delete section and its documents

			}

// Delete section and its documents

			$db->delete_query("helpsections", "sid = '{$sid}'", 1);
$db->delete_query("helpdocs", "sid = '{$sid}'");

			$db->delete_query("helpsections", "sid = '{$section['sid']}'", 1);
$db->delete_query("helpdocs", "sid = '{$section['sid']}'");


$plugins->run_hooks("admin_config_help_documents_delete_section_commit");



$plugins->run_hooks("admin_config_help_documents_delete_section_commit");


Zeile 524Zeile 538
		// Delete document
else
{

		// Delete document
else
{

			$hid = (int)$mybb->input['hid'];

			$hid = $mybb->get_input('hid', MyBB::INPUT_INT);


$query = $db->simple_select("helpdocs", "*", "hid='{$hid}'");
$doc = $db->fetch_array($query);


$query = $db->simple_select("helpdocs", "*", "hid='{$hid}'");
$doc = $db->fetch_array($query);

Zeile 536Zeile 550
				admin_redirect("index.php?module=config-help_documents");
}


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


			$db->delete_query("helpdocs", "hid = '{$hid}'", 1);

			$db->delete_query("helpdocs", "hid = '{$doc['hid']}'", 1);


$plugins->run_hooks("admin_config_help_documents_delete_page_commit");



$plugins->run_hooks("admin_config_help_documents_delete_page_commit");


Zeile 553Zeile 567
		// Section
if(isset($mybb->input['sid']))
{

		// Section
if(isset($mybb->input['sid']))
{

			$sid = $mybb->get_input('sid', 1);

			$sid = $mybb->get_input('sid', MyBB::INPUT_INT);

			$page->output_confirm_action("index.php?module=config-help_documents&amp;action=delete&amp;sid={$sid}", $lang->confirm_section_deletion);
}
// Document
else
{

			$page->output_confirm_action("index.php?module=config-help_documents&amp;action=delete&amp;sid={$sid}", $lang->confirm_section_deletion);
}
// Document
else
{

			$hid = (int)$mybb->input['hid'];

			$hid = $mybb->get_input('hid', MyBB::INPUT_INT);

			$page->output_confirm_action("index.php?module=config-help_documents&amp;action=delete&amp;hid={$hid}", $lang->confirm_document_deletion);
}
}

			$page->output_confirm_action("index.php?module=config-help_documents&amp;action=delete&amp;hid={$hid}", $lang->confirm_document_deletion);
}
}