Vergleich modcp.php - 1.6.14 - 1.6.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 40Zeile 40
if($mybb->user['uid'] == 0 || $mybb->usergroup['canmodcp'] != 1)
{
error_no_permission();

if($mybb->user['uid'] == 0 || $mybb->usergroup['canmodcp'] != 1)
{
error_no_permission();

 
}

if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)
{
$mybb->settings['threadsperpage'] = 20;
}

if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
{
$mybb->settings['postsperpage'] = 20;

}

$errors = '';

}

$errors = '';

Zeile 127Zeile 137
if($mybb->input['action'] == "reports")
{
add_breadcrumb($lang->mcp_nav_reported_posts, "modcp.php?action=reports");

if($mybb->input['action'] == "reports")
{
add_breadcrumb($lang->mcp_nav_reported_posts, "modcp.php?action=reports");


if(!$mybb->settings['threadsperpage'])
{
$mybb->settings['threadsperpage'] = 20;
}

// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['threadsperpage'];
if($mybb->input['page'] != "last")
{
$page = intval($mybb->input['page']);
}



if(!$mybb->settings['threadsperpage'])
{
$mybb->settings['threadsperpage'] = 20;
}

// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['threadsperpage'];
if($mybb->input['page'] != "last")
{
$page = intval($mybb->input['page']);
}


	$query = $db->simple_select("reportedposts", "COUNT(rid) AS count", "reportstatus ='0'");
$report_count = $db->fetch_field($query, "count");

	$query = $db->simple_select("reportedposts", "COUNT(rid) AS count", "reportstatus ='0'");
$report_count = $db->fetch_field($query, "count");





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

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

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

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

	{

	{

		$query = $db->simple_select("reportedposts", "COUNT(rid) AS count", "rid <= '".$mybb->input['rid']."'");
$result = $db->fetch_field($query, "count");
if(($result % $perpage) == 0)
{
$page = $result / $perpage;

		$query = $db->simple_select("reportedposts", "COUNT(rid) AS count", "rid <= '".$mybb->input['rid']."'");
$result = $db->fetch_field($query, "count");
if(($result % $perpage) == 0)
{
$page = $result / $perpage;

		}

		}

		else
{
$page = intval($result / $perpage) + 1;

		else
{
$page = intval($result / $perpage) + 1;

Zeile 165Zeile 175
	if($mybb->input['page'] == "last")
{
$page = $pages;

	if($mybb->input['page'] == "last")
{
$page = $pages;

	}

	}


if($page > $pages || $page <= 0)
{


if($page > $pages || $page <= 0)
{

Zeile 190Zeile 200
	}

$query = $db->simple_select("forums", "fid, name");

	}

$query = $db->simple_select("forums", "fid, name");

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

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

		$forums[$forum['fid']] = $forum['name'];

		$forums[$forum['fid']] = $forum['name'];

	}

$plugins->run_hooks("modcp_reports_start");

	}

$plugins->run_hooks("modcp_reports_start");


$reports = '';
$query = $db->query("


$reports = '';
$query = $db->query("

Zeile 226Zeile 236

$report['postlink'] = get_post_link($report['pid'], $report['tid']);
$report['threadlink'] = get_thread_link($report['tid']);


$report['postlink'] = get_post_link($report['pid'], $report['tid']);
$report['threadlink'] = get_thread_link($report['tid']);





			$report['posterlink'] = get_profile_link($report['postuid']);
if(!$report['postuid'])

			$report['posterlink'] = get_profile_link($report['postuid']);
if(!$report['postuid'])

			{

			{

				$report['posterlink'] = $report['postlink'];
$report['postusername'] = $lang->guest;

				$report['posterlink'] = $report['postlink'];
$report['postusername'] = $lang->guest;

			}

$report['reporterlink'] = get_profile_link($report['uid']);
if($report['uid'] > 0 && !$report['username'])
{
$report['reporterlink'] = $report['postlink'];
$report['username'] = $lang->na_deleted;
}

$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']);
$reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);

			}

$report['reporterlink'] = get_profile_link($report['uid']);
if($report['uid'] > 0 && !$report['username'])
{
$report['reporterlink'] = $report['postlink'];
$report['username'] = $lang->na_deleted;
}

$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']);
$reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);

			$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));

eval("\$reports .= \"".$templates->get("modcp_reports_report")."\";");

			$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));

eval("\$reports .= \"".$templates->get("modcp_reports_report")."\";");

Zeile 262Zeile 272
	if(!$mybb->settings['threadsperpage'])
{
$mybb->settings['threadsperpage'] = 20;

	if(!$mybb->settings['threadsperpage'])
{
$mybb->settings['threadsperpage'] = 20;

	}

	}


// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['threadsperpage'];


// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['threadsperpage'];

Zeile 289Zeile 299
		}
}
$postcount = intval($warnings);

		}
}
$postcount = intval($warnings);

	$pages = $postcount / $perpage;
$pages = ceil($pages);

if($mybb->input['page'] == "last")
{
$page = $pages;

	$pages = $postcount / $perpage;
$pages = ceil($pages);

if($mybb->input['page'] == "last")
{
$page = $pages;

	}

if($page > $pages || $page <= 0)

	}

if($page > $pages || $page <= 0)

Zeile 398Zeile 408
	}

$where = '';

	}

$where = '';





	// Searching for entries by a particular user
if($mybb->input['uid'])
{

	// Searching for entries by a particular user
if($mybb->input['uid'])
{

Zeile 430Zeile 440
	if($order != "asc")
{
$order = "desc";

	if($order != "asc")
{
$order = "desc";

	}

	}


$plugins->run_hooks("modcp_modlogs_start");



$plugins->run_hooks("modcp_modlogs_start");


Zeile 450Zeile 460
	}

$postcount = intval($rescount);

	}

$postcount = intval($rescount);

	$pages = $postcount / $perpage;
$pages = ceil($pages);

if($mybb->input['page'] == "last")
{
$page = $pages;
}

if($page > $pages || $page <= 0)
{
$page = 1;
}

if($page)
{
$start = ($page-1) * $perpage;
}
else
{
$start = 0;

	$pages = $postcount / $perpage;
$pages = ceil($pages);

if($mybb->input['page'] == "last")
{
$page = $pages;
}

if($page > $pages || $page <= 0)
{
$page = 1;
}

if($page)
{
$start = ($page-1) * $perpage;
}
else
{
$start = 0;

		$page = 1;
}


		$page = 1;
}


Zeile 479Zeile 489
		eval("\$resultspages = \"".$templates->get("modcp_modlogs_multipage")."\";");
}
$query = $db->query("

		eval("\$resultspages = \"".$templates->get("modcp_modlogs_multipage")."\";");
}
$query = $db->query("

		SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname, p.subject AS psubject

		SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname

		FROM ".TABLE_PREFIX."moderatorlog l
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid)

		FROM ".TABLE_PREFIX."moderatorlog l
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid)

		LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=l.pid)

 
		WHERE 1=1 {$where}{$tflist}
ORDER BY {$sortby} {$order}
LIMIT {$start}, {$perpage}

		WHERE 1=1 {$where}{$tflist}
ORDER BY {$sortby} {$order}
LIMIT {$start}, {$perpage}

Zeile 505Zeile 514
		if($logitem['fname'])
{
$information .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($logitem['fid'])."\" target=\"_blank\">{$logitem['fname']}</a><br />";

		if($logitem['fname'])
{
$information .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($logitem['fid'])."\" target=\"_blank\">{$logitem['fname']}</a><br />";

		}
if($logitem['psubject'])
{
$information .= "<strong>{$lang->post}</strong> <a href=\"".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\">".htmlspecialchars_uni($logitem['psubject'])."</a>";

 
		}

// Edited a user or managed announcement?

		}

// Edited a user or managed announcement?

		if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])

		if(!$logitem['tsubject'] || !$logitem['fname'])

		{
$data = unserialize($logitem['data']);
if($data['uid'])

		{
$data = unserialize($logitem['data']);
if($data['uid'])

Zeile 567Zeile 572
}

if($mybb->input['action'] == "do_delete_announcement")

}

if($mybb->input['action'] == "do_delete_announcement")

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

$aid = intval($mybb->input['aid']);
$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");
$announcement = $db->fetch_array($query);

if(!$announcement['aid'])
{
error($lang->error_invalid_announcement);
}
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
{
error_no_permission();
}


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

$aid = intval($mybb->input['aid']);
$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");
$announcement = $db->fetch_array($query);

if(!$announcement['aid'])
{
error($lang->error_invalid_announcement);
}
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
{
error_no_permission();
}


	$plugins->run_hooks("modcp_do_delete_announcement");

$db->delete_query("announcements", "aid='{$aid}'");
log_moderator_action(array("aid" => $announcement['aid'], "subject" => $announcement['subject']), $lang->announcement_deleted);
$cache->update_forumsdisplay();

	$plugins->run_hooks("modcp_do_delete_announcement");

$db->delete_query("announcements", "aid='{$aid}'");
log_moderator_action(array("aid" => $announcement['aid'], "subject" => $announcement['subject']), $lang->announcement_deleted);
$cache->update_forumsdisplay();





	redirect("modcp.php?action=announcements", $lang->redirect_delete_announcement);
}


	redirect("modcp.php?action=announcements", $lang->redirect_delete_announcement);
}


Zeile 606Zeile 611
	}

if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))

	}

if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))

	{
error_no_permission();
}


	{
error_no_permission();
}


	$plugins->run_hooks("modcp_delete_announcement");

eval("\$announcements = \"".$templates->get("modcp_announcements_delete")."\";");
output_page($announcements);
}

	$plugins->run_hooks("modcp_delete_announcement");

eval("\$announcements = \"".$templates->get("modcp_announcements_delete")."\";");
output_page($announcements);
}





if($mybb->input['action'] == "do_new_announcement")
{
verify_post_check($mybb->input['my_post_key']);

$announcement_fid = intval($mybb->input['fid']);
if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid)) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))

if($mybb->input['action'] == "do_new_announcement")
{
verify_post_check($mybb->input['my_post_key']);

$announcement_fid = intval($mybb->input['fid']);
if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid)) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))

	{

	{

		error_no_permission();
}


		error_no_permission();
}


Zeile 634Zeile 639
	if(!trim($mybb->input['message']))
{
$errors[] = $lang->error_missing_message;

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

	}


	}


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

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

Zeile 661Zeile 666
		if($enddate[0] >= 24)
{
$enddate[0] = "00";

		if($enddate[0] >= 24)
{
$enddate[0] = "00";

		}
}

		}
}


$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
if(!in_array($mybb->input['starttime_month'], $months))
{
$mybb->input['starttime_month'] = 1;


$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
if(!in_array($mybb->input['starttime_month'], $months))
{
$mybb->input['starttime_month'] = 1;

	}


	}


	$startdate = gmmktime(intval($startdate[0]), intval($startdate[1]), 0, (int)$mybb->input['starttime_month'], intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year']));
if(!checkdate(intval($mybb->input['starttime_month']), intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year'])) || $startdate < 0 || $startdate == false)
{

	$startdate = gmmktime(intval($startdate[0]), intval($startdate[1]), 0, (int)$mybb->input['starttime_month'], intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year']));
if(!checkdate(intval($mybb->input['starttime_month']), intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year'])) || $startdate < 0 || $startdate == false)
{

Zeile 688Zeile 693
		}
$enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
if(!checkdate(intval($mybb->input['endtime_month']), intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year'])) || $enddate < 0 || $enddate == false)

		}
$enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
if(!checkdate(intval($mybb->input['endtime_month']), intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year'])) || $enddate < 0 || $enddate == false)

		{

		{

			$errors[] = $lang->error_invalid_end_date;

			$errors[] = $lang->error_invalid_end_date;

		}

		}

		if($enddate <= $startdate)
{
$errors[] = $lang->error_end_before_start;
}

		if($enddate <= $startdate)
{
$errors[] = $lang->error_end_before_start;
}

	}

	}


$plugins->run_hooks("modcp_do_new_announcement_start");



$plugins->run_hooks("modcp_do_new_announcement_start");


Zeile 715Zeile 720
		$aid = $db->insert_query("announcements", $insert_announcement);

log_moderator_action(array("aid" => $aid, "subject" => $db->escape_string($mybb->input['title'])), $lang->announcement_added);

		$aid = $db->insert_query("announcements", $insert_announcement);

log_moderator_action(array("aid" => $aid, "subject" => $db->escape_string($mybb->input['title'])), $lang->announcement_added);





		$plugins->run_hooks("modcp_do_new_announcement_end");

$cache->update_forumsdisplay();
redirect("modcp.php?action=announcements", $lang->redirect_add_announcement);
}
else

		$plugins->run_hooks("modcp_do_new_announcement_end");

$cache->update_forumsdisplay();
redirect("modcp.php?action=announcements", $lang->redirect_add_announcement);
}
else

	{

	{

		$mybb->input['action'] = 'new_announcement';
}
}

		$mybb->input['action'] = 'new_announcement';
}
}

Zeile 741Zeile 746

// Deal with inline errors
if(is_array($errors))


// Deal with inline errors
if(is_array($errors))

	{

	{

		$errors = inline_error($errors);

// Set $announcement to input stuff

		$errors = inline_error($errors);

// Set $announcement to input stuff

Zeile 848Zeile 853
	}

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

	}

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

	{

	{

		$mycode_sel['yes'] = ' checked="checked"';

		$mycode_sel['yes'] = ' checked="checked"';

	}

	}

	else
{
$mycode_sel['no'] = ' checked="checked"';

	else
{
$mycode_sel['no'] = ' checked="checked"';

	}

	}


if($mybb->input['allowsmilies'] || !isset($mybb->input['allowsmilies']))
{
$smilies_sel['yes'] = ' checked="checked"';


if($mybb->input['allowsmilies'] || !isset($mybb->input['allowsmilies']))
{
$smilies_sel['yes'] = ' checked="checked"';

	}
else

	}
else

	{
$smilies_sel['no'] = ' checked="checked"';
}

	{
$smilies_sel['no'] = ' checked="checked"';
}

Zeile 872Zeile 877
	else
{
$end_type_sel['finite'] = ' checked="checked"';

	else
{
$end_type_sel['finite'] = ' checked="checked"';

	}


	}


	// MyCode editor
$codebuttons = build_mycode_inserter();
$smilieinserter = build_clickable_smilies();

	// MyCode editor
$codebuttons = build_mycode_inserter();
$smilieinserter = build_clickable_smilies();

Zeile 900Zeile 905
	}

// Mod has permissions to edit this announcement

	}

// Mod has permissions to edit this announcement

	if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
{

	if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
{

		error_no_permission();
}


		error_no_permission();
}


Zeile 914Zeile 919
	if(!trim($mybb->input['message']))
{
$errors[] = $lang->error_missing_message;

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

	}


	}


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

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

Zeile 942Zeile 947
		{
$enddate[0] = "00";
}

		{
$enddate[0] = "00";
}

	}

	}


$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
if(!in_array($mybb->input['starttime_month'], $months))


$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
if(!in_array($mybb->input['starttime_month'], $months))

Zeile 954Zeile 959
	if(!checkdate(intval($mybb->input['starttime_month']), intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year'])) || $startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;

	if(!checkdate(intval($mybb->input['starttime_month']), intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year'])) || $startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;

	}


	}


	if($mybb->input['endtime_type'] == "2")
{
$enddate = '0';

	if($mybb->input['endtime_type'] == "2")
{
$enddate = '0';

Zeile 1168Zeile 1173
	if($announcement['allowmycode'])
{
$mycode_sel['yes'] = ' checked="checked"';

	if($announcement['allowmycode'])
{
$mycode_sel['yes'] = ' checked="checked"';

	}

	}

	else
{
$mycode_sel['no'] = ' checked="checked"';

	else
{
$mycode_sel['no'] = ' checked="checked"';

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

$plugins->run_hooks("modcp_do_modqueue_start");

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

$plugins->run_hooks("modcp_do_modqueue_start");





	if(is_array($mybb->input['threads']))
{
// Fetch threads
$query = $db->simple_select("threads", "tid", "tid IN (".implode(",", array_map("intval", array_keys($mybb->input['threads'])))."){$flist}");
while($thread = $db->fetch_array($query))

	if(is_array($mybb->input['threads']))
{
// Fetch threads
$query = $db->simple_select("threads", "tid", "tid IN (".implode(",", array_map("intval", array_keys($mybb->input['threads'])))."){$flist}");
while($thread = $db->fetch_array($query))

		{

		{

			$action = $mybb->input['threads'][$thread['tid']];
if($action == "approve")
{
$threads_to_approve[] = $thread['tid'];

			$action = $mybb->input['threads'][$thread['tid']];
if($action == "approve")
{
$threads_to_approve[] = $thread['tid'];

			}
else if($action == "delete")

			}
else if($action == "delete")

			{
$threads_to_delete[] = $thread['tid'];
}

			{
$threads_to_delete[] = $thread['tid'];
}

Zeile 1300Zeile 1305
		if(!empty($threads_to_delete))
{
foreach($threads_to_delete as $tid)

		if(!empty($threads_to_delete))
{
foreach($threads_to_delete as $tid)

			{

			{

				$moderation->delete_thread($tid);
}
log_moderator_action(array('tids' => $threads_to_delete), $lang->multi_delete_threads);

				$moderation->delete_thread($tid);
}
log_moderator_action(array('tids' => $threads_to_delete), $lang->multi_delete_threads);

Zeile 1320Zeile 1325
			if($action == "approve")
{
$posts_to_approve[] = $post['pid'];

			if($action == "approve")
{
$posts_to_approve[] = $post['pid'];

			}

			}

			else if($action == "delete")
{
$moderation->delete_post($post['pid']);
}
}
if(is_array($posts_to_approve))

			else if($action == "delete")
{
$moderation->delete_post($post['pid']);
}
}
if(is_array($posts_to_approve))

		{
$moderation->approve_posts($posts_to_approve);

		{
$moderation->approve_posts($posts_to_approve);

		}
log_moderator_action(array('pids' => $posts_to_approve), $lang->multi_approve_posts);


		}
log_moderator_action(array('pids' => $posts_to_approve), $lang->multi_approve_posts);


Zeile 2610Zeile 2615
				$query = $db->query("
SELECT COUNT(pid) AS count
FROM ".TABLE_PREFIX."posts

				$query = $db->query("
SELECT COUNT(pid) AS count
FROM ".TABLE_PREFIX."posts

					WHERE {$post_ip_sql}
");

					WHERE {$post_ip_sql} AND visible >= 0
");


$post_results = $db->fetch_field($query, "count");
}


$post_results = $db->fetch_field($query, "count");
}

Zeile 2761Zeile 2766
			$query = $db->query("
SELECT username AS postusername, uid, subject, pid, tid, ipaddress
FROM ".TABLE_PREFIX."posts

			$query = $db->query("
SELECT username AS postusername, uid, subject, pid, tid, ipaddress
FROM ".TABLE_PREFIX."posts

				WHERE {$post_ip_sql}

				WHERE {$post_ip_sql} AND visible >= 0

				ORDER BY dateline DESC
LIMIT {$post_start}, {$post_limit}
");

				ORDER BY dateline DESC
LIMIT {$post_start}, {$post_limit}
");

Zeile 3440Zeile 3445
	}

$query = $db->query("

	}

$query = $db->query("

		SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname, p.subject AS psubject

		SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname

		FROM ".TABLE_PREFIX."moderatorlog l
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid)

		FROM ".TABLE_PREFIX."moderatorlog l
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid)

		LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=l.pid)

 
		{$where}
ORDER BY l.dateline DESC
LIMIT 5

		{$where}
ORDER BY l.dateline DESC
LIMIT 5

Zeile 3467Zeile 3471
		if($logitem['fname'])
{
$information .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($logitem['fid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['fname'])."</a><br />";

		if($logitem['fname'])
{
$information .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($logitem['fid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['fname'])."</a><br />";

		}
if($logitem['psubject'])
{
$information .= "<strong>{$lang->post}</strong> <a href=\"".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\">".htmlspecialchars_uni($logitem['psubject'])."</a>";

 
		}

// Edited a user or managed announcement?

		}

// Edited a user or managed announcement?

		if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])

		if(!$logitem['tsubject'] || !$logitem['fname'])

		{
$data = unserialize($logitem['data']);
if($data['uid'])

		{
$data = unserialize($logitem['data']);
if($data['uid'])