Vergleich admin/modules/config/help_documents.php - 1.6.9 - 1.6.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 57Zeile 57
				$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" => 0,

					"usetranslation" => intval($mybb->input['usetranslation']),

					"enabled" => intval($mybb->input['enabled']),
"disporder" => intval($mybb->input['disporder'])
);

					"enabled" => intval($mybb->input['enabled']),
"disporder" => intval($mybb->input['disporder'])
);

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

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

		}


		}


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


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


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

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

		);

		);

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

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

Zeile 96Zeile 96
		$page->output_nav_tabs($sub_tabs, 'add_help_section');

if($errors)

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

if($errors)

		{

		{

			$page->output_inline_error($errors);

			$page->output_inline_error($errors);

		}

		}

		else
{
$query = $db->simple_select("helpsections", "MAX(disporder) as maxdisp");

		else
{
$query = $db->simple_select("helpsections", "MAX(disporder) as maxdisp");

			$mybb->input['disporder'] = $db->fetch_field($query, "maxdisp")+1;
$mybb->input['enabled'] = 1;
$mybb->input['translation'] = 0;
}


			$mybb->input['disporder'] = $db->fetch_field($query, "maxdisp")+1;
$mybb->input['enabled'] = 1;
$mybb->input['usetranslation'] = 1;
}


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

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

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

Zeile 116Zeile 118
		$form_container->end();

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

		$form_container->end();

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

	



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

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

Zeile 132Zeile 134
			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(!isset($mybb->input['enabled']))
{
$errors[] = $lang->error_document_missing_enabled;
}

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

			}

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($mybb->input['enabled'] != 1)

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

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

Zeile 166Zeile 168
					"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" => 0,

					"usetranslation" => intval($mybb->input['usetranslation']),

					"enabled" => intval($mybb->input['enabled']),
"disporder" => intval($mybb->input['disporder'])
);

					"enabled" => intval($mybb->input['enabled']),
"disporder" => intval($mybb->input['disporder'])
);

Zeile 185Zeile 187
	
$page->add_breadcrumb_item($lang->add_new_document);
$page->output_header($lang->help_documents." - ".$lang->add_new_document);

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

		

		

		$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"

Zeile 200Zeile 202
		$sub_tabs['add_help_section'] = array(
'title' => $lang->add_new_section,
'link' => "index.php?module=config-help_documents&amp;action=add&amp;type=section"

		$sub_tabs['add_help_section'] = array(
'title' => $lang->add_new_section,
'link' => "index.php?module=config-help_documents&amp;action=add&amp;type=section"

		);

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


		);

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


		if($errors)

		if($errors)

		{

		{

			$page->output_inline_error($errors);

			$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;
$mybb->input['enabled'] = 1;

		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;
$mybb->input['enabled'] = 1;

			$mybb->input['translation'] = 0;

			$mybb->input['translation'] = 1;

		}

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

		}

$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");
while($section = $db->fetch_array($query))

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

Zeile 300Zeile 304

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


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

				

				

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

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

Zeile 348Zeile 352
	
$form->output_submit_wrapper($buttons);
$form->end();

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

	}

	}

	
// Edit document
else

	
// Edit document
else

Zeile 397Zeile 401
					"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" => 0,

					"usetranslation" => intval($mybb->input['usetranslation']),

					"enabled" => intval($mybb->input['enabled']),
"disporder" => intval($mybb->input['disporder'])
);

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

					"enabled" => intval($mybb->input['enabled']),
"disporder" => intval($mybb->input['disporder'])
);

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

				

				

				$plugins->run_hooks("admin_config_help_documents_edit_page_commit");

// Log admin action

				$plugins->run_hooks("admin_config_help_documents_edit_page_commit");

// Log admin action

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

if($errors)

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

if($errors)

		{

		{

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

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

Zeile 441Zeile 445
			$mybb->input['document'] = $doc['document'];
$mybb->input['disporder'] = $doc['disporder'];
$mybb->input['enabled'] = $doc['enabled'];

			$mybb->input['document'] = $doc['document'];
$mybb->input['disporder'] = $doc['disporder'];
$mybb->input['enabled'] = $doc['enabled'];

 
			$mybb->input['usetranslation'] = $doc['usetranslation'];

		}

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

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

		}

$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("usetranslation", $mybb->input['usetranslation']);

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


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