Vergleich admin/modules/forum/management.php - 1.4.0 - 1.4.12

  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 4049 2008-07-26 22:11:03Z Tikitiki $

 * $Id: management.php 4770 2010-02-05 12:10:08Z Huji $

 */

// 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 618Zeile 618
		
if(!$errors)
{

		
if(!$errors)
{

 
			if($pid < 0)
{
$pid = 0;
}

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

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

Zeile 641Zeile 645
				"modthreads" => intval($mybb->input['modthreads']),
"mod_edit_posts" => intval($mybb->input['mod_edit_posts']),
"modattachments" => intval($mybb->input['modattachments']),

				"modthreads" => intval($mybb->input['modthreads']),
"mod_edit_posts" => intval($mybb->input['mod_edit_posts']),
"modattachments" => intval($mybb->input['modattachments']),

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

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

				"overridestyle" => intval($mybb->input['overridestyle']),
"rulestype" => intval($mybb->input['rulestype']),
"rulestitle" => $db->escape_string($mybb->input['rulestitle']),

				"overridestyle" => intval($mybb->input['overridestyle']),
"rulestype" => intval($mybb->input['rulestype']),
"rulestitle" => $db->escape_string($mybb->input['rulestitle']),

Zeile 682Zeile 686
			save_quick_perms($fid);

$plugins->run_hooks("admin_forum_management_add_commit");

			save_quick_perms($fid);

$plugins->run_hooks("admin_forum_management_add_commit");

			

			

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


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


Zeile 794Zeile 798
		$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('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
);


	$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'];
}

	$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'];
}

	

	

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

$display_methods = array(

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

Zeile 861Zeile 865
		$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>");


Zeile 886Zeile 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 930Zeile 935
			}
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;
}

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

$perm_check = "";
$all_checked = true;
foreach($field_list as $forum_permission)
{
if($usergroup[$forum_permission] == 1)
{
$value = "true";
}
else
{
$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'])
{
$all_checked = false;
}

if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
{
$perms_checked[$forum_permission] = 1;
}
else
{
$perms_checked[$forum_permission] = 0;
}
}
else
{


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

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

$all_check = "";
$perm_check = "";
$all_checked = true;
foreach($field_list as $forum_permission)
{
if($usergroup[$forum_permission] == 1)
{
$value = "true";
}
else
{
$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'])
{
$all_checked = false;
}

if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
{
$perms_checked[$forum_permission] = 1;
}
else
{
$perms_checked[$forum_permission] = 0;
}
}
else
{

				if($perms[$forum_permission] != 1)
{
$all_checked = false;

				if($perms[$forum_permission] != 1)
{
$all_checked = false;

Zeile 1018Zeile 1024
	$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 1030Zeile 1036
		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");
}

	

	

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

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

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

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

Zeile 1038Zeile 1044
		if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;

		if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;

		}

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

		}

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

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

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

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

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

				}
}
}

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


				}
}
}

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


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

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

		{

		{

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

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

 
		
if($type == 'c' && $forum_data['type'] == 'f')
{
$query = $db->simple_select('threads', 'COUNT(tid) as num_threads', "fid = '{$fid}'");
if($db->fetch_field($query, "num_threads") > 0)
{
$errors[] = $lang->error_not_empty;
}
}

		
if(!$errors)
{

		
if(!$errors)
{

 
			if($pid < 0)
{
$pid = 0;
}

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

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

Zeile 1090Zeile 1109
				"modthreads" => intval($mybb->input['modthreads']),
"mod_edit_posts" => intval($mybb->input['mod_edit_posts']),
"modattachments" => intval($mybb->input['modattachments']),

				"modthreads" => intval($mybb->input['modthreads']),
"mod_edit_posts" => intval($mybb->input['mod_edit_posts']),
"modattachments" => intval($mybb->input['modattachments']),

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

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

				"overridestyle" => intval($mybb->input['overridestyle']),
"rulestype" => intval($mybb->input['rulestype']),
"rulestitle" => $db->escape_string($mybb->input['rulestitle']),

				"overridestyle" => intval($mybb->input['overridestyle']),
"rulestype" => intval($mybb->input['rulestype']),
"rulestitle" => $db->escape_string($mybb->input['rulestitle']),

Zeile 1110Zeile 1129
				{
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 1120Zeile 1140
				{
$db->update_query("forums", array("parentlist" => make_parent_list($child['fid'])), "fid='{$child['fid']}'", 1);
}

				{
$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['permissions'] as $gid => $permission)
{
foreach(array('canview','canpostthreads','canpostreplys','canpostpolls','canpostattachments') as $name)

			foreach($mybb->input['permissions'] as $gid => $permission)
{
foreach(array('canview','canpostthreads','canpostreplys','canpostpolls','canpostattachments') as $name)

Zeile 1131Zeile 1151
					if($permission[$name])
{
$permissions[$name][$gid] = 1;

					if($permission[$name])
{
$permissions[$name][$gid] = 1;

					}

					}

					else
{
$permissions[$name][$gid] = 0;
}
}
}

					else
{
$permissions[$name][$gid] = 0;
}
}
}

			

			

			$cache->update_forums();

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

			$cache->update_forums();

$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 1389Zeile 1408
				$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 1415Zeile 1435
				}

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

				}

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

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

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

				{
$perms_checked[$forum_permission] = 0;

				{
$perms_checked[$forum_permission] = 0;

				}

				}

			}
else
{

			}
else
{

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

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

				}

				}

				else
{
$perms_checked[$forum_permission] = 0;

				else
{
$perms_checked[$forum_permission] = 0;

Zeile 1462Zeile 1482
		$form_container->construct_row();
}
$form_container->end();

		$form_container->construct_row();
}
$form_container->end();

	

	

	$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();

Zeile 1503Zeile 1523
		
$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"
);
$db->update_query("users", $updatequery, "uid='{$mod['uid']}' AND usergroup != '4' AND usergroup != '3'");

		{
$updatequery = array(
"usergroup" => "2"
);
$db->update_query("users", $updatequery, "uid='{$mod['uid']}' AND usergroup != '4' AND usergroup != '3'");

		}
$cache->update_moderators();

$plugins->run_hooks("admin_forum_management_deletemod_commit");

		}
$cache->update_moderators();

$plugins->run_hooks("admin_forum_management_deletemod_commit");

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


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


Zeile 1544Zeile 1564

// 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 1580Zeile 1600
		while($mod = $db->fetch_array($query))
{
$moderators[$mod['uid']] = $mod['uid'];

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

		}


		}


		if(is_array($moderators))
{
$mod_list = implode(",", $moderators);

		if(is_array($moderators))
{
$mod_list = implode(",", $moderators);

Zeile 1618Zeile 1638
		$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 1632Zeile 1653
		admin_redirect("index.php?module=forum/management");
}
else

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

	{

	{

		$page->output_confirm_action("index.php?module=forum/management&amp;action=delete&amp;fid={$forum['fid']}", $lang->confirm_forum_deletion);
}
}

		$page->output_confirm_action("index.php?module=forum/management&amp;action=delete&amp;fid={$forum['fid']}", $lang->confirm_forum_deletion);
}
}

Zeile 1650Zeile 1671
		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 1911Zeile 1937
					$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 1922Zeile 1950
				else
{
$value = "false";

				else
{
$value = "false";

				}

				}

				if($perms[$forum_permission] != 1)
{
$all_checked = false;
}
if($perms[$forum_permission] == 1)

				if($perms[$forum_permission] != 1)
{
$all_checked = false;
}
if($perms[$forum_permission] == 1)

				{

				{

					$perms_checked[$forum_permission] = 1;
}
else

					$perms_checked[$forum_permission] = 1;
}
else

Zeile 1945Zeile 1973
			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'));

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

if(!$default_checked)

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

if(!$default_checked)

Zeile 1979Zeile 2007
			WHERE fid='{$fid}'
");
while($moderator = $db->fetch_array($query))

			WHERE fid='{$fid}'
");
while($moderator = $db->fetch_array($query))

		{

		{

			$form_container->output_cell("<a href=\"index.php?module=user/users&amp;action=edit&amp;uid={$moderator['uid']}\">{$moderator['username']}</a>");
$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;uid={$moderator['uid']}&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=user/users&amp;action=edit&amp;uid={$moderator['uid']}\">{$moderator['username']}</a>");
$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;uid={$moderator['uid']}&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"));

Zeile 2030Zeile 2058
	static $forums_by_parent;

if(!is_array($forums_by_parent))

	static $forums_by_parent;

if(!is_array($forums_by_parent))

	{

	{

		$forum_cache = cache_forums();

foreach($forum_cache as $forum)
{

		$forum_cache = cache_forums();

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;

		}

		}

	}


	}


	if(!is_array($forums_by_parent[$pid]))

	if(!is_array($forums_by_parent[$pid]))

	{

	{

		return;
}


		return;
}


Zeile 2048Zeile 2076
	{
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 2094Zeile 2122
			{
if($forum['description'])
{

			{
if($forum['description'])
{

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

           			$forum['description'] = "<br /><small>".$forum['description']."</small>";
}


           			$forum['description'] = "<br /><small>".$forum['description']."</small>";
}


Zeile 2141Zeile 2170
				++$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;
}
}