Vergleich admin/modules/forum/management.php - 1.4.6 - 1.4.13

  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 4349 2009-04-14 19:46:21Z 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 1071Zeile 1071
		{
$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)
{

Zeile 1120Zeile 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 1150Zeile 1160
			}

$cache->update_forums();

			}

$cache->update_forums();

			

			

			$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 1181Zeile 1190
	{
$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))

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

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

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

	{
$existing_permissions[$existing['gid']] = $existing;

	{
$existing_permissions[$existing['gid']] = $existing;

	}

$types = array(

	}

$types = array(

Zeile 1426Zeile 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] = 0;
}
}
else
{
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
{
$perms_checked[$forum_permission] = 0;
}
}
else
{
if($perms[$forum_permission] != 1)
{
$all_checked = false;
}
if($perms[$forum_permission] == 1)
{
$perms_checked[$forum_permission] = 1;
}
else
{

					$perms_checked[$forum_permission] = 0;
}
}
$all_check .= "\$('permissions_{$usergroup['gid']}_{$forum_permission}').checked = \$('permissions_{$usergroup['gid']}_all').checked;\n";
$perm_check .= "\$('permissions_{$usergroup['gid']}_{$forum_permission}').checked = $value;\n";

					$perms_checked[$forum_permission] = 0;
}
}
$all_check .= "\$('permissions_{$usergroup['gid']}_{$forum_permission}').checked = \$('permissions_{$usergroup['gid']}_all').checked;\n";
$perm_check .= "\$('permissions_{$usergroup['gid']}_{$forum_permission}').checked = $value;\n";

		}

		}

		$default_click = "if(this.checked == true) { $perm_check }";
$reset_default = "\$('default_permissions_{$usergroup['gid']}').checked = false; if(this.checked == false) { \$('permissions_{$usergroup['gid']}_all').checked = false; }\n";
$usergroup['title'] = htmlspecialchars_uni($usergroup['title']);

		$default_click = "if(this.checked == true) { $perm_check }";
$reset_default = "\$('default_permissions_{$usergroup['gid']}').checked = false; if(this.checked == false) { \$('permissions_{$usergroup['gid']}_all').checked = false; }\n";
$usergroup['title'] = htmlspecialchars_uni($usergroup['title']);

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

		

		

		if(!$default_checked)
{
$form_container->output_cell("<a href=\"index.php?module=forum/management&amp;action=permissions&amp;pid={$perms['pid']}\">{$lang->edit_permissions}</a>", array("class" => "align_center"));

		if(!$default_checked)
{
$form_container->output_cell("<a href=\"index.php?module=forum/management&amp;action=permissions&amp;pid={$perms['pid']}\">{$lang->edit_permissions}</a>", array("class" => "align_center"));

Zeile 1492Zeile 1501
	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=".$mybb->input['fid']);

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

	}

// User clicked no

	}

// User clicked no

Zeile 1538Zeile 1547
		$page->output_confirm_action("index.php?module=forum/management&amp;action=deletemod&amp;fid={$mod['fid']}&amp;uid={$mod['uid']}", $lang->confirm_moderator_deletion);
}
}

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





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

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

Zeile 1565Zeile 1574
		$forum_info = get_forum($fid);
// Delete the forum
$db->delete_query("forums", "fid='$fid'");

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

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

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

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

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

Zeile 1943Zeile 1952
					$value = "false";
}
if($perms[$forum_permission] != 1)

					$value = "false";
}
if($perms[$forum_permission] != 1)

				{

				{

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

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

Zeile 2067Zeile 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>";