Vergleich modcp.php - 1.8.34 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 2064Zeile 2064
	{
$attachments = array_map("intval", array_keys($mybb->input['attachments']));
$query = $db->query("

	{
$attachments = array_map("intval", array_keys($mybb->input['attachments']));
$query = $db->query("

			SELECT a.pid, a.aid

			SELECT a.pid, a.aid, t.tid

			FROM  ".TABLE_PREFIX."attachments a
LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)

			FROM  ".TABLE_PREFIX."attachments a
LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)

Zeile 2080Zeile 2080
			if($action == "approve")
{
$db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'");

			if($action == "approve")
{
$db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'");

 
				if(isset($attachment['tid']))
{
update_thread_counters((int)$attachment['tid'], array("attachmentcount" => "+1"));
}

			}
else if($action == "delete")
{
remove_attachment($attachment['pid'], '', $attachment['aid']);

			}
else if($action == "delete")
{
remove_attachment($attachment['pid'], '', $attachment['aid']);

 
				if(isset($attachment['tid']))
{
update_thread_counters((int)$attachment['tid'], array("attachmentcount" => "-1"));
}

			}
}

$plugins->run_hooks("modcp_do_modqueue_end");

			}
}

$plugins->run_hooks("modcp_do_modqueue_end");





		redirect("modcp.php?action=modqueue&type=attachments", $lang->redirect_attachmentsmoderated);
}
}

		redirect("modcp.php?action=modqueue&type=attachments", $lang->redirect_attachmentsmoderated);
}
}

Zeile 2100Zeile 2108
	if($mybb->usergroup['canmanagemodqueue'] == 0)
{
error_no_permission();

	if($mybb->usergroup['canmanagemodqueue'] == 0)
{
error_no_permission();

	}


	}


	if($nummodqueuethreads == 0 && $nummodqueueposts == 0 && $nummodqueueattach == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_use_mod_queue);

	if($nummodqueuethreads == 0 && $nummodqueueposts == 0 && $nummodqueueattach == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_use_mod_queue);

Zeile 2114Zeile 2122
		if($nummodqueuethreads == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_moderate_threads);

		if($nummodqueuethreads == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_moderate_threads);

		}


		}


		$forum_cache = $cache->read("forums");

		$forum_cache = $cache->read("forums");





		$query = $db->simple_select("threads", "COUNT(tid) AS unapprovedthreads", "visible='0' {$flist_queue_threads}");
$unapproved_threads = $db->fetch_field($query, "unapprovedthreads");

// Figure out if we need to display multiple pages.
if($mybb->get_input('page') != "last")

		$query = $db->simple_select("threads", "COUNT(tid) AS unapprovedthreads", "visible='0' {$flist_queue_threads}");
$unapproved_threads = $db->fetch_field($query, "unapprovedthreads");

// Figure out if we need to display multiple pages.
if($mybb->get_input('page') != "last")

		{

		{

			$page = $mybb->get_input('page', MyBB::INPUT_INT);

			$page = $mybb->get_input('page', MyBB::INPUT_INT);

		}

		}


$perpage = $mybb->settings['threadsperpage'];
$pages = $unapproved_threads / $perpage;


$perpage = $mybb->settings['threadsperpage'];
$pages = $unapproved_threads / $perpage;

		$pages = ceil($pages);

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

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

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

		$pages = ceil($pages);

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

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

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


$multipage = multipage($unapproved_threads, $perpage, $page, "modcp.php?action=modqueue&type=threads");



$multipage = multipage($unapproved_threads, $perpage, $page, "modcp.php?action=modqueue&type=threads");


Zeile 2178Zeile 2186
				{
$thread['threadusername'] = htmlspecialchars_uni($thread['threadusername']);
$profile_link = $thread['threadusername'];

				{
$thread['threadusername'] = htmlspecialchars_uni($thread['threadusername']);
$profile_link = $thread['threadusername'];

				}
else
{
$profile_link = $lang->guest;
}
}
else

				}
else
{
$profile_link = $lang->guest;
}
}
else

			{
$thread['username'] = htmlspecialchars_uni($thread['username']);
$profile_link = build_profile_link($thread['username'], $thread['uid']);

			{
$thread['username'] = htmlspecialchars_uni($thread['username']);
$profile_link = build_profile_link($thread['username'], $thread['uid']);

Zeile 2358Zeile 2366
		if($nummodqueueattach == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_moderate_attachments);

		if($nummodqueueattach == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_moderate_attachments);

		}

		}


$query = $db->query("
SELECT COUNT(aid) AS unapprovedattachments


$query = $db->query("
SELECT COUNT(aid) AS unapprovedattachments

Zeile 2371Zeile 2379

// Figure out if we need to display multiple pages.
if($mybb->get_input('page') != "last")


// Figure out if we need to display multiple pages.
if($mybb->get_input('page') != "last")

		{

		{

			$page = $mybb->get_input('page', MyBB::INPUT_INT);
}


			$page = $mybb->get_input('page', MyBB::INPUT_INT);
}


Zeile 2382Zeile 2390
		if($mybb->get_input('page') == "last")
{
$page = $pages;

		if($mybb->get_input('page') == "last")
{
$page = $pages;

		}


		}


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

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

		}

		}


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


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

		}

		}

		else
{
$start = 0;

		else
{
$start = 0;

Zeile 2400Zeile 2408
		}

$multipage = multipage($unapproved_attachments, $perpage, $page, "modcp.php?action=modqueue&amp;type=attachments");

		}

$multipage = multipage($unapproved_attachments, $perpage, $page, "modcp.php?action=modqueue&amp;type=attachments");





		$query = $db->query("
SELECT a.*, p.subject AS postsubject, p.dateline, p.uid, u.username, t.tid, t.subject AS threadsubject
FROM ".TABLE_PREFIX."attachments a

		$query = $db->query("
SELECT a.*, p.subject AS postsubject, p.dateline, p.uid, u.username, t.tid, t.subject AS threadsubject
FROM ".TABLE_PREFIX."attachments a

Zeile 2422Zeile 2430
			}

$attachdate = my_date('relative', $attachment['dateuploaded']);

			}

$attachdate = my_date('relative', $attachment['dateuploaded']);





			$attachment['postsubject'] = htmlspecialchars_uni($parser->parse_badwords($attachment['postsubject']));
$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);
$attachment['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($attachment['threadsubject']));
$attachment['filesize'] = get_friendly_size($attachment['filesize']);

			$attachment['postsubject'] = htmlspecialchars_uni($parser->parse_badwords($attachment['postsubject']));
$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);
$attachment['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($attachment['threadsubject']));
$attachment['filesize'] = get_friendly_size($attachment['filesize']);





			$link = get_post_link($attachment['pid'], $attachment['tid']) . "#pid{$attachment['pid']}";
$thread_link = get_thread_link($attachment['tid']);
$attachment['username'] = htmlspecialchars_uni($attachment['username']);

			$link = get_post_link($attachment['pid'], $attachment['tid']) . "#pid{$attachment['pid']}";
$thread_link = get_thread_link($attachment['tid']);
$attachment['username'] = htmlspecialchars_uni($attachment['username']);

Zeile 2531Zeile 2539
			$returndate = "{$return_day}-{$return_month}-{$return_year}";
}
else

			$returndate = "{$return_day}-{$return_month}-{$return_year}";
}
else

		{

		{

			$returndate = "";
}
$away = array(

			$returndate = "";
}
$away = array(

Zeile 2635Zeile 2643
				"update_field" => "suspendposting",
"update_length" => "suspensiontime"
)

				"update_field" => "suspendposting",
"update_length" => "suspensiontime"
)

		);


		);


		require_once MYBB_ROOT."inc/functions_warnings.php";
foreach($moderator_options as $option)
{

		require_once MYBB_ROOT."inc/functions_warnings.php";
foreach($moderator_options as $option)
{

Zeile 2645Zeile 2653
			if(empty($mybb->input[$option['action']]))
{
if($user[$option['update_field']] == 1)

			if(empty($mybb->input[$option['action']]))
{
if($user[$option['update_field']] == 1)

				{

				{

					// We're revoking the suspension
$extra_user_updates[$option['update_field']] = 0;
$extra_user_updates[$option['update_length']] = 0;

					// We're revoking the suspension
$extra_user_updates[$option['update_field']] = 0;
$extra_user_updates[$option['update_length']] = 0;

				}


				}


				// Skip this option if we haven't selected it
continue;
}

				// Skip this option if we haven't selected it
continue;
}





			else
{
if($mybb->input[$option['time']] == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1)

			else
{
if($mybb->input[$option['time']] == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1)

				{

				{

					// User has selected a type of ban, but not entered a valid time frame
$string = $option['action']."_error";
$errors[] = $lang->$string;

					// User has selected a type of ban, but not entered a valid time frame
$string = $option['action']."_error";
$errors[] = $lang->$string;

Zeile 2670Zeile 2678
					if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never"))
{
// We already have a suspension, but entered a new time

					if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never"))
{
// We already have a suspension, but entered a new time

						if($suspend_length == "-1")
{

						if($suspend_length == "-1")
{

							// Permanent ban on action
$extra_user_updates[$option['update_length']] = 0;
}
elseif($suspend_length && $suspend_length != "-1")

							// Permanent ban on action
$extra_user_updates[$option['update_length']] = 0;
}
elseif($suspend_length && $suspend_length != "-1")

						{

						{

							// Temporary ban on action

							// Temporary ban on action

							$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;
}
}

							$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;
}
}

					elseif(!$user[$option['update_field']])
{
// New suspension for this user... bad user!

					elseif(!$user[$option['update_field']])
{
// New suspension for this user... bad user!

Zeile 2706Zeile 2714
		}

if(is_array($errors) && !empty($errors))

		}

if(is_array($errors) && !empty($errors))

		{

		{

			$mybb->input['action'] = "editprofile";
}
else

			$mybb->input['action'] = "editprofile";
}
else

Zeile 2720Zeile 2728
				$db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'");
}
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);

				$db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'");
}
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);





			$plugins->run_hooks("modcp_do_editprofile_end");

redirect("modcp.php?action=finduser", $lang->redirect_user_updated);

			$plugins->run_hooks("modcp_do_editprofile_end");

redirect("modcp.php?action=finduser", $lang->redirect_user_updated);

Zeile 2741Zeile 2749
	if(!$user)
{
error($lang->error_nomember);

	if(!$user)
{
error($lang->error_nomember);

	}

	}


// Check if the current user has permission to edit this user
if(!modcp_can_manage_user($user['uid']))
{
error_no_permission();


// Check if the current user has permission to edit this user
if(!modcp_can_manage_user($user['uid']))
{
error_no_permission();

	}

$userperms = user_permissions($user['uid']);


	}

$userperms = user_permissions($user['uid']);


	// Set display group
$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

if(!$user['displaygroup'])

	// Set display group
$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

if(!$user['displaygroup'])

	{

	{

		$user['displaygroup'] = $user['usergroup'];
}


		$user['displaygroup'] = $user['usergroup'];
}


Zeile 2763Zeile 2771
	if(is_array($display_group))
{
$userperms = array_merge($userperms, $display_group);

	if(is_array($display_group))
{
$userperms = array_merge($userperms, $display_group);

	}

	}


if(!my_validate_url($user['website']))
{
$user['website'] = '';


if(!my_validate_url($user['website']))
{
$user['website'] = '';

	}

	}


if($user['icq'] != "0")
{


if($user['icq'] != "0")
{

Zeile 2776Zeile 2784
	}

if(!$errors)

	}

if(!$errors)

	{

	{

		$mybb->input = array_merge($user, $mybb->input);
$birthday = explode('-', $user['birthday']);
if(!isset($birthday[1]))

		$mybb->input = array_merge($user, $mybb->input);
$birthday = explode('-', $user['birthday']);
if(!isset($birthday[1]))

Zeile 2788Zeile 2796
			$birthday[2] = '';
}
list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;

			$birthday[2] = '';
}
list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;

	}
else
{

	}
else
{

		$errors = inline_error($errors);
}


		$errors = inline_error($errors);
}


Zeile 2798Zeile 2806
	foreach(array('usertitle', 'website', 'icq', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)
{
$mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field));

	foreach(array('usertitle', 'website', 'icq', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)
{
$mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field));

	}

	}


// Custom user title
if(!empty($userperms['usertitle']))


// Custom user title
if(!empty($userperms['usertitle']))

Zeile 2811Zeile 2819
		$usertitles = $cache->read('usertitles');

foreach($usertitles as $title)

		$usertitles = $cache->read('usertitles');

foreach($usertitles as $title)

		{

		{

			if($title['posts'] <= $user['postnum'])
{
$defaulttitle = htmlspecialchars_uni($title['title']);

			if($title['posts'] <= $user['postnum'])
{
$defaulttitle = htmlspecialchars_uni($title['title']);

Zeile 2848Zeile 2856
		$bdaymonthsel[$month] = '';
}
$bdaymonthsel[$mybb->input['birthday_month']] = 'selected="selected"';

		$bdaymonthsel[$month] = '';
}
$bdaymonthsel[$mybb->input['birthday_month']] = 'selected="selected"';

 

$awaysection = '';


if($mybb->settings['allowaway'] != 0)
{
$awaycheck = array('', '');
if($errors)


if($mybb->settings['allowaway'] != 0)
{
$awaycheck = array('', '');
if($errors)

		{
if($user['away'] == 1)
{
$awaycheck[1] = "checked=\"checked\"";
}

		{
if($user['away'] == 1)
{
$awaycheck[1] = "checked=\"checked\"";
}

			else
{
$awaycheck[0] = "checked=\"checked\"";

			else
{
$awaycheck[0] = "checked=\"checked\"";

Zeile 2881Zeile 2891
			{
$awaynotice = $lang->away_notice;
$awaycheck[0] = "checked=\"checked\"";

			{
$awaynotice = $lang->away_notice;
$awaycheck[0] = "checked=\"checked\"";

			}

			}

			$returndate = explode("-", $user['returndate']);
}
$returndatesel = $selected = '';
for($day = 1; $day <= 31; ++$day)

			$returndate = explode("-", $user['returndate']);
}
$returndatesel = $selected = '';
for($day = 1; $day <= 31; ++$day)

		{

		{

			if($returndate[0] == $day)
{
$selected = "selected=\"selected\"";

			if($returndate[0] == $day)
{
$selected = "selected=\"selected\"";

			}

			}

			else
{
$selected = '';
}

eval("\$returndatesel .= \"".$templates->get("usercp_profile_day")."\";");

			else
{
$selected = '';
}

eval("\$returndatesel .= \"".$templates->get("usercp_profile_day")."\";");

		}


		}


		$returndatemonthsel = array();
foreach(range(1, 12) as $month)
{
$returndatemonthsel[$month] = '';

		$returndatemonthsel = array();
foreach(range(1, 12) as $month)
{
$returndatemonthsel[$month] = '';

		}

		}

		if(isset($returndate[1]))
{
$returndatemonthsel[$returndate[1]] = " selected=\"selected\"";

		if(isset($returndate[1]))
{
$returndatemonthsel[$returndate[1]] = " selected=\"selected\"";

		}

		}


if(!isset($returndate[2]))
{


if(!isset($returndate[2]))
{

Zeile 2915Zeile 2925
		}

eval("\$awaysection = \"".$templates->get("usercp_profile_away")."\";");

		}

eval("\$awaysection = \"".$templates->get("usercp_profile_away")."\";");

	}

	}


$plugins->run_hooks("modcp_editprofile_start");



$plugins->run_hooks("modcp_editprofile_start");


Zeile 2950Zeile 2960
			}
$field = "fid{$profilefield['fid']}";
if($errors)

			}
$field = "fid{$profilefield['fid']}";
if($errors)

			{

			{

				if(isset($mybb->input['profile_fields'][$field]))

				if(isset($mybb->input['profile_fields'][$field]))

				{

				{

					$userfield = $mybb->input['profile_fields'][$field];

					$userfield = $mybb->input['profile_fields'][$field];

				}
}

				}
}

			elseif(isset($user_fields[$field]))
{
$userfield = $user_fields[$field];
}
if($type == "multiselect")

			elseif(isset($user_fields[$field]))
{
$userfield = $user_fields[$field];
}
if($type == "multiselect")

			{
if($errors)
{
$useropts = $userfield;
}
else
{
$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);

$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])
{
$sel = " selected=\"selected\"";
}

			{
if($errors)
{
$useropts = $userfield;
}
else
{
$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);

$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])
{
$sel = " selected=\"selected\"";
}


eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])


eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])

					{

					{

						$profilefield['length'] = 3;
}


						$profilefield['length'] = 3;
}


Zeile 3018Zeile 3028

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}


eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}

					if(!$profilefield['length'])
{
$profilefield['length'] = 1;
}

					if(!$profilefield['length'])
{
$profilefield['length'] = 1;
}


eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";");
}


eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";");
}

Zeile 3030Zeile 3040
			{
$expoptions = explode("\n", $options);
if(is_array($expoptions))

			{
$expoptions = explode("\n", $options);
if(is_array($expoptions))

				{

				{

					foreach($expoptions as $key => $val)
{
$checked = "";

					foreach($expoptions as $key => $val)
{
$checked = "";

Zeile 3046Zeile 3056
			elseif($type == "checkbox")
{
if($errors)

			elseif($type == "checkbox")
{
if($errors)

				{

				{

					$useropts = $userfield;
}
else

					$useropts = $userfield;
}
else

Zeile 3054Zeile 3064
					$useropts = explode("\n", $userfield);
}
if(is_array($useropts))

					$useropts = explode("\n", $userfield);
}
if(is_array($useropts))

				{

				{

					foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;

					foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;

Zeile 3193Zeile 3203
		if($user[$option['option']])
{
if($user[$option['length']] == 0)

		if($user[$option['option']])
{
if($user[$option['length']] == 0)

			{

			{

				// User has a permanent ban
$string = $option['option']."_perm";
$suspension_info = $lang->$string;

				// User has a permanent ban
$string = $option['option']."_perm";
$suspension_info = $lang->$string;

Zeile 3207Zeile 3217
			}

switch($option['option'])

			}

switch($option['option'])

			{

			{

				case "suspendsignature":
eval("\$suspendsignature_info = \"".$templates->get("modcp_editprofile_suspensions_info")."\";");
break;

				case "suspendsignature":
eval("\$suspendsignature_info = \"".$templates->get("modcp_editprofile_suspensions_info")."\";");
break;

Zeile 3228Zeile 3238
			if($mybb->get_input($string) == $key)
{
$selected = "selected=\"selected\"";

			if($mybb->get_input($string) == $key)
{
$selected = "selected=\"selected\"";

			}

			}

			else
{
$selected = '';

			else
{
$selected = '';

Zeile 3366Zeile 3376
		if(!empty($mybb->input[$field]))
{
$page_url .= "&amp;{$field}=".$mybb->input[$field];

		if(!empty($mybb->input[$field]))
{
$page_url .= "&amp;{$field}=".$mybb->input[$field];

		}
}


		}
}


	$multipage = multipage($user_count, $perpage, $page, $page_url);

$usergroups_cache = $cache->read("usergroups");

	$multipage = multipage($user_count, $perpage, $page, $page_url);

$usergroups_cache = $cache->read("usergroups");

Zeile 3395Zeile 3405
				// We have had at least some active time, hide it instead
$lastdate = $lang->lastvisit_hidden;
}

				// We have had at least some active time, hide it instead
$lastdate = $lang->lastvisit_hidden;
}

		}

		}

		else
{
$lastdate = my_date('relative', $user['lastvisit']);

		else
{
$lastdate = my_date('relative', $user['lastvisit']);

Zeile 3403Zeile 3413

$usergroup = htmlspecialchars_uni($usergroups_cache[$user['usergroup']]['title']);
eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";");


$usergroup = htmlspecialchars_uni($usergroups_cache[$user['usergroup']]['title']);
eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";");

	}

	}


// No results?
if(!$users)


// No results?
if(!$users)

	{

	{

		eval("\$users = \"".$templates->get("modcp_finduser_noresults")."\";");
}


		eval("\$users = \"".$templates->get("modcp_finduser_noresults")."\";");
}


Zeile 3423Zeile 3433
	if($mybb->usergroup['canviewwarnlogs'] == 0)
{
error_no_permission();

	if($mybb->usergroup['canviewwarnlogs'] == 0)
{
error_no_permission();

	}


	}


	add_breadcrumb($lang->mcp_nav_warninglogs, "modcp.php?action=warninglogs");

// Filter options

	add_breadcrumb($lang->mcp_nav_warninglogs, "modcp.php?action=warninglogs");

// Filter options

Zeile 3437Zeile 3447

$mybb->input['filter']['uid'] = (int)$search_user['uid'];
$mybb->input['filter']['username'] = htmlspecialchars_uni($mybb->input['filter']['username']);


$mybb->input['filter']['uid'] = (int)$search_user['uid'];
$mybb->input['filter']['username'] = htmlspecialchars_uni($mybb->input['filter']['username']);

	}
else

	}
else

	{
$mybb->input['filter']['username'] = '';
}
if(!empty($mybb->input['filter']['uid']))

	{
$mybb->input['filter']['username'] = '';
}
if(!empty($mybb->input['filter']['uid']))

	{

	{

		$search['uid'] = (int)$mybb->input['filter']['uid'];
$where_sql .= " AND w.uid='{$search['uid']}'";
if(!isset($mybb->input['search']['username']))

		$search['uid'] = (int)$mybb->input['filter']['uid'];
$where_sql .= " AND w.uid='{$search['uid']}'";
if(!isset($mybb->input['search']['username']))

Zeile 3451Zeile 3461
			$user = get_user($mybb->input['search']['uid']);
$mybb->input['search']['username'] = htmlspecialchars_uni($user['username']);
}

			$user = get_user($mybb->input['search']['uid']);
$mybb->input['search']['username'] = htmlspecialchars_uni($user['username']);
}

	}

	}

	else
{
$mybb->input['filter']['uid'] = '';

	else
{
$mybb->input['filter']['uid'] = '';

	}

	}

	if(!empty($mybb->input['filter']['mod_username']))
{
$mod_user = get_user_by_username($mybb->input['filter']['mod_username']);

	if(!empty($mybb->input['filter']['mod_username']))
{
$mod_user = get_user_by_username($mybb->input['filter']['mod_username']);

Zeile 3464Zeile 3474
		$mybb->input['filter']['mod_username'] = htmlspecialchars_uni($mybb->input['filter']['mod_username']);
}
else

		$mybb->input['filter']['mod_username'] = htmlspecialchars_uni($mybb->input['filter']['mod_username']);
}
else

	{

	{

		$mybb->input['filter']['mod_username'] = '';
}
if(!empty($mybb->input['filter']['mod_uid']))

		$mybb->input['filter']['mod_username'] = '';
}
if(!empty($mybb->input['filter']['mod_uid']))

Zeile 3472Zeile 3482
		$search['mod_uid'] = (int)$mybb->input['filter']['mod_uid'];
$where_sql .= " AND w.issuedby='{$search['mod_uid']}'";
if(!isset($mybb->input['search']['mod_username']))

		$search['mod_uid'] = (int)$mybb->input['filter']['mod_uid'];
$where_sql .= " AND w.issuedby='{$search['mod_uid']}'";
if(!isset($mybb->input['search']['mod_username']))

		{

		{

			$mod_user = get_user($mybb->input['search']['uid']);
$mybb->input['search']['mod_username'] = htmlspecialchars_uni($mod_user['username']);
}

			$mod_user = get_user($mybb->input['search']['uid']);
$mybb->input['search']['mod_username'] = htmlspecialchars_uni($mod_user['username']);
}

Zeile 4261Zeile 4271
		");
$user = $db->fetch_array($query);


		");
$user = $db->fetch_array($query);


		if($user['uid'])

		if($user)

		{
$existing_ban = true;
}

		{
$existing_ban = true;
}

Zeile 4285Zeile 4295

$user = get_user_by_username($mybb->input['username'], $options);



$user = get_user_by_username($mybb->input['username'], $options);


		if(!$user['uid'])

		if(!$user)

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

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

Zeile 4310Zeile 4320

// Check banned group
$usergroups_cache = $cache->read('usergroups');


// Check banned group
$usergroups_cache = $cache->read('usergroups');

	$usergroup = $usergroups_cache[$mybb->get_input('usergroup', MyBB::INPUT_INT)];




	if(isset($usergroups_cache[$mybb->get_input('usergroup', MyBB::INPUT_INT)]))
{
$usergroup = $usergroups_cache[$mybb->get_input('usergroup', MyBB::INPUT_INT)];
}





	if(empty($usergroup['gid']) || empty($usergroup['isbannedgroup']))

	if(!isset($usergroup) || empty($usergroup['isbannedgroup']))

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

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