Vergleich admin/modules/forum/management.php - 1.6.14 - 1.6.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
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(isset($mybb->input['fid']) && ($mybb->input['action'] == "management" || $mybb->input['action'] == "edit" || $mybb->input['action'] == "copy" || !$mybb->input['action']))

	if(!empty($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 236Zeile 236
	$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{

	$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
while($usergroup = $db->fetch_array($query))
{

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

		$usergroups[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']);

	}

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

	}

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

Zeile 1344Zeile 1344
			if($pid != $forum_data['pid'])
{
// Update the parentlist of this forum.

			if($pid != $forum_data['pid'])
{
// Update the parentlist of this forum.

				$db->update_query("forums", array("parentlist" => make_parent_list($fid)), "fid='{$fid}'", 1);

				$db->update_query("forums", array("parentlist" => make_parent_list($fid)), "fid='{$fid}'");

				
// Rebuild the parentlist of all of the subforums of this forum
switch($db->type)

				
// Rebuild the parentlist of all of the subforums of this forum
switch($db->type)

Zeile 1359Zeile 1359
				
while($child = $db->fetch_array($query))
{

				
while($child = $db->fetch_array($query))
{

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

				}
}


				}
}


Zeile 1854Zeile 1854
		$mod = $db->fetch_array($query);

$db->delete_query("moderators", "mid='{$mid}'");

		$mod = $db->fetch_array($query);

$db->delete_query("moderators", "mid='{$mid}'");

		$query = $db->simple_select("moderators", "*", "id='{$mod['id']}' AND isgroup='0'");
if($db->num_rows($query) == 0)
{
$updatequery = array(
"usergroup" => "2"
);
$db->update_query("users", $updatequery, "uid='{$mod['id']}' 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");

Zeile 1880Zeile 1872
		
flash_message($lang->success_moderator_deleted, 'success');
admin_redirect("index.php?module=forum-management&fid={$fid}#tab_moderators");

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

	}

	}

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

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

Zeile 1898Zeile 1890
	if(!$forum['fid'])
{
flash_message($lang->error_invalid_forum, 'error');

	if(!$forum['fid'])
{
flash_message($lang->error_invalid_forum, 'error');

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

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

	}

// User clicked no

	}

// User clicked no

Zeile 1917Zeile 1909
		
// 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":

Zeile 1936Zeile 1928
			$stats['unapprovedposts'] += $forum['unapprovedposts'];
$stats['threads'] += $forum['threads'];
$stats['unapprovedthreads'] += $forum['unapprovedthreads'];

			$stats['unapprovedposts'] += $forum['unapprovedposts'];
$stats['threads'] += $forum['threads'];
$stats['unapprovedthreads'] += $forum['unapprovedthreads'];

		}

/**
* This slab of code pulls out the moderators for this forum,
* checks if they moderate any other forums, and if they don't
* it moves them back to the registered usergroup
*/

$query = $db->simple_select("moderators", "*", "fid='$fid' AND isgroup='0'");
while($mod = $db->fetch_array($query))
{
$moderators[$mod['id']] = $mod['id'];
}

if(is_array($moderators))
{
$mod_list = implode(",", $moderators);
$query = $db->simple_select("moderators", "*", "fid != '$fid' AND id IN ($mod_list) AND isgroup='0'");
while($mod = $db->fetch_array($query))
{
unset($moderators[$mod['id']]);
}
}

if(is_array($moderators))
{
$mod_list = implode(",", $moderators);
if($mod_list)
{
$updatequery = array(
"usergroup" => "2"
);
$db->update_query("users", $updatequery, "uid IN ($mod_list) AND usergroup='6'");
}

 
		}

switch($db->type)

		}

switch($db->type)

Zeile 2535Zeile 2493

foreach($usergroups as $group)
{


foreach($usergroups as $group)
{

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

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

		}

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

		}

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