Vergleich admin/modules/forum/management.php - 1.6.7 - 1.6.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: management.php 5718 2011-12-09 01:30:20Z Tomm $

 * $Id$

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 19Zeile 19

if($mybb->input['action'] == "add" || $mybb->input['action'] == "edit" || $mybb->input['action'] == "copy" || $mybb->input['action'] == "permissions" || !$mybb->input['action'])
{


if($mybb->input['action'] == "add" || $mybb->input['action'] == "edit" || $mybb->input['action'] == "copy" || $mybb->input['action'] == "permissions" || !$mybb->input['action'])
{

	if($mybb->input['fid'] && ($mybb->input['action'] == "management" || $mybb->input['action'] == "edit" || $mybb->input['action'] == "copy" || !$mybb->input['action']))

	if(isset($mybb->input['fid']) && ($mybb->input['action'] == "management" || $mybb->input['action'] == "edit" || $mybb->input['action'] == "copy" || !$mybb->input['action']))

	{
$sub_tabs['view_forum'] = array(
'title' => $lang->view_forum,

	{
$sub_tabs['view_forum'] = array(
'title' => $lang->view_forum,

Zeile 30Zeile 30
		$sub_tabs['add_child_forum'] = array(
'title' => $lang->add_child_forum,
'link' => "index.php?module=forum-management&action=add&pid=".$mybb->input['fid'],

		$sub_tabs['add_child_forum'] = array(
'title' => $lang->add_child_forum,
'link' => "index.php?module=forum-management&action=add&pid=".$mybb->input['fid'],

			'description' => $lang->add_child_forum_desc

			'description' => $lang->view_forum_desc

		);

$sub_tabs['edit_forum_settings'] = array(

		);

$sub_tabs['edit_forum_settings'] = array(

Zeile 225Zeile 225
	if($copy_data['type'] == "f")
{
$create_a_options_f['checked'] = true;

	if($copy_data['type'] == "f")
{
$create_a_options_f['checked'] = true;

	}

	}

	else
{
$create_a_options_c['checked'] = true;

	else
{
$create_a_options_c['checked'] = true;

Zeile 341Zeile 341
	}

$sub_tabs = array();

	}

$sub_tabs = array();

	

	

	$sub_tabs['edit_mod'] = array(
'title' => $lang->edit_mod,
'link' => "index.php?module=forum-management&action=editmod&mid=".$mybb->input['mid'],

	$sub_tabs['edit_mod'] = array(
'title' => $lang->edit_mod,
'link' => "index.php?module=forum-management&action=editmod&mid=".$mybb->input['mid'],

Zeile 953Zeile 953
		$form->generate_check_box('modthreads', 1, $lang->mod_new_threads, array('checked' => $forum_data['modthreads'], 'id' => 'modthreads')),
$form->generate_check_box('modattachments', 1, $lang->mod_new_attachments, array('checked' => $forum_data['modattachments'], 'id' => 'modattachments')),
$form->generate_check_box('mod_edit_posts', 1, $lang->mod_after_edit, array('checked' => $forum_data['mod_edit_posts'], 'id' => 'mod_edit_posts'))

		$form->generate_check_box('modthreads', 1, $lang->mod_new_threads, array('checked' => $forum_data['modthreads'], 'id' => 'modthreads')),
$form->generate_check_box('modattachments', 1, $lang->mod_new_attachments, array('checked' => $forum_data['modattachments'], 'id' => 'modattachments')),
$form->generate_check_box('mod_edit_posts', 1, $lang->mod_after_edit, array('checked' => $forum_data['mod_edit_posts'], 'id' => 'mod_edit_posts'))

	);

$form_container->output_row($lang->moderation_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $moderator_options)."</div>");

$styles = array(
'0' => $lang->use_default
);

$query = $db->simple_select("themes", "tid,name", "name!='((master))' AND name!='((master-backup))'", array('order_by' => 'name'));
while($style = $db->fetch_array($query))

	);

$form_container->output_row($lang->moderation_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $moderator_options)."</div>");

$styles = array(
'0' => $lang->use_default
);

$query = $db->simple_select("themes", "tid,name", "name!='((master))' AND name!='((master-backup))'", array('order_by' => 'name'));
while($style = $db->fetch_array($query))

	{

	{

		$styles[$style['tid']] = $style['name'];

		$styles[$style['tid']] = htmlspecialchars_uni($style['name']);

	}

$style_options = array(
$form->generate_check_box('overridestyle', 1, $lang->override_user_style, array('checked' => $forum_data['overridestyle'], 'id' => 'overridestyle')),
$lang->forum_specific_style."<br />\n".$form->generate_select_box('style', $styles, $forum_data['style'], array('id' => 'style'))

	}

$style_options = array(
$form->generate_check_box('overridestyle', 1, $lang->override_user_style, array('checked' => $forum_data['overridestyle'], 'id' => 'overridestyle')),
$lang->forum_specific_style."<br />\n".$form->generate_select_box('style', $styles, $forum_data['style'], array('id' => 'style'))

	);

$form_container->output_row($lang->style_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $style_options)."</div>");

	);

$form_container->output_row($lang->style_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $style_options)."</div>");

	
$display_methods = array(
'0' => $lang->dont_display_rules,

	
$display_methods = array(
'0' => $lang->dont_display_rules,

Zeile 1000Zeile 1000
		100 => $lang->datelimit_100days,
365 => $lang->datelimit_lastyear,
9999 => $lang->datelimit_beginning,

		100 => $lang->datelimit_100days,
365 => $lang->datelimit_lastyear,
9999 => $lang->datelimit_beginning,

	);


	);


	$default_sort_by = array(
"" => $lang->board_default,
"subject" => $lang->sort_by_subject,

	$default_sort_by = array(
"" => $lang->board_default,
"subject" => $lang->sort_by_subject,

Zeile 1011Zeile 1011
		"rating" => $lang->sort_by_rating,
"replies" => $lang->sort_by_replies,
"views" => $lang->sort_by_views,

		"rating" => $lang->sort_by_rating,
"replies" => $lang->sort_by_replies,
"views" => $lang->sort_by_views,

	);

	);

	
$default_sort_order = array(
"" => $lang->board_default,

	
$default_sort_order = array(
"" => $lang->board_default,

Zeile 1040Zeile 1040
	);

$form_container->output_row($lang->misc_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $misc_options)."</div>");

	);

$form_container->output_row($lang->misc_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $misc_options)."</div>");

	$form_container->end();

	$form_container->end();

	echo "</div>";

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

	echo "</div>";

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

	{

	{

		$usergroups[$usergroup['gid']] = $usergroup;
}


		$usergroups[$usergroup['gid']] = $usergroup;
}


Zeile 1055Zeile 1055
		'canpostthreads' => $lang->permissions_canpostthreads,
'canpostreplys' => $lang->permissions_canpostreplys,
'canpostpolls' => $lang->permissions_canpostpolls,

		'canpostthreads' => $lang->permissions_canpostthreads,
'canpostreplys' => $lang->permissions_canpostreplys,
'canpostpolls' => $lang->permissions_canpostpolls,

	);

	);

	
$field_list2 = array(
'canview' => $lang->perm_drag_canview,

	
$field_list2 = array(
'canview' => $lang->perm_drag_canview,

Zeile 1065Zeile 1065
	);

$ids = array();

	);

$ids = array();

	

	

	$form_container = new FormContainer($lang->forum_permissions);
$form_container->output_row_header($lang->permissions_group, array("class" => "align_center", 'style' => 'width: 40%'));
$form_container->output_row_header($lang->overview_allowed_actions, array("class" => "align_center"));

	$form_container = new FormContainer($lang->forum_permissions);
$form_container->output_row_header($lang->permissions_group, array("class" => "align_center", 'style' => 'width: 40%'));
$form_container->output_row_header($lang->overview_allowed_actions, array("class" => "align_center"));

Zeile 1079Zeile 1079
			{
$input_permissions = $mybb->input['fields_'.$usergroup['gid']];
if(!is_array($input_permissions))

			{
$input_permissions = $mybb->input['fields_'.$usergroup['gid']];
if(!is_array($input_permissions))

				{

				{

					// Convering the comma separated list from Javascript form into a variable
$input_permissions = explode(',' , $input_permissions);
}

					// Convering the comma separated list from Javascript form into a variable
$input_permissions = explode(',' , $input_permissions);
}

Zeile 1087Zeile 1087
				{
$mybb->input['permissions'][$usergroup['gid']][$input_permission] = 1;
}

				{
$mybb->input['permissions'][$usergroup['gid']][$input_permission] = 1;
}

			}
}

			}
}

	}

foreach($usergroups as $usergroup)
{
$perms = array();

	}

foreach($usergroups as $usergroup)
{
$perms = array();

		if($mybb->input['default_permissions'][$usergroup['gid']])

		if(isset($mybb->input['default_permissions']) && $mybb->input['default_permissions'][$usergroup['gid']])

		{
if(is_array($existing_permissions) && $existing_permissions[$usergroup['gid']])
{

		{
if(is_array($existing_permissions) && $existing_permissions[$usergroup['gid']])
{

Zeile 1111Zeile 1111
				$perms = $cached_forum_perms[$forum_data['pid']][$usergroup['gid']];
$default_checked = true;
}

				$perms = $cached_forum_perms[$forum_data['pid']][$usergroup['gid']];
$default_checked = true;
}

		}


		}


		if(!$perms)
{
$perms = $usergroup;
$default_checked = true;

		if(!$perms)
{
$perms = $usergroup;
$default_checked = true;

		}


		}


		foreach($field_list as $forum_permission => $forum_perm_title)
{
if(isset($mybb->input['permissions']))

		foreach($field_list as $forum_permission => $forum_perm_title)
{
if(isset($mybb->input['permissions']))

Zeile 1164Zeile 1164
			$inherited_text = $lang->custom_permission;
}


			$inherited_text = $lang->custom_permission;
}


		$form_container->output_cell("<strong>{$usergroup['title']}</strong><br />".$form->generate_check_box("default_permissions[{$usergroup['gid']}]", 1, "", array("id" => "default_permissions_{$usergroup['gid']}", "checked" => $default_checked, "onclick" => $default_click))." <small><label for=\"default_permissions_{$usergroup['gid']}\">{$lang->permissions_use_group_default}</label></small>");

		$form_container->output_cell("<strong>{$usergroup['title']}</strong><br />".$form->generate_check_box("default_permissions[{$usergroup['gid']}]", 1, "", array("id" => "default_permissions_{$usergroup['gid']}", "checked" => $default_checked))." <small><label for=\"default_permissions_{$usergroup['gid']}\">{$lang->permissions_use_group_default}</label></small>");

		
$field_select = "<div class=\"quick_perm_fields\">\n";

		
$field_select = "<div class=\"quick_perm_fields\">\n";

		$field_select .= "<div class=\"enabled\"><div class=\"fields_title\">{$lang->enabled}</div><ul id=\"fields_enabled_{$usergroup['gid']}\">\n";

		$field_select .= "<div class=\"enabled\"><ul id=\"fields_enabled_{$usergroup['gid']}\">\n";

		foreach($perms_checked as $perm => $value)
{
if($value == 1)

		foreach($perms_checked as $perm => $value)
{
if($value == 1)

			{
$field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>";
}
}

			{
$field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>";
}
}

		$field_select .= "</ul></div>\n";

		$field_select .= "</ul></div>\n";

		$field_select .= "<div class=\"disabled\"><div class=\"fields_title\">{$lang->disabled}</div><ul id=\"fields_disabled_{$usergroup['gid']}\">\n";

		$field_select .= "<div class=\"disabled\"><ul id=\"fields_disabled_{$usergroup['gid']}\">\n";

		foreach($perms_checked as $perm => $value)
{
if($value == 0)

		foreach($perms_checked as $perm => $value)
{
if($value == 0)

Zeile 1197Zeile 1197
		
$field_selected = array();
foreach($field_list as $forum_permission => $permission_title)

		
$field_selected = array();
foreach($field_list as $forum_permission => $permission_title)

		{

		{

			$field_options[$forum_permission] = $permission_title;
if($perms_checked[$forum_permission])
{

			$field_options[$forum_permission] = $permission_title;
if($perms_checked[$forum_permission])
{

Zeile 1234Zeile 1234
	$plugins->run_hooks("admin_forum_management_edit");

if(!$mybb->input['fid'])

	$plugins->run_hooks("admin_forum_management_edit");

if(!$mybb->input['fid'])

	{
flash_message($lang->error_invalid_fid, 'error');
admin_redirect("index.php?module=forum-management");
}


	{
flash_message($lang->error_invalid_fid, 'error');
admin_redirect("index.php?module=forum-management");
}


	$query = $db->simple_select("forums", "*", "fid='{$mybb->input['fid']}'");
$forum_data = $db->fetch_array($query);
if(!$forum_data)

	$query = $db->simple_select("forums", "*", "fid='{$mybb->input['fid']}'");
$forum_data = $db->fetch_array($query);
if(!$forum_data)

Zeile 1252Zeile 1252
	if($mybb->request_method == "post")
{
if(!trim($mybb->input['title']))

	if($mybb->request_method == "post")
{
if(!trim($mybb->input['title']))

		{

		{

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


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


Zeile 1261Zeile 1261
		if($pid == $mybb->input['fid'])
{
$errors[] = $lang->error_forum_parent_itself;

		if($pid == $mybb->input['fid'])
{
$errors[] = $lang->error_forum_parent_itself;

		}

		}

		else
{
$query = $db->simple_select("forums", "*", "pid='{$mybb->input['fid']}'");

		else
{
$query = $db->simple_select("forums", "*", "pid='{$mybb->input['fid']}'");

Zeile 1271Zeile 1271
				{
$errors[] = $lang->error_forum_parent_child;
break;

				{
$errors[] = $lang->error_forum_parent_child;
break;

				}
}
}


				}
}
}


		$type = $mybb->input['type'];

if($pid <= 0 && $type == "f")

		$type = $mybb->input['type'];

if($pid <= 0 && $type == "f")

Zeile 1349Zeile 1349
				while($child = $db->fetch_array($query))
{
$db->update_query("forums", array("parentlist" => make_parent_list($child['fid'])), "fid='{$child['fid']}'", 1);

				while($child = $db->fetch_array($query))
{
$db->update_query("forums", array("parentlist" => make_parent_list($child['fid'])), "fid='{$child['fid']}'", 1);

				}
}

$inherit = $mybb->input['default_permissions'];

				}
}

$inherit = $mybb->input['default_permissions'];

			
foreach($mybb->input as $id => $permission)
{

			
foreach($mybb->input as $id => $permission)
{

Zeile 1429Zeile 1429
	echo $form->generate_hidden_field("fid", $fid);

if($errors)

	echo $form->generate_hidden_field("fid", $fid);

if($errors)

	{

	{

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

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

	}
else
{

	}
else
{

		$forum_data['title'] = $forum_data['name'];
}


		$forum_data['title'] = $forum_data['name'];
}


Zeile 1448Zeile 1448
	while($existing = $db->fetch_array($query))
{
$existing_permissions[$existing['gid']] = $existing;

	while($existing = $db->fetch_array($query))
{
$existing_permissions[$existing['gid']] = $existing;

	}


	}


	$types = array(
'f' => $lang->forum,
'c' => $lang->category

	$types = array(
'f' => $lang->forum,
'c' => $lang->category

	);


	);


	$create_a_options_f = array(
'id' => 'forum'
);

	$create_a_options_f = array(
'id' => 'forum'
);

Zeile 1468Zeile 1468
		$create_a_options_f['checked'] = true;
}
else

		$create_a_options_f['checked'] = true;
}
else

	{

	{

		$create_a_options_c['checked'] = true;
}


		$create_a_options_c['checked'] = true;
}


Zeile 1546Zeile 1546
	);

$default_sort_by = array(

	);

$default_sort_by = array(

		"" => $lang->board_default,

		"" => $lang->board_default,

		"subject" => $lang->sort_by_subject,
"lastpost" => $lang->sort_by_lastpost,
"starter" => $lang->sort_by_starter,

		"subject" => $lang->sort_by_subject,
"lastpost" => $lang->sort_by_lastpost,
"starter" => $lang->sort_by_starter,

Zeile 1554Zeile 1554
		"rating" => $lang->sort_by_rating,
"replies" => $lang->sort_by_replies,
"views" => $lang->sort_by_views,

		"rating" => $lang->sort_by_rating,
"replies" => $lang->sort_by_replies,
"views" => $lang->sort_by_views,

	);


	);


	$default_sort_order = array(
"" => $lang->board_default,
"asc" => $lang->sort_order_asc,

	$default_sort_order = array(
"" => $lang->board_default,
"asc" => $lang->sort_order_asc,

Zeile 1566Zeile 1566
		$lang->default_date_cut."<br />\n".$form->generate_select_box('defaultdatecut', $default_date_cut, $forum_data['defaultdatecut'], array('checked' => $forum_data['defaultdatecut'], 'id' => 'defaultdatecut')),
$lang->default_sort_by."<br />\n".$form->generate_select_box('defaultsortby', $default_sort_by, $forum_data['defaultsortby'], array('checked' => $forum_data['defaultsortby'], 'id' => 'defaultsortby')),
$lang->default_sort_order."<br />\n".$form->generate_select_box('defaultsortorder', $default_sort_order, $forum_data['defaultsortorder'], array('checked' => $forum_data['defaultsortorder'], 'id' => 'defaultsortorder')),

		$lang->default_date_cut."<br />\n".$form->generate_select_box('defaultdatecut', $default_date_cut, $forum_data['defaultdatecut'], array('checked' => $forum_data['defaultdatecut'], 'id' => 'defaultdatecut')),
$lang->default_sort_by."<br />\n".$form->generate_select_box('defaultsortby', $default_sort_by, $forum_data['defaultsortby'], array('checked' => $forum_data['defaultsortby'], 'id' => 'defaultsortby')),
$lang->default_sort_order."<br />\n".$form->generate_select_box('defaultsortorder', $default_sort_order, $forum_data['defaultsortorder'], array('checked' => $forum_data['defaultsortorder'], 'id' => 'defaultsortorder')),

	);

$form_container->output_row($lang->default_view_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $view_options)."</div>");


	);

$form_container->output_row($lang->default_view_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $view_options)."</div>");


	$misc_options = array(
$form->generate_check_box('allowhtml', 1, $lang->allow_html, array('checked' => $forum_data['allowhtml'], 'id' => 'allowhtml')),
$form->generate_check_box('allowmycode', 1, $lang->allow_mycode, array('checked' => $forum_data['allowmycode'], 'id' => 'allowmycode')),

	$misc_options = array(
$form->generate_check_box('allowhtml', 1, $lang->allow_html, array('checked' => $forum_data['allowhtml'], 'id' => 'allowhtml')),
$form->generate_check_box('allowmycode', 1, $lang->allow_mycode, array('checked' => $forum_data['allowmycode'], 'id' => 'allowmycode')),

Zeile 1583Zeile 1583
	);

$form_container->output_row($lang->misc_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $misc_options)."</div>");

	);

$form_container->output_row($lang->misc_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $misc_options)."</div>");

	$form_container->end();


	$form_container->end();


	$cached_forum_perms = $cache->read("forumpermissions");
$field_list = array(
'canview' => $lang->permissions_canview,

	$cached_forum_perms = $cache->read("forumpermissions");
$field_list = array(
'canview' => $lang->permissions_canview,

Zeile 1616Zeile 1616
			{
$input_permissions = $mybb->input['fields_'.$usergroup['gid']];
if(!is_array($input_permissions))

			{
$input_permissions = $mybb->input['fields_'.$usergroup['gid']];
if(!is_array($input_permissions))

				{

				{

					// Convering the comma separated list from Javascript form into a variable
$input_permissions = explode(',' , $input_permissions);
}
foreach($input_permissions as $input_permission)

					// Convering the comma separated list from Javascript form into a variable
$input_permissions = explode(',' , $input_permissions);
}
foreach($input_permissions as $input_permission)

				{

				{

					$mybb->input['permissions'][$usergroup['gid']][$input_permission] = 1;
}
}

					$mybb->input['permissions'][$usergroup['gid']][$input_permission] = 1;
}
}

Zeile 1697Zeile 1697
				}
}
else

				}
}
else

			{
if($perms[$forum_permission] == 1)

			{
if($perms[$forum_permission] == 1)

				{
$perms_checked[$forum_permission] = 1;
}

				{
$perms_checked[$forum_permission] = 1;
}

Zeile 1713Zeile 1713
		if($default_checked)
{
$inherited_text = $lang->inherited_permission;

		if($default_checked)
{
$inherited_text = $lang->inherited_permission;

		}

		}

		else
{
$inherited_text = $lang->custom_permission;

		else
{
$inherited_text = $lang->custom_permission;

		}


		}


		$form_container->output_cell("<strong>{$usergroup['title']}</strong> <small style=\"vertical-align: middle;\">({$inherited_text})</small>");

$field_select = "<div class=\"quick_perm_fields\">\n";
$field_select .= "<div class=\"enabled\"><div class=\"fields_title\">{$lang->enabled}</div><ul id=\"fields_enabled_{$usergroup['gid']}\">\n";

		$form_container->output_cell("<strong>{$usergroup['title']}</strong> <small style=\"vertical-align: middle;\">({$inherited_text})</small>");

$field_select = "<div class=\"quick_perm_fields\">\n";
$field_select .= "<div class=\"enabled\"><div class=\"fields_title\">{$lang->enabled}</div><ul id=\"fields_enabled_{$usergroup['gid']}\">\n";

		foreach($perms_checked as $perm => $value)

		foreach($perms_checked as $perm => $value)

		{
if($value == 1)
{

		{
if($value == 1)
{

Zeile 1737Zeile 1737
			if($value == 0)
{
$field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>";

			if($value == 0)
{
$field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>";

			}

			}

		}
$field_select .= "</ul></div></div>\n";
$field_select .= $form->generate_hidden_field("fields_".$usergroup['gid'], @implode(",", @array_keys($perms_checked, '1')), array('id' => 'fields_'.$usergroup['gid']));

		}
$field_select .= "</ul></div></div>\n";
$field_select .= $form->generate_hidden_field("fields_".$usergroup['gid'], @implode(",", @array_keys($perms_checked, '1')), array('id' => 'fields_'.$usergroup['gid']));

Zeile 1810Zeile 1810
	if(!$mod['mid'])
{
flash_message($lang->error_invalid_moderator, 'error');

	if(!$mod['mid'])
{
flash_message($lang->error_invalid_moderator, 'error');

		admin_redirect("index.php?module=forum-management&fid={$fid}");
}

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

		admin_redirect("index.php?module=forum-management&fid={$fid}");
}

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

	{
admin_redirect("index.php?module=forum-management&fid={$fid}");
}

	{
admin_redirect("index.php?module=forum-management&fid={$fid}");
}

Zeile 1892Zeile 1892

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


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

	{
admin_redirect("index.php?module=forum-management");
}


	{
admin_redirect("index.php?module=forum-management");
}


	if($mybb->request_method == "post")
{
$fid = intval($mybb->input['fid']);

	if($mybb->request_method == "post")
{
$fid = intval($mybb->input['fid']);

Zeile 1906Zeile 1906
		
// Delete the forum
$db->delete_query("forums", "fid='$fid'");

		
// Delete the forum
$db->delete_query("forums", "fid='$fid'");

		
switch($db->type)
{
case "pgsql":

		
switch($db->type)
{
case "pgsql":

			case "sqlite":
$query = $db->simple_select("forums", "*", "','|| parentlist|| ',' LIKE '%,$fid,%'");
break;

			case "sqlite":
$query = $db->simple_select("forums", "*", "','|| parentlist|| ',' LIKE '%,$fid,%'");
break;

Zeile 1937Zeile 1937
		while($mod = $db->fetch_array($query))
{
$moderators[$mod['id']] = $mod['id'];

		while($mod = $db->fetch_array($query))
{
$moderators[$mod['id']] = $mod['id'];

		}

		}

		
if(is_array($moderators))
{

		
if(is_array($moderators))
{

Zeile 1979Zeile 1979
		$cache->update_forums();
$cache->update_moderators();
$cache->update_forumpermissions();

		$cache->update_forums();
$cache->update_moderators();
$cache->update_forumpermissions();

		

		

		$update_stats = array(
'numthreads' => "-".$stats['threads'],
'numunapprovedthreads' => "-".$stats['unapprovedthreads'],

		$update_stats = array(
'numthreads' => "-".$stats['threads'],
'numunapprovedthreads' => "-".$stats['unapprovedthreads'],

Zeile 2005Zeile 2005
if(!$mybb->input['action'])
{
$plugins->run_hooks("admin_forum_management_start");

if(!$mybb->input['action'])
{
$plugins->run_hooks("admin_forum_management_start");

	$fid = intval($mybb->input['fid']);

 




 
	if(!isset($mybb->input['fid']))
{
$mybb->input['fid'] = 0;
}

$fid = intval($mybb->input['fid']);

	if($fid)
{
$forum = get_forum($fid);

	if($fid)
{
$forum = get_forum($fid);

Zeile 2218Zeile 2223
		$page->output_tab_control($tabs);

echo "<div id=\"tab_subforums\">\n";

		$page->output_tab_control($tabs);

echo "<div id=\"tab_subforums\">\n";

		if(!is_array($forum_cache))

		if(!isset($forum_cache) || !is_array($forum_cache))

		{
cache_forums();
}

		{
cache_forums();
}

Zeile 2332Zeile 2337
			}
else
{

			}
else
{

				if(is_array($existing_permissions) && $existing_permissions[$usergroup['gid']])

				if(isset($existing_permissions) && is_array($existing_permissions) && $existing_permissions[$usergroup['gid']])

				{
$perms = $existing_permissions[$usergroup['gid']];
$default_checked = false;
}

				{
$perms = $existing_permissions[$usergroup['gid']];
$default_checked = false;
}

				elseif(is_array($cached_forum_perms) && $cached_forum_perms[$forum['fid']][$usergroup['gid']])

				elseif(is_array($cached_forum_perms) && isset($cached_forum_perms[$forum['fid']]) && $cached_forum_perms[$forum['fid']][$usergroup['gid']])

				{
$perms = $cached_forum_perms[$forum['fid']][$usergroup['gid']];
$default_checked = true;

				{
$perms = $cached_forum_perms[$forum['fid']][$usergroup['gid']];
$default_checked = true;

Zeile 2393Zeile 2398
			$form_container->output_cell("<strong>{$usergroup['title']}</strong> <small style=\"vertical-align: middle;\">({$inherited_text})</small>");

$field_select = "<div class=\"quick_perm_fields\">\n";

			$form_container->output_cell("<strong>{$usergroup['title']}</strong> <small style=\"vertical-align: middle;\">({$inherited_text})</small>");

$field_select = "<div class=\"quick_perm_fields\">\n";

			$field_select .= "<div class=\"enabled\"><div class=\"fields_title\">{$lang->enabled}</div><ul id=\"fields_enabled_{$usergroup['gid']}\">\n";

			$field_select .= "<div class=\"enabled\"><ul id=\"fields_enabled_{$usergroup['gid']}\">\n";

			foreach($perms_checked as $perm => $value)
{
if($value == 1)

			foreach($perms_checked as $perm => $value)
{
if($value == 1)

Zeile 2402Zeile 2407
				}
}
$field_select .= "</ul></div>\n";

				}
}
$field_select .= "</ul></div>\n";

			$field_select .= "<div class=\"disabled\"><div class=\"fields_title\">{$lang->disabled}</div><ul id=\"fields_disabled_{$usergroup['gid']}\">\n";

			$field_select .= "<div class=\"disabled\"><ul id=\"fields_disabled_{$usergroup['gid']}\">\n";

			foreach($perms_checked as $perm => $value)

			foreach($perms_checked as $perm => $value)

			{

			{

				if($value == 0)
{
$field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>";

				if($value == 0)
{
$field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>";

Zeile 2448Zeile 2453
			$form_container->construct_row(array('id' => 'row_'.$usergroup['gid']));

$ids[] = $usergroup['gid'];

			$form_container->construct_row(array('id' => 'row_'.$usergroup['gid']));

$ids[] = $usergroup['gid'];

		}
$form_container->end();


		}
$form_container->end();


		$buttons = array();
$buttons[] = $form->generate_submit_button($lang->update_forum_permissions);
$buttons[] = $form->generate_reset_button($lang->reset);

		$buttons = array();
$buttons[] = $form->generate_submit_button($lang->update_forum_permissions);
$buttons[] = $form->generate_reset_button($lang->reset);

Zeile 2495Zeile 2500
				$form_container->output_cell("<a href=\"index.php?module=forum-management&amp;action=editmod&amp;mid={$moderator['mid']}\">{$lang->edit}</a>", array("class" => "align_center"));
$form_container->output_cell("<a href=\"index.php?module=forum-management&amp;action=deletemod&amp;id={$moderator['id']}&amp;isgroup=0&amp;fid={$fid}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_moderator_deletion}')\">{$lang->delete}</a>", array("class" => "align_center"));
}

				$form_container->output_cell("<a href=\"index.php?module=forum-management&amp;action=editmod&amp;mid={$moderator['mid']}\">{$lang->edit}</a>", array("class" => "align_center"));
$form_container->output_cell("<a href=\"index.php?module=forum-management&amp;action=deletemod&amp;id={$moderator['id']}&amp;isgroup=0&amp;fid={$fid}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_moderator_deletion}')\">{$lang->delete}</a>", array("class" => "align_center"));
}

			$form_container->construct_row();
}

			$form_container->construct_row();
}

		
if($form_container->num_rows() == 0)

		
if($form_container->num_rows() == 0)

		{

		{

			$form_container->output_cell($lang->no_moderators, array('colspan' => 3));
$form_container->construct_row();

			$form_container->output_cell($lang->no_moderators, array('colspan' => 3));
$form_container->construct_row();

		}

		}

		$form_container->end();

// Users

		$form_container->end();

// Users

Zeile 2519Zeile 2524

foreach($usergroups as $group)
{


foreach($usergroups as $group)
{

			$modgroups[$group['gid']] = $lang->usergroup." ".$group['gid'].": ".$group['title'];











			$modgroups[$group['gid']] = $lang->usergroup." ".$group['gid'].": ".$group['title'];
}

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

if(!isset($mybb->input['username']))
{
$mybb->input['username'] = '';

		}

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

		}

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