Vergleich admin/modules/forum/management.php - 1.4.3 - 1.4.4

  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 4131 2008-08-19 15:31:39Z Tikitiki $

 * $Id: management.php 4249 2008-10-25 05:37:16Z Tikitiki $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 945Zeile 945
			}
}


			}
}


 
		$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 971Zeile 972
				}

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;

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

				}
}
else

				}
}
else

Zeile 990Zeile 991
					$perms_checked[$forum_permission] = 1;
}
else

					$perms_checked[$forum_permission] = 1;
}
else

				{

				{

					$perms_checked[$forum_permission] = 0;
}
}

					$perms_checked[$forum_permission] = 0;
}
}

Zeile 1066Zeile 1067
		$type = $mybb->input['type'];

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

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

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

		{

		{

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


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


Zeile 1397Zeile 1398
				$default_checked = true;
}
}

				$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
{
$value = "false";
}


			else
{
$value = "false";
}


			if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
{
$value = $mybb->input['permissions'][$usergroup['gid']][$forum_permission];

			if($mybb->input['permissions'][$usergroup['gid']][$forum_permission])
{
$value = $mybb->input['permissions'][$usergroup['gid']][$forum_permission];

Zeile 1423Zeile 1425
				}

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

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

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

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

Zeile 1462Zeile 1464
		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"));

		}

		}

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

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

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

$page->output_footer();

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

$page->output_footer();

}


}


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

$query = $db->simple_select("moderators", "*", "uid='{$mybb->input['uid']}' AND fid='{$mybb->input['fid']}'");
$mod = $db->fetch_array($query);

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

$query = $db->simple_select("moderators", "*", "uid='{$mybb->input['uid']}' AND fid='{$mybb->input['fid']}'");
$mod = $db->fetch_array($query);

	

	

	// Does the forum not exist?
if(!$mod['mid'])
{
flash_message($lang->error_invalid_moderator, 'error');

	// Does the forum not exist?
if(!$mod['mid'])
{
flash_message($lang->error_invalid_moderator, 'error');

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

// User clicked no

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

// User clicked no

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

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

	{

	{

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


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


Zeile 1508Zeile 1510
			WHERE m.mid='{$mid}'
");
$mod = $db->fetch_array($query);

			WHERE m.mid='{$mid}'
");
$mod = $db->fetch_array($query);

		

		

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

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

Zeile 1523Zeile 1525
		$plugins->run_hooks("admin_forum_management_deletemod_commit");

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

		$plugins->run_hooks("admin_forum_management_deletemod_commit");

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

		

		

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


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


Zeile 1552Zeile 1554

// 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")

	}

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

Zeile 1562Zeile 1564
		$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 1588Zeile 1590
		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);

			$query = $db->simple_select("moderators", "*", "fid != '$fid' AND uid IN ($mod_list)");
while($mod = $db->fetch_array($query))
{

			$query = $db->simple_select("moderators", "*", "fid != '$fid' AND uid IN ($mod_list)");
while($mod = $db->fetch_array($query))
{

Zeile 1658Zeile 1660
		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 1919Zeile 1926
					$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)