Vergleich admin/modules/forum/management.php - 1.8.22 - 1.8.24

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

if(!$errors)
{


if(!$errors)
{

 
				if($mybb->input['pid'] < 0)
{
$mybb->input['pid'] = 0;
}

				$new_forum = $from_forum;
unset($new_forum['fid'], $new_forum['threads'], $new_forum['posts'], $new_forum['lastpost'], $new_forum['lastposter'], $new_forum['lastposteruid'], $new_forum['lastposttid'], $new_forum['lastpostsubject'], $new_forum['unapprovedthreads'], $new_forum['unapprovedposts']);
$new_forum['name'] = $db->escape_string($mybb->input['title']);

				$new_forum = $from_forum;
unset($new_forum['fid'], $new_forum['threads'], $new_forum['posts'], $new_forum['lastpost'], $new_forum['lastposter'], $new_forum['lastposteruid'], $new_forum['lastposttid'], $new_forum['lastpostsubject'], $new_forum['unapprovedthreads'], $new_forum['unapprovedposts']);
$new_forum['name'] = $db->escape_string($mybb->input['title']);

Zeile 103Zeile 107
				$new_forum['rulestitle'] = $db->escape_string($new_forum['rulestitle']);
$new_forum['rules'] = $db->escape_string($new_forum['rules']);
$new_forum['parentlist'] = '';

				$new_forum['rulestitle'] = $db->escape_string($new_forum['rulestitle']);
$new_forum['rules'] = $db->escape_string($new_forum['rules']);
$new_forum['parentlist'] = '';





				$to = $db->insert_query("forums", $new_forum);

// Generate parent list

				$to = $db->insert_query("forums", $new_forum);

// Generate parent list

Zeile 115Zeile 119
			}
}
elseif($mybb->input['copyforumsettings'] == 1)

			}
}
elseif($mybb->input['copyforumsettings'] == 1)

		{

		{

			// Copy settings to existing forum
$query = $db->simple_select("forums", '*', "fid='{$to}'");
$to_forum = $db->fetch_array($query);

			// Copy settings to existing forum
$query = $db->simple_select("forums", '*', "fid='{$to}'");
$to_forum = $db->fetch_array($query);

Zeile 142Zeile 146
		if(!$errors)
{
// Copy permissions

		if(!$errors)
{
// Copy permissions

			if(is_array($mybb->input['copygroups']) && count($mybb->input['copygroups'] > 0))

			if(is_array($mybb->input['copygroups']) && count($mybb->input['copygroups']) > 0)

			{
foreach($mybb->input['copygroups'] as $gid)
{

			{
foreach($mybb->input['copygroups'] as $gid)
{

Zeile 176Zeile 180
			flash_message($lang->success_forum_copied, 'success');
admin_redirect("index.php?module=forum-management&action=edit&fid={$to}");
}

			flash_message($lang->success_forum_copied, 'success');
admin_redirect("index.php?module=forum-management&action=edit&fid={$to}");
}

	}

	}


$page->add_breadcrumb_item($lang->copy_forum);
$page->output_header($lang->copy_forum);
$page->output_nav_tabs($sub_tabs, 'copy_forum');


$page->add_breadcrumb_item($lang->copy_forum);
$page->output_header($lang->copy_forum);
$page->output_nav_tabs($sub_tabs, 'copy_forum');





	$form = new Form("index.php?module=forum-management&amp;action=copy", "post");

if($errors)

	$form = new Form("index.php?module=forum-management&amp;action=copy", "post");

if($errors)

	{

	{

		$page->output_inline_error($errors);
$copy_data = $mybb->input;

		$page->output_inline_error($errors);
$copy_data = $mybb->input;

	}
else
{

	}
else
{

		$copy_data['type'] = "f";
$copy_data['title'] = "";
$copy_data['description'] = "";

		$copy_data['type'] = "f";
$copy_data['title'] = "";
$copy_data['description'] = "";

Zeile 478Zeile 482
		$fid = $mybb->get_input('fid', MyBB::INPUT_INT);
$gid = $mybb->get_input('gid', MyBB::INPUT_INT);
$forum = get_forum($fid);

		$fid = $mybb->get_input('fid', MyBB::INPUT_INT);
$gid = $mybb->get_input('gid', MyBB::INPUT_INT);
$forum = get_forum($fid);





		if((!$fid || !$gid) && $pid)
{
$query = $db->simple_select("forumpermissions", "fid, gid", "pid='{$pid}'");

		if((!$fid || !$gid) && $pid)
{
$query = $db->simple_select("forumpermissions", "fid, gid", "pid='{$pid}'");

Zeile 525Zeile 529
			$update_array['fid'] = $fid;
$update_array['gid'] = $mybb->get_input('gid', MyBB::INPUT_INT);
$db->insert_query("forumpermissions", $update_array);

			$update_array['fid'] = $fid;
$update_array['gid'] = $mybb->get_input('gid', MyBB::INPUT_INT);
$db->insert_query("forumpermissions", $update_array);

		}

$plugins->run_hooks("admin_forum_management_permissions_commit");

		}

$plugins->run_hooks("admin_forum_management_permissions_commit");


if(!($fid && !$pid))
{


if(!($fid && !$pid))
{

Zeile 538Zeile 542

// Log admin action
log_admin_action($fid, $forum['name']);


// Log admin action
log_admin_action($fid, $forum['name']);





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

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

		{

		{

			echo json_encode("<script type=\"text/javascript\">$('#row_{$gid}').html('".str_replace(array("'", "\t", "\n"), array("\\'", "", ""), retrieve_single_permissions_row($gid, $fid))."'); QuickPermEditor.init({$gid});</script>");
die;

			echo json_encode("<script type=\"text/javascript\">$('#row_{$gid}').html('".str_replace(array("'", "\t", "\n"), array("\\'", "", ""), retrieve_single_permissions_row($gid, $fid))."'); QuickPermEditor.init({$gid});</script>");
die;

		}

		}

		else
{
flash_message($lang->success_forum_permissions_saved, 'success');
admin_redirect("index.php?module=forum-management&fid={$fid}#tab_permissions");
}
}

		else
{
flash_message($lang->success_forum_permissions_saved, 'success');
admin_redirect("index.php?module=forum-management&fid={$fid}#tab_permissions");
}
}





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

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

Zeile 562Zeile 566
				'link' => "index.php?module=forum-management&amp;action=permissions&amp;fid=".$mybb->input['fid']."&amp;gid=".$mybb->input['gid'],
'description' => $lang->forum_permissions_desc
);

				'link' => "index.php?module=forum-management&amp;action=permissions&amp;fid=".$mybb->input['fid']."&amp;gid=".$mybb->input['gid'],
'description' => $lang->forum_permissions_desc
);





			$page->add_breadcrumb_item($lang->forum_permissions2, "index.php?module=forum-management&amp;fid=".$mybb->input['fid']."#tab_permissions");
}
else

			$page->add_breadcrumb_item($lang->forum_permissions2, "index.php?module=forum-management&amp;fid=".$mybb->input['fid']."#tab_permissions");
}
else

Zeile 574Zeile 578
				'title' => $lang->forum_permissions,
'link' => "index.php?module=forum-management&amp;action=permissions&amp;pid=".$mybb->get_input('pid', MyBB::INPUT_INT),
'description' => $lang->forum_permissions_desc

				'title' => $lang->forum_permissions,
'link' => "index.php?module=forum-management&amp;action=permissions&amp;pid=".$mybb->get_input('pid', MyBB::INPUT_INT),
'description' => $lang->forum_permissions_desc

			);

			);


$page->add_breadcrumb_item($lang->forum_permissions2, "index.php?module=forum-management&amp;fid=".$mybb->input['fid']."#tab_permissions");
}


$page->add_breadcrumb_item($lang->forum_permissions2, "index.php?module=forum-management&amp;fid=".$mybb->input['fid']."#tab_permissions");
}

Zeile 621Zeile 625
		if($mybb->input['ajax'] != 1)
{
$form = new Form("index.php?module=forum-management&amp;action=permissions", "post");

		if($mybb->input['ajax'] != 1)
{
$form = new Form("index.php?module=forum-management&amp;action=permissions", "post");

		}

		}

		else
{
$form = new Form("index.php?module=forum-management&amp;action=permissions&amp;ajax=1&amp;pid=".$mybb->get_input('pid', MyBB::INPUT_INT)."&amp;gid=".$mybb->get_input('gid', MyBB::INPUT_INT)."&amp;fid=".$mybb->get_input('gid', MyBB::INPUT_INT), "post", "modal_form");

		else
{
$form = new Form("index.php?module=forum-management&amp;action=permissions&amp;ajax=1&amp;pid=".$mybb->get_input('pid', MyBB::INPUT_INT)."&amp;gid=".$mybb->get_input('gid', MyBB::INPUT_INT)."&amp;fid=".$mybb->get_input('gid', MyBB::INPUT_INT), "post", "modal_form");

Zeile 657Zeile 661
			$permission_data = $db->fetch_array($query);

if(!$fid)

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

if(!$fid)

			{

			{

				$fid = $permission_data['fid'];

				$fid = $permission_data['fid'];

			}


			}


			if(!$gid)

			if(!$gid)

			{

			{

				$gid = $permission_data['gid'];

				$gid = $permission_data['gid'];

			}

			}


if(!$pid)
{
$pid = $permission_data['pid'];


if(!$pid)
{
$pid = $permission_data['pid'];

			}


			}


			$query = $db->simple_select("usergroups", "*", "gid='$gid'");
$usergroup = $db->fetch_array($query);


			$query = $db->simple_select("usergroups", "*", "gid='$gid'");
$usergroup = $db->fetch_array($query);


Zeile 862Zeile 866
				"defaultsortby" => $db->escape_string($mybb->input['defaultsortby']),
"defaultsortorder" => $db->escape_string($mybb->input['defaultsortorder']),
);

				"defaultsortby" => $db->escape_string($mybb->input['defaultsortby']),
"defaultsortorder" => $db->escape_string($mybb->input['defaultsortorder']),
);

 

$plugins->run_hooks("admin_forum_management_add_start");


			$fid = $db->insert_query("forums", $insert_array);

$parentlist = make_parent_list($fid);

			$fid = $db->insert_query("forums", $insert_array);

$parentlist = make_parent_list($fid);

Zeile 2286Zeile 2293
		$form_container = new FormContainer($lang->manage_forums);
}
$form_container->output_row_header($lang->forum);

		$form_container = new FormContainer($lang->manage_forums);
}
$form_container->output_row_header($lang->forum);

	$form_container->output_row_header($lang->order, array("class" => "align_center", 'width' => '5%'));

	$form_container->output_row_header($lang->order, array("class" => "align_center", 'width' => '6%'));

	$form_container->output_row_header($lang->controls, array("class" => "align_center", 'style' => 'width: 200px'));

build_admincp_forums_list($form_container, $form, $fid);

	$form_container->output_row_header($lang->controls, array("class" => "align_center", 'style' => 'width: 200px'));

build_admincp_forums_list($form_container, $form, $fid);

Zeile 2718Zeile 2725
				$popup->add_item($lang->subforums, "index.php?module=forum-management&amp;fid={$forum['fid']}");
$popup->add_item($lang->moderators, "index.php?module=forum-management&amp;fid={$forum['fid']}#tab_moderators");
$popup->add_item($lang->permissions, "index.php?module=forum-management&amp;fid={$forum['fid']}#tab_permissions");

				$popup->add_item($lang->subforums, "index.php?module=forum-management&amp;fid={$forum['fid']}");
$popup->add_item($lang->moderators, "index.php?module=forum-management&amp;fid={$forum['fid']}#tab_moderators");
$popup->add_item($lang->permissions, "index.php?module=forum-management&amp;fid={$forum['fid']}#tab_permissions");

 
				$popup->add_item($lang->forum_thread_prefixes, "index.php?module=config-thread_prefixes&amp;fid={$forum['fid']}");

				$popup->add_item($lang->add_child_forum, "index.php?module=forum-management&amp;action=add&amp;pid={$forum['fid']}");
$popup->add_item($lang->copy_forum, "index.php?module=forum-management&amp;action=copy&amp;fid={$forum['fid']}");
$popup->add_item($lang->delete_forum, "index.php?module=forum-management&amp;action=delete&amp;fid={$forum['fid']}&amp;my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_forum_deletion}')");

				$popup->add_item($lang->add_child_forum, "index.php?module=forum-management&amp;action=add&amp;pid={$forum['fid']}");
$popup->add_item($lang->copy_forum, "index.php?module=forum-management&amp;action=copy&amp;fid={$forum['fid']}");
$popup->add_item($lang->delete_forum, "index.php?module=forum-management&amp;action=delete&amp;fid={$forum['fid']}&amp;my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_forum_deletion}')");

Zeile 2758Zeile 2766
				$popup->add_item($lang->subforums, "index.php?module=forum-management&amp;fid={$forum['fid']}");
$popup->add_item($lang->moderators, "index.php?module=forum-management&amp;fid={$forum['fid']}#tab_moderators");
$popup->add_item($lang->permissions, "index.php?module=forum-management&amp;fid={$forum['fid']}#tab_permissions");

				$popup->add_item($lang->subforums, "index.php?module=forum-management&amp;fid={$forum['fid']}");
$popup->add_item($lang->moderators, "index.php?module=forum-management&amp;fid={$forum['fid']}#tab_moderators");
$popup->add_item($lang->permissions, "index.php?module=forum-management&amp;fid={$forum['fid']}#tab_permissions");

 
				$popup->add_item($lang->forum_thread_prefixes, "index.php?module=config-thread_prefixes&amp;fid={$forum['fid']}");

				$popup->add_item($lang->add_child_forum, "index.php?module=forum-management&amp;action=add&amp;pid={$forum['fid']}");
$popup->add_item($lang->copy_forum, "index.php?module=forum-management&amp;action=copy&amp;fid={$forum['fid']}");
$popup->add_item($lang->delete_forum, "index.php?module=forum-management&amp;action=delete&amp;fid={$forum['fid']}&amp;my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_forum_deletion}')");

				$popup->add_item($lang->add_child_forum, "index.php?module=forum-management&amp;action=add&amp;pid={$forum['fid']}");
$popup->add_item($lang->copy_forum, "index.php?module=forum-management&amp;action=copy&amp;fid={$forum['fid']}");
$popup->add_item($lang->delete_forum, "index.php?module=forum-management&amp;action=delete&amp;fid={$forum['fid']}&amp;my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_forum_deletion}')");