Vergleich admin/modules/forum/management.php - 1.4.1 - 1.4.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: management.php 4092 2008-08-10 03:03:04Z Tikitiki $

 * $Id: management.php 4443 2009-08-25 11:41:21Z Tomm $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 88Zeile 88
				$errors[] = $lang->error_new_forum_needs_name;
}


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


			if($mybb->input['pid'] == 0 && $mybb->input['type'] == 'f')

			if($mybb->input['pid'] == -1 && $mybb->input['type'] == 'f')

			{

			{

				$errors[] = $lang->error_forum_noparent;

				$errors[] = $lang->error_no_parent;

			}

if(!$errors)

			}

if(!$errors)

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


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


 
	$cached_forum_perms = $cache->read("forumpermissions");

	$field_list = array('canview', 'canpostthreads', 'canpostreplys', 'canpostpolls', 'canpostattachments');

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

	$field_list = array('canview', 'canpostthreads', 'canpostreplys', 'canpostpolls', 'canpostattachments');

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

Zeile 906Zeile 907
		if(isset($mybb->input['default_permissions']))
{
if($mybb->input['default_permissions'][$usergroup['gid']])

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

			{

			{

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

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

				{

				{

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

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

Zeile 916Zeile 917
				{
$perms = $cached_forum_perms[$mybb->input['pid']][$usergroup['gid']];
$default_checked = true;

				{
$perms = $cached_forum_perms[$mybb->input['pid']][$usergroup['gid']];
$default_checked = true;

				}
}

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

				}
}

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

		else
{
if(is_array($existing_permissions) && $existing_permissions[$usergroup['gid']])
{
$perms = $existing_permissions[$usergroup['gid']];
$default_checked = false;

		else
{
if(is_array($existing_permissions) && $existing_permissions[$usergroup['gid']])
{
$perms = $existing_permissions[$usergroup['gid']];
$default_checked = false;

			}

			}

			else if(is_array($cached_forum_perms) && $cached_forum_perms[$mybb->input['pid']][$usergroup['gid']])

			else if(is_array($cached_forum_perms) && $cached_forum_perms[$mybb->input['pid']][$usergroup['gid']])

			{

			{

				$perms = $cached_forum_perms[$mybb->input['pid']][$usergroup['gid']];
$default_checked = true;
}

				$perms = $cached_forum_perms[$mybb->input['pid']][$usergroup['gid']];
$default_checked = true;
}

Zeile 942Zeile 943
			{
$perms = $usergroup;
$default_checked = true;

			{
$perms = $usergroup;
$default_checked = true;

			}

			}

		}


		}


 
		$all_check = "";

		$perm_check = "";
$all_checked = true;
foreach($field_list as $forum_permission)
{
if($usergroup[$forum_permission] == 1)

		$perm_check = "";
$all_checked = true;
foreach($field_list as $forum_permission)
{
if($usergroup[$forum_permission] == 1)

			{

			{

				$value = "true";

				$value = "true";

			}

			}

			else

			else

			{

			{

				$value = "false";
}

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

				$value = "false";
}

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

			{

			{

				$value = $mybb->input['permissions'][$usergroup['gid']][$forum_permission];
}

if(isset($mybb->input['permissions']))
{
if($mybb->input['permissions'][$usergroup['gid']]['all'])

				$value = $mybb->input['permissions'][$usergroup['gid']][$forum_permission];
}

if(isset($mybb->input['permissions']))
{
if($mybb->input['permissions'][$usergroup['gid']]['all'])

				{

				{

					$all_checked = false;
}

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

					$all_checked = false;
}

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

				{
$perms_checked[$forum_permission] = 1;
}
else
{
$perms_checked[$forum_permission] = 0;
}

				{
$perms_checked[$forum_permission] = 1;
}
else
{
$perms_checked[$forum_permission] = 0;
}

			}
else
{

			}
else
{

Zeile 1013Zeile 1015
	$buttons[] = $form->generate_submit_button($lang->save_forum);
$form->output_submit_wrapper($buttons);
$form->end();

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

	

	

	$page->output_footer();	
}

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

	$page->output_footer();	
}

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

	

	

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

	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)
{
flash_message($lang->error_invalid_fid, 'error');

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

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

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

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

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

	
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;

		}


		}


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

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

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

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

		{

		{

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

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

			{

			{

				if($child['fid'] == $pid)
{
$errors[] = $lang->error_forum_parent_child;

				if($child['fid'] == $pid)
{
$errors[] = $lang->error_forum_parent_child;

Zeile 1118Zeile 1120
				{
case "sqlite3":
case "sqlite2":

				{
case "sqlite3":
case "sqlite2":

 
					case "pgsql":

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

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

Zeile 1151Zeile 1154
			
$canview = $permissions['canview'];
$canpostthreads = $permissions['canpostthreads'];

			
$canview = $permissions['canview'];
$canpostthreads = $permissions['canpostthreads'];

			$canpostreplies = $permissions['canpostreplies'];

 
			$canpostpolls = $permissions['canpostpolls'];
$canpostattachments = $permissions['canpostattachments'];
$canpostreplies = $permissions['canpostreplys'];

			$canpostpolls = $permissions['canpostpolls'];
$canpostattachments = $permissions['canpostattachments'];
$canpostreplies = $permissions['canpostreplys'];

Zeile 1180Zeile 1182
		$page->output_inline_error($errors);
$forum_data = $mybb->input;
}

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

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


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


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

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

	}

	}

	
$query = $db->simple_select("forumpermissions", "*", "fid='{$fid}'");
while($existing = $db->fetch_array($query))

	
$query = $db->simple_select("forumpermissions", "*", "fid='{$fid}'");
while($existing = $db->fetch_array($query))

Zeile 1200Zeile 1202
	$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 1289Zeile 1291
		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 1326Zeile 1328
		$form->generate_check_box('showinjump', 1, $lang->show_forum_jump, array('checked' => $forum_data['showinjump'], 'id' => 'showinjump')),
$form->generate_check_box('usepostcounts', 1, $lang->use_postcounts, array('checked' => $forum_data['usepostcounts'], 'id' => 'usepostcounts'))
);

		$form->generate_check_box('showinjump', 1, $lang->show_forum_jump, array('checked' => $forum_data['showinjump'], 'id' => 'showinjump')),
$form->generate_check_box('usepostcounts', 1, $lang->use_postcounts, array('checked' => $forum_data['usepostcounts'], 'id' => 'usepostcounts'))
);

	

	

	$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->output_row($lang->misc_options, "", "<div class=\"forum_settings_bit\">".implode("</div><div class=\"forum_settings_bit\">", $misc_options)."</div>");
$form_container->end();


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

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

		$all_check = "";

		$all_check = "";

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

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

Zeile 1381Zeile 1383
				$default_checked = false;
}
elseif(is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['fid']][$usergroup['gid']])

				$default_checked = false;
}
elseif(is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['fid']][$usergroup['gid']])

			{

			{

				$perms = $cached_forum_perms[$forum_data['fid']][$usergroup['gid']];

				$perms = $cached_forum_perms[$forum_data['fid']][$usergroup['gid']];

				$default_checked = true;
}

				$default_checked = true;
}

			else if(is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['pid']][$usergroup['gid']])

			else if(is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['pid']][$usergroup['gid']])

			{

			{

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

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

				$default_checked = true;

				$default_checked = true;

			}

if(!$perms)

			}

if(!$perms)

Zeile 1397Zeile 1399
				$default_checked = true;
}
}

				$default_checked = true;
}
}

 
		$all_check = "";

		$perm_check = "";
$all_checked = true;

		$perm_check = "";
$all_checked = true;

		foreach($field_list as $forum_permission)

		foreach($field_list as $forum_permission)

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

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

			{

			{

				$value = "true";

				$value = "true";

			}

			}

			else
{
$value = "false";

			else
{
$value = "false";

			}


			}


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

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

			{

			{

				$value = $mybb->input['permissions'][$usergroup['gid']][$forum_permission];
}

if(isset($mybb->input['permissions']))
{
if($mybb->input['permissions'][$usergroup['gid']]['all'])

				$value = $mybb->input['permissions'][$usergroup['gid']][$forum_permission];
}

if(isset($mybb->input['permissions']))
{
if($mybb->input['permissions'][$usergroup['gid']]['all'])

				{
$all_checked = false;

				{
$all_checked = false;

				}

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

				}

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

				{

				{

					$perms_checked[$forum_permission] = 1;

					$perms_checked[$forum_permission] = 1;

				}

				}

				else

				else

				{

				{

					$perms_checked[$forum_permission] = 0;

					$perms_checked[$forum_permission] = 0;

				}

				}

			}
else
{
if($perms[$forum_permission] != 1)

			}
else
{
if($perms[$forum_permission] != 1)

				{
$all_checked = false;
}

				{
$all_checked = false;
}

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

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

Zeile 1454Zeile 1457
		$usergroup['title'] = htmlspecialchars_uni($usergroup['title']);
$form_container->output_cell("<strong>{$usergroup['title']}</strong><br /><small style=\"vertical-align: middle;\">".$form->generate_check_box("default_permissions[{$usergroup['gid']}];", 1, "", array("id" => "default_permissions_{$usergroup['gid']}", "checked" => $default_checked, "onclick" => $default_click))." <label for=\"default_permissions_{$usergroup['gid']}\">{$lang->permissions_use_group_default}</label></small>");
foreach($field_list as $forum_permission)

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

		{

		{

			$form_container->output_cell($form->generate_check_box("permissions[{$usergroup['gid']}][{$forum_permission}]", 1, "", array("id" => "permissions_{$usergroup['gid']}_{$forum_permission}", "checked" => $perms_checked[$forum_permission], "onclick" => $reset_default)), array('class' => 'align_center'));
}
$form_container->output_cell($form->generate_check_box("permissions[{$usergroup['gid']}][all]", 1, "", array("id" => "permissions_{$usergroup['gid']}_all", "checked" => $all_checked, "onclick" => $all_check)), array('class' => 'align_center'));

			$form_container->output_cell($form->generate_check_box("permissions[{$usergroup['gid']}][{$forum_permission}]", 1, "", array("id" => "permissions_{$usergroup['gid']}_{$forum_permission}", "checked" => $perms_checked[$forum_permission], "onclick" => $reset_default)), array('class' => 'align_center'));
}
$form_container->output_cell($form->generate_check_box("permissions[{$usergroup['gid']}][all]", 1, "", array("id" => "permissions_{$usergroup['gid']}_all", "checked" => $all_checked, "onclick" => $all_check)), array('class' => 'align_center'));

Zeile 1472Zeile 1475
	$form_container->end();

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

	$form_container->end();

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

	$form->output_submit_wrapper($buttons);

	$form->output_submit_wrapper($buttons);

	$form->end();

$page->output_footer();

	$form->end();

$page->output_footer();

Zeile 1511Zeile 1514
		
$db->delete_query("moderators", "mid='{$mid}'");
$query = $db->simple_select("moderators", "*", "uid='{$mod['uid']}'");

		
$db->delete_query("moderators", "mid='{$mid}'");
$query = $db->simple_select("moderators", "*", "uid='{$mod['uid']}'");

		if($db->fetch_array($query))

		if($db->num_rows($query) == 0)

		{
$updatequery = array(
"usergroup" => "2"

		{
$updatequery = array(
"usergroup" => "2"

Zeile 1626Zeile 1629
		$db->delete_query("threads", "fid='{$fid}' {$delquery}");
$db->delete_query("posts", "fid='{$fid}' {$delquery}");
$db->delete_query("moderators", "fid='{$fid}' {$delquery}");

		$db->delete_query("threads", "fid='{$fid}' {$delquery}");
$db->delete_query("posts", "fid='{$fid}' {$delquery}");
$db->delete_query("moderators", "fid='{$fid}' {$delquery}");

 
		$db->delete_query("forumsubscriptions", "fid='{$fid}' {$delquery}");


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


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

Zeile 1658Zeile 1662
		if($mybb->input['update'] == "permissions")
{
$inherit = $mybb->input['default_permissions'];

		if($mybb->input['update'] == "permissions")
{
$inherit = $mybb->input['default_permissions'];

 
			
if(empty($mybb->input['permissions']))
{
$mybb->input['permissions'] = array();
}

			
foreach($mybb->input['permissions'] as $gid => $permission)
{

			
foreach($mybb->input['permissions'] as $gid => $permission)
{

Zeile 1681Zeile 1690
			$canpostattachments = $permissions['canpostattachments'];
$canpostreplies = $permissions['canpostreplys'];
save_quick_perms($fid);

			$canpostattachments = $permissions['canpostattachments'];
$canpostreplies = $permissions['canpostreplys'];
save_quick_perms($fid);

			

			

			$plugins->run_hooks("admin_forum_management_start_permissions_commit");

// Log admin action

			$plugins->run_hooks("admin_forum_management_start_permissions_commit");

// Log admin action

Zeile 1720Zeile 1729
					$mid = $db->insert_query("moderators", $new_mod);
$db->update_query("users", array('usergroup' => 6), "uid='{$user['uid']}' AND usergroup='2'");
$cache->update_moderators();

					$mid = $db->insert_query("moderators", $new_mod);
$db->update_query("users", array('usergroup' => 6), "uid='{$user['uid']}' AND usergroup='2'");
$cache->update_moderators();

					

					

					$plugins->run_hooks("admin_forum_management_start_moderators_commit");

// Log admin action

					$plugins->run_hooks("admin_forum_management_start_moderators_commit");

// Log admin action

Zeile 1728Zeile 1737
					
flash_message($lang->success_moderator_added, 'success');
admin_redirect("index.php?module=forum/management&action=editmod&mid={$mid}");

					
flash_message($lang->success_moderator_added, 'success');
admin_redirect("index.php?module=forum/management&action=editmod&mid={$mid}");

				}

				}

				else
{
flash_message($lang->error_moderator_already_added, 'error');
admin_redirect("index.php?module=forum/management&fid={$fid}#tab_moderators");

				else
{
flash_message($lang->error_moderator_already_added, 'error');
admin_redirect("index.php?module=forum/management&fid={$fid}#tab_moderators");

				}

				}

			}
else
{

			}
else
{

Zeile 1759Zeile 1768
			
flash_message($lang->success_forum_disporder_updated, 'success');
admin_redirect("index.php?module=forum/management&fid=".$mybb->input['fid']);

			
flash_message($lang->success_forum_disporder_updated, 'success');
admin_redirect("index.php?module=forum/management&fid=".$mybb->input['fid']);

			}
}
}

if($fid)
{
$page->add_breadcrumb_item($lang->view_forum, "index.php?module=forum/management");

			}
}
}

if($fid)
{
$page->add_breadcrumb_item($lang->view_forum, "index.php?module=forum/management");

	}

$page->output_header($lang->forum_management);

	}

$page->output_header($lang->forum_management);

Zeile 1781Zeile 1790
	
$form = new Form("index.php?module=forum/management", "post", "management");
echo $form->generate_hidden_field("fid", $mybb->input['fid']);

	
$form = new Form("index.php?module=forum/management", "post", "management");
echo $form->generate_hidden_field("fid", $mybb->input['fid']);

	
if($fid)
{

	
if($fid)
{

		$tabs = array(
'subforums' => $lang->subforums,
'permissions' => $lang->forum_permissions,

		$tabs = array(
'subforums' => $lang->subforums,
'permissions' => $lang->forum_permissions,

Zeile 1816Zeile 1825
		$form_container->output_cell($lang->no_forums, array('colspan' => 3));
$form_container->construct_row();
$submit_options = array('disabled' => true);

		$form_container->output_cell($lang->no_forums, array('colspan' => 3));
$form_container->construct_row();
$submit_options = array('disabled' => true);

	}

$form_container->end();


	}

$form_container->end();


	$buttons[] = $form->generate_submit_button($lang->update_forum_orders, $submit_options);
$buttons[] = $form->generate_reset_button($lang->reset);


	$buttons[] = $form->generate_submit_button($lang->update_forum_orders, $submit_options);
$buttons[] = $form->generate_reset_button($lang->reset);


	$form->output_submit_wrapper($buttons);


	$form->output_submit_wrapper($buttons);


	if(!$fid)

	if(!$fid)

	{

	{

		$form->end();
}


		$form->end();
}


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

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

		{

		{

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


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


Zeile 1892Zeile 1901
				if(!$perms)
{
$perms = $usergroup;

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

					$default_checked = true;

					$default_checked = true;

				}
}
else

				}
}
else

Zeile 1901Zeile 1910
				{
$perms = $existing_permissions[$usergroup['gid']];
$default_checked = false;

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

				}

				}

				elseif($cached_forum_perms[$forum_data['fid']][$usergroup['gid']])
{
$perms = $cached_forum_perms[$forum_data['fid']][$usergroup['gid']];

				elseif($cached_forum_perms[$forum_data['fid']][$usergroup['gid']])
{
$perms = $cached_forum_perms[$forum_data['fid']][$usergroup['gid']];

Zeile 1910Zeile 1919
				else if($cached_forum_perms[$forum_data['pid']][$usergroup['gid']])
{
$perms = $cached_forum_perms[$forum_data['pid']][$usergroup['gid']];

				else if($cached_forum_perms[$forum_data['pid']][$usergroup['gid']])
{
$perms = $cached_forum_perms[$forum_data['pid']][$usergroup['gid']];

					$default_checked = true;
}

					$default_checked = true;
}

				
if(!$perms)
{

				
if(!$perms)
{

Zeile 1919Zeile 1928
					$default_checked = true;
}
}

					$default_checked = true;
}
}

 
			
$all_check = "";

			$perm_check = "";
$all_checked = true;
foreach($field_list as $forum_permission)

			$perm_check = "";
$all_checked = true;
foreach($field_list as $forum_permission)

Zeile 1964Zeile 1975
			{
$form_container->output_cell("<a href=\"index.php?module=forum/management&amp;action=permissions&amp;gid={$usergroup['gid']}&amp;fid={$fid}\">{$lang->set_permissions}</a>", array("class" => "align_center"));
}

			{
$form_container->output_cell("<a href=\"index.php?module=forum/management&amp;action=permissions&amp;gid={$usergroup['gid']}&amp;fid={$fid}\">{$lang->set_permissions}</a>", array("class" => "align_center"));
}

			$form_container->construct_row();
}

			$form_container->construct_row();
}

		$form_container->end();

$buttons = array();

		$form_container->end();

$buttons = array();

Zeile 1998Zeile 2009
		{
$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();


		}

$form_container->end();


		$buttons = array();
$form = new Form("index.php?module=forum/management", "post", "management");
echo $form->generate_hidden_field("fid", $mybb->input['fid']);

		$buttons = array();
$form = new Form("index.php?module=forum/management", "post", "management");
echo $form->generate_hidden_field("fid", $mybb->input['fid']);

Zeile 2043Zeile 2054

foreach($forum_cache as $forum)
{


foreach($forum_cache as $forum)
{

			$forums_by_parent[$forum['pid']][$val['disporder']][$forum['fid']] = $forum;

			$forums_by_parent[$forum['pid']][$forum['disporder']][$forum['fid']] = $forum;

		}
}


		}
}


Zeile 2056Zeile 2067
	{
foreach($children as $forum)
{

	{
foreach($children as $forum)
{

			$forum['name'] = htmlspecialchars_uni($forum['name']);


			$forum['name'] = preg_replace("#&(?!\#[0-9]+;)#si", "&amp;", $forum['name']);


			if($forum['active'] == 0)
{
$forum['name'] = "<em>".$forum['name']."</em>";

			if($forum['active'] == 0)
{
$forum['name'] = "<em>".$forum['name']."</em>";

Zeile 2150Zeile 2161
				++$donecount;
if($donecount == $mybb->settings['subforumsindex'])
{

				++$donecount;
if($donecount == $mybb->settings['subforumsindex'])
{

					if(count($children) > $donecount)

					if(subforums_count($forums_by_parent[$pid]) > $donecount)

					{

					{

						$sub_forums .= $comma.$lang->sprintf($lang->more_subforums, (count($children) - $donecount));

						$sub_forums .= $comma.$lang->sprintf($lang->more_subforums, (subforums_count($forums_by_parent[$pid]) - $donecount));

						return;
}
}

						return;
}
}