Vergleich moderation.php - 1.6.5 - 1.6.9

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: moderation.php 5587 2011-09-13 14:48:33Z Tomm $

 * $Id$

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 209Zeile 209
			
if($mybb->input['type'] == 'move')
{

			
if($mybb->input['type'] == 'move')
{

				$query = $db->simple_select("forums", "*", "fid='{$fid}'");
$newforum = $db->fetch_array($query);
if($newforum['type'] != 'f')

				$newforum = get_forum($fid);
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')


				{
$errors[] = $lang->error_invalidforum;
}

				{
$errors[] = $lang->error_invalidforum;
}

Zeile 919Zeile 918
			error_no_permission();
}


			error_no_permission();
}


		$query = $db->simple_select("forums", "*", "fid='$moveto'");
$newforum = $db->fetch_array($query);
if($newforum['type'] != "f")

		$newforum = get_forum($moveto);
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')


		{
error($lang->error_invalidforum);
}

		{
error($lang->error_invalidforum);
}

Zeile 959Zeile 957
	case "threadnotes":
add_breadcrumb($lang->nav_threadnotes);
if(!is_moderator($fid, "canmanagethreads"))

	case "threadnotes":
add_breadcrumb($lang->nav_threadnotes);
if(!is_moderator($fid, "canmanagethreads"))

		{

		{

			error_no_permission();
}
$thread['notes'] = htmlspecialchars_uni($parser->parse_badwords($thread['notes']));

			error_no_permission();
}
$thread['notes'] = htmlspecialchars_uni($parser->parse_badwords($thread['notes']));

Zeile 997Zeile 995
			$trow = alt_trow();
}
if(!$modactions)

			$trow = alt_trow();
}
if(!$modactions)

		{

		{

			$modactions = "<tr><td class=\"trow1\" colspan=\"4\">$lang->no_mod_options</td></tr>";
}


			$modactions = "<tr><td class=\"trow1\" colspan=\"4\">$lang->no_mod_options</td></tr>";
}


Zeile 1033Zeile 1031
		{
case "pgsql":
case "sqlite":

		{
case "pgsql":
case "sqlite":

				$query = $db->query("
SELECT d.*, u.username, t.subject AS tsubject, f.name AS fname
FROM ".TABLE_PREFIX."delayedmoderation d

				$query = $db->query("
SELECT d.*, u.username, t.subject AS tsubject, f.name AS fname
FROM ".TABLE_PREFIX."delayedmoderation d

					LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=d.tids)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid)

					LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=d.tids)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid)

Zeile 1072Zeile 1070
			}

if($delayedmod['fname'])

			}

if($delayedmod['fname'])

			{

			{

				$info .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($delayedmod['fid'])."\">".htmlspecialchars_uni($delayedmod['fname'])."</a><br />";
}
$delayedmod['inputs'] = unserialize($delayedmod['inputs']);

				$info .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($delayedmod['fid'])."\">".htmlspecialchars_uni($delayedmod['fname'])."</a><br />";
}
$delayedmod['inputs'] = unserialize($delayedmod['inputs']);

Zeile 1097Zeile 1095
		if(!$delayedmods)
{
$delayedmods = "<tr><td class=\"trow1\" colspan=\"4\">{$lang->no_delayed_mods}</td></tr>";

		if(!$delayedmods)
{
$delayedmods = "<tr><td class=\"trow1\" colspan=\"4\">{$lang->no_delayed_mods}</td></tr>";

		}

		}


$plugins->run_hooks("moderation_threadnotes");



$plugins->run_hooks("moderation_threadnotes");


Zeile 1112Zeile 1110
		verify_post_check($mybb->input['my_post_key']);

if(!is_moderator($fid, "canmanagethreads"))

		verify_post_check($mybb->input['my_post_key']);

if(!is_moderator($fid, "canmanagethreads"))

		{
error_no_permission();
}

		{
error_no_permission();
}


$plugins->run_hooks("moderation_do_threadnotes");



$plugins->run_hooks("moderation_do_threadnotes");


Zeile 1130Zeile 1128
	case "getip":
add_breadcrumb($lang->nav_getip);
if(!is_moderator($fid, "canviewips"))

	case "getip":
add_breadcrumb($lang->nav_getip);
if(!is_moderator($fid, "canviewips"))

		{

		{

			error_no_permission();

			error_no_permission();

		}


		}


		$hostname = @gethostbyaddr($post['ipaddress']);
if(!$hostname || $hostname == $post['ipaddress'])
{
$hostname = $lang->resolve_fail;
}

		$hostname = @gethostbyaddr($post['ipaddress']);
if(!$hostname || $hostname == $post['ipaddress'])
{
$hostname = $lang->resolve_fail;
}

 

$username = build_profile_link($post['username'], $post['uid']);


// Moderator options
$modoptions = "";


// Moderator options
$modoptions = "";

Zeile 1350Zeile 1350
		{
$moveto = $fid;
}

		{
$moveto = $fid;
}

		$query = $db->simple_select("forums", "fid", "fid='$moveto'", array('limit' => 1));
if($db->num_rows($query) == 0)



$newforum = get_forum($moveto);
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')

		{
error($lang->error_invalidforum);
}

		{
error($lang->error_invalidforum);
}

Zeile 1504Zeile 1505
		break;

// Close threads - Inline moderation

		break;

// Close threads - Inline moderation

	case "multiclosethreads":

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

if(!empty($mybb->input['searchid']))
{
// From search page
$threads = getids($mybb->input['searchid'], 'search');
if(!is_moderator_by_tids($threads, 'canmanagethreads'))
{
error_no_permission();
}
}
else
{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canmanagethreads'))
{
error_no_permission();
}
}
if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected);
}

	case "multiclosethreads":

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

if(!empty($mybb->input['searchid']))
{
// From search page
$threads = getids($mybb->input['searchid'], 'search');
if(!is_moderator_by_tids($threads, 'canmanagethreads'))
{
error_no_permission();
}
}
else
{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canmanagethreads'))
{
error_no_permission();
}
}
if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected);
}


$moderation->close_threads($threads);

log_moderator_action($modlogdata, $lang->multi_closed_threads);
if($mybb->input['inlinetype'] == 'search')


$moderation->close_threads($threads);

log_moderator_action($modlogdata, $lang->multi_closed_threads);
if($mybb->input['inlinetype'] == 'search')

		{

		{

			clearinline($mybb->input['searchid'], 'search');

			clearinline($mybb->input['searchid'], 'search');

		}

		}

		else
{
clearinline($fid, 'forum');

		else
{
clearinline($fid, 'forum');

Zeile 1546Zeile 1547
		break;

// Approve threads - Inline moderation

		break;

// Approve threads - Inline moderation

	case "multiapprovethreads":

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

if(!empty($mybb->input['searchid']))
{
// From search page
$threads = getids($mybb->input['searchid'], 'search');
if(!is_moderator_by_tids($threads, 'canmanagethreads'))
{
error_no_permission();
}
}
else
{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canmanagethreads'))
{
error_no_permission();

	case "multiapprovethreads":

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

if(!empty($mybb->input['searchid']))
{
// From search page
$threads = getids($mybb->input['searchid'], 'search');
if(!is_moderator_by_tids($threads, 'canmanagethreads'))
{
error_no_permission();
}
}
else
{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canmanagethreads'))
{
error_no_permission();

			}
}
if(count($threads) < 1)

			}
}
if(count($threads) < 1)

Zeile 1576Zeile 1577
		$moderation->approve_threads($threads, $fid);

log_moderator_action($modlogdata, $lang->multi_approved_threads);

		$moderation->approve_threads($threads, $fid);

log_moderator_action($modlogdata, $lang->multi_approved_threads);

		if($mybb->input['inlinetype'] == 'search')
{
clearinline($mybb->input['searchid'], 'search');
}
else
{
clearinline($fid, 'forum');
}
$cache->update_stats();

		if($mybb->input['inlinetype'] == 'search')
{
clearinline($mybb->input['searchid'], 'search');
}
else
{
clearinline($fid, 'forum');
}
$cache->update_stats();

		moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved);
break;

		moderation_redirect(get_forum_link($fid), $lang->redirect_inline_threadsapproved);
break;





	// Unapprove threads - Inline moderation
case "multiunapprovethreads":


	// Unapprove threads - Inline moderation
case "multiunapprovethreads":


Zeile 1599Zeile 1600
			// From search page
$threads = getids($mybb->input['searchid'], 'search');
if(!is_moderator_by_tids($threads, 'canmanagethreads'))

			// From search page
$threads = getids($mybb->input['searchid'], 'search');
if(!is_moderator_by_tids($threads, 'canmanagethreads'))

			{
error_no_permission();
}
}
else

			{
error_no_permission();
}
}
else

		{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canmanagethreads'))

		{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canmanagethreads'))

Zeile 1615Zeile 1616
		{
error($lang->error_inline_nothreadsselected);
}

		{
error($lang->error_inline_nothreadsselected);
}





		$moderation->unapprove_threads($threads, $fid);

log_moderator_action($modlogdata, $lang->multi_unapproved_threads);

		$moderation->unapprove_threads($threads, $fid);

log_moderator_action($modlogdata, $lang->multi_unapproved_threads);

		if($mybb->input['inlinetype'] == 'search')
{
clearinline($mybb->input['searchid'], 'search');
}

		if($mybb->input['inlinetype'] == 'search')
{
clearinline($mybb->input['searchid'], 'search');
}

		else
{
clearinline($fid, 'forum');

		else
{
clearinline($fid, 'forum');

Zeile 1674Zeile 1675
		break;

// Unstick threads - Inline moderaton

		break;

// Unstick threads - Inline moderaton

	case "multiunstickthreads":

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	case "multiunstickthreads":

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


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

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

		{

		{

			// From search page
$threads = getids($mybb->input['searchid'], 'search');
if(!is_moderator_by_tids($threads, 'canopenclosethreads'))

			// From search page
$threads = getids($mybb->input['searchid'], 'search');
if(!is_moderator_by_tids($threads, 'canopenclosethreads'))

Zeile 1688Zeile 1689
				error_no_permission();
}
}

				error_no_permission();
}
}

		else
{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canopenclosethreads'))
{
error_no_permission();
}
}
if(count($threads) < 1)

		else
{
$threads = getids($fid, 'forum');
if(!is_moderator($fid, 'canopenclosethreads'))
{
error_no_permission();
}
}
if(count($threads) < 1)

		{
error($lang->error_inline_nothreadsselected);
}

		{
error($lang->error_inline_nothreadsselected);
}

Zeile 1735Zeile 1736
			{
error_no_permission();
}

			{
error_no_permission();
}

		}

		}

		
if(count($threads) < 1)

		
if(count($threads) < 1)

		{

		{

			error($lang->error_inline_nothreadsselected);

			error($lang->error_inline_nothreadsselected);

		}

		}

		$inlineids = implode("|", $threads);
if($mybb->input['inlinetype'] == 'search')

		$inlineids = implode("|", $threads);
if($mybb->input['inlinetype'] == 'search')

		{

		{

			clearinline($mybb->input['searchid'], 'search');

			clearinline($mybb->input['searchid'], 'search');

		}

		}

		else
{
clearinline($fid, 'forum');

		else
{
clearinline($fid, 'forum');

Zeile 1754Zeile 1755
		$return_url = htmlspecialchars_uni($mybb->input['url']);
eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";");
output_page($movethread);

		$return_url = htmlspecialchars_uni($mybb->input['url']);
eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";");
output_page($movethread);

		break;

		break;


// Actually move the threads in Inline moderation
case "do_multimovethreads":


// Actually move the threads in Inline moderation
case "do_multimovethreads":

Zeile 1780Zeile 1781
		}

$newforum = get_forum($moveto);

		}

$newforum = get_forum($moveto);

		if($newforum['type'] != "f")

		if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')

		{
error($lang->error_invalidforum);
}

		{
error($lang->error_invalidforum);
}

Zeile 1812Zeile 1813
		if(!is_moderator_by_pids($posts, "candeleteposts"))
{
error_no_permission();

		if(!is_moderator_by_pids($posts, "candeleteposts"))
{
error_no_permission();

		}

		}

		$inlineids = implode("|", $posts);
if($mybb->input['inlinetype'] == 'search')

		$inlineids = implode("|", $posts);
if($mybb->input['inlinetype'] == 'search')

		{

		{

			clearinline($mybb->input['searchid'], 'search');

			clearinline($mybb->input['searchid'], 'search');

		}

		}

		else
{
clearinline($tid, 'thread');

		else
{
clearinline($tid, 'thread');

Zeile 1830Zeile 1831
		break;

// Actually delete the posts in inline moderation

		break;

// Actually delete the posts in inline moderation

	case "do_multideleteposts":

	case "do_multideleteposts":


// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

Zeile 2127Zeile 2128
		{
$moveto = $fid;
}

		{
$moveto = $fid;
}

		$query = $db->simple_select("forums", "COUNT(fid) as count", "fid='$moveto'");
if($db->fetch_field($query, 'count') == 0)



$newforum = get_forum($moveto);
if(!$newforum || $newforum['type'] != "f" || $newforum['type'] == "f" && $newforum['linkto'] != '')

		{
error($lang->error_invalidforum);
}

		{
error($lang->error_invalidforum);
}

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

 




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

		$newtid = $moderation->split_posts($plist, $tid, $moveto, $newsubject);

$pid_list = implode(', ', $plist);

		$newtid = $moderation->split_posts($plist, $tid, $moveto, $newsubject);

$pid_list = implode(', ', $plist);