Vergleich search.php - 1.8.27 - 1.8.37

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 60Zeile 60
	$query = $db->simple_select("searchlog", "*", "sid='$sid'");
$search = $db->fetch_array($query);


	$query = $db->simple_select("searchlog", "*", "sid='$sid'");
$search = $db->fetch_array($query);


	if(!$search['sid'])

	if(!$search)

	{
error($lang->error_invalidsearch);
}

	{
error($lang->error_invalidsearch);
}

Zeile 104Zeile 104
			break;
case "lastpost":
default:

			break;
case "lastpost":
default:

			if($search['resulttype'] == "threads")

			if(isset($search['resulttype']) && $search['resulttype'] == "threads")

			{
$sortfield = "t.lastpost";
$sortby = "lastpost";

			{
$sortfield = "t.lastpost";
$sortby = "lastpost";

Zeile 115Zeile 115
				$sortby = "dateline";
}
break;

				$sortby = "dateline";
}
break;

	}

	}


if($order != "asc")


if($order != "asc")

	{

	{

		$order = "desc";
$oppsortnext = "asc";
$oppsort = $lang->asc;

		$order = "desc";
$oppsortnext = "asc";
$oppsort = $lang->asc;

Zeile 127Zeile 127
	{
$oppsortnext = "desc";
$oppsort = $lang->desc;

	{
$oppsortnext = "desc";
$oppsort = $lang->desc;

	}

	}


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


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

	}

	}


// Work out pagination, which page we're at, as well as the limits.
$perpage = $mybb->settings['threadsperpage'];


// Work out pagination, which page we're at, as well as the limits.
$perpage = $mybb->settings['threadsperpage'];

Zeile 140Zeile 140
	if($page > 0)
{
$start = ($page-1) * $perpage;

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

	}

	}

	else
{
$start = 0;

	else
{
$start = 0;

Zeile 149Zeile 149
	$end = $start + $perpage;
$lower = $start+1;
$upper = $end;

	$end = $start + $perpage;
$lower = $start+1;
$upper = $end;





	// Work out if we have terms to highlight
$highlight = "";

	// Work out if we have terms to highlight
$highlight = "";

	if($search['keywords'])

	if(!empty($search['keywords']))

	{
if($mybb->seo_support == true)
{

	{
if($mybb->seo_support == true)
{

Zeile 190Zeile 190

if(isset($mybb->cookies['mybb']['forumread']))
{


if(isset($mybb->cookies['mybb']['forumread']))
{

			$forumsread = my_unserialize($mybb->cookies['mybb']['forumread']);

			$forumsread = my_unserialize($mybb->cookies['mybb']['forumread'], false);

		}
else
{
$forumsread = array();

		}
else
{
$forumsread = array();

		}
}

		}
}

	else
{
// Build a forum cache.

	else
{
// Build a forum cache.

Zeile 208Zeile 208
			ORDER BY pid, disporder
");
}

			ORDER BY pid, disporder
");
}





	while($forum = $db->fetch_array($query))
{
if($mybb->user['uid'] == 0)

	while($forum = $db->fetch_array($query))
{
if($mybb->user['uid'] == 0)

Zeile 216Zeile 216
			if(!empty($forumsread[$forum['fid']]))
{
$forum['lastread'] = $forumsread[$forum['fid']];

			if(!empty($forumsread[$forum['fid']]))
{
$forum['lastread'] = $forumsread[$forum['fid']];

			}
}


			}
}


		if(isset($forum['lastread']))
{
$readforums[$forum['fid']] = $forum['lastread'];

		if(isset($forum['lastread']))
{
$readforums[$forum['fid']] = $forum['lastread'];

Zeile 246Zeile 246
	}

// Show search results as 'threads'

	}

// Show search results as 'threads'

	if($search['resulttype'] == "threads")

	if(isset($search['resulttype']) && $search['resulttype'] == "threads")

	{
$threadcount = 0;


	{
$threadcount = 0;


Zeile 287Zeile 287
				error($lang->error_nosearchresults);
}
$threadcount = $count['resultcount'];

				error($lang->error_nosearchresults);
}
$threadcount = $count['resultcount'];

		}


		}


		$permsql = "";
$onlyusfids = array();


		$permsql = "";
$onlyusfids = array();


Zeile 353Zeile 353
			$thread_cache[$thread['tid']] = $thread;
}
$thread_ids = implode(",", array_keys($thread_cache));

			$thread_cache[$thread['tid']] = $thread;
}
$thread_ids = implode(",", array_keys($thread_cache));





		if(empty($thread_ids))

		if(empty($thread_ids))

		{

		{

			error($lang->error_nosearchresults);

			error($lang->error_nosearchresults);

		}


		}


		// Fetch dot icons if enabled
if($mybb->settings['dotfolders'] != 0 && $mybb->user['uid'] && $thread_cache)

		// Fetch dot icons if enabled
if($mybb->settings['dotfolders'] != 0 && $mybb->user['uid'] && $thread_cache)

		{

		{

			$unapproved_where_p = str_replace('t.', '', $unapproved_where_t);
$query = $db->simple_select("posts", "DISTINCT tid,uid", "uid='{$mybb->user['uid']}' AND tid IN({$thread_ids}) AND ({$unapproved_where_p})");
while($thread = $db->fetch_array($query))

			$unapproved_where_p = str_replace('t.', '', $unapproved_where_t);
$query = $db->simple_select("posts", "DISTINCT tid,uid", "uid='{$mybb->user['uid']}' AND tid IN({$thread_ids}) AND ({$unapproved_where_p})");
while($thread = $db->fetch_array($query))

Zeile 375Zeile 375
		{
$query = $db->simple_select("threadsread", "tid,dateline", "uid='".$mybb->user['uid']."' AND tid IN(".$thread_ids.")");
while($readthread = $db->fetch_array($query))

		{
$query = $db->simple_select("threadsread", "tid,dateline", "uid='".$mybb->user['uid']."' AND tid IN(".$thread_ids.")");
while($readthread = $db->fetch_array($query))

			{

			{

				$thread_cache[$readthread['tid']]['lastread'] = $readthread['dateline'];

				$thread_cache[$readthread['tid']]['lastread'] = $readthread['dateline'];

			}

			}

		}

if(!$mybb->settings['maxmultipagelinks'])

		}

if(!$mybb->settings['maxmultipagelinks'])

Zeile 397Zeile 397
			if($thread['visible'] == 0)
{
$bgcolor = 'trow_shaded';

			if($thread['visible'] == 0)
{
$bgcolor = 'trow_shaded';

			}

			}

			elseif($thread['visible'] == -1)
{
$bgcolor = 'trow_shaded trow_deleted';

			elseif($thread['visible'] == -1)
{
$bgcolor = 'trow_shaded trow_deleted';

Zeile 464Zeile 464
				if(isset($forumsread[$thread['fid']]))
{
$forum_read = $forumsread[$thread['fid']];

				if(isset($forumsread[$thread['fid']]))
{
$forum_read = $forumsread[$thread['fid']];

				}
else
{
$forum_read = '';
}
}


				}
else
{
$forum_read = '';
}
}


			if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $thread['lastpost'] > $forum_read)
{

			if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $thread['lastpost'] > $forum_read)
{

				if($thread['lastread'])

				if(isset($thread['lastread']))

				{
$last_read = $thread['lastread'];
}

				{
$last_read = $thread['lastread'];
}

Zeile 608Zeile 608

// If this user is the author of the thread and it is not closed or they are a moderator, they can edit
if(($thread['uid'] == $mybb->user['uid'] && $thread['closed'] != 1 && $mybb->user['uid'] != 0 && $fpermissions[$thread['fid']]['caneditposts'] == 1) || is_moderator($thread['fid'], "caneditposts"))


// If this user is the author of the thread and it is not closed or they are a moderator, they can edit
if(($thread['uid'] == $mybb->user['uid'] && $thread['closed'] != 1 && $mybb->user['uid'] != 0 && $fpermissions[$thread['fid']]['caneditposts'] == 1) || is_moderator($thread['fid'], "caneditposts"))

			{

			{

				$inline_edit_class = "subject_editable";

				$inline_edit_class = "subject_editable";

			}
else

			}
else

			{
$inline_edit_class = "";

			{
$inline_edit_class = "";

			}

			}


// If this thread has 1 or more attachments show the papperclip
if($mybb->settings['enableattachments'] == 1 && $thread['attachmentcount'] > 0)
{
if($thread['attachmentcount'] > 1)


// If this thread has 1 or more attachments show the papperclip
if($mybb->settings['enableattachments'] == 1 && $thread['attachmentcount'] > 0)
{
if($thread['attachmentcount'] > 1)

				{

				{

					$attachment_count = $lang->sprintf($lang->attachment_count_multiple, $thread['attachmentcount']);
}
else

					$attachment_count = $lang->sprintf($lang->attachment_count_multiple, $thread['attachmentcount']);
}
else

Zeile 631Zeile 631
				eval("\$attachment_count = \"".$templates->get("forumdisplay_thread_attachment_count")."\";");
}
else

				eval("\$attachment_count = \"".$templates->get("forumdisplay_thread_attachment_count")."\";");
}
else

			{

			{

				$attachment_count = '';
}

$inline_edit_tid = $thread['tid'];

				$attachment_count = '';
}

$inline_edit_tid = $thread['tid'];





			// Inline thread moderation
$inline_mod_checkbox = '';
if($is_supermod || is_moderator($thread['fid']))

			// Inline thread moderation
$inline_mod_checkbox = '';
if($is_supermod || is_moderator($thread['fid']))

Zeile 652Zeile 652
				}

// If this user is allowed to use the inline moderation tools for at least one thread, include the necessary scripts

				}

// If this user is allowed to use the inline moderation tools for at least one thread, include the necessary scripts

				$show_inline_moderation = true;


				$show_inline_moderation = true;


				eval("\$inline_mod_checkbox = \"".$templates->get("search_results_threads_inlinecheck")."\";");
}
elseif($is_mod)

				eval("\$inline_mod_checkbox = \"".$templates->get("search_results_threads_inlinecheck")."\";");
}
elseif($is_mod)

Zeile 665Zeile 665
			eval("\$results .= \"".$templates->get("search_results_threads_thread")."\";");
}
if(!$results)

			eval("\$results .= \"".$templates->get("search_results_threads_thread")."\";");
}
if(!$results)

		{

		{

			error($lang->error_nosearchresults);
}
$multipage = multipage($threadcount, $perpage, $page, "search.php?action=results&amp;sid=$sid&amp;sortby=$sortby&amp;order=$order&amp;uid=".$mybb->get_input('uid', MyBB::INPUT_INT));

			error($lang->error_nosearchresults);
}
$multipage = multipage($threadcount, $perpage, $page, "search.php?action=results&amp;sid=$sid&amp;sortby=$sortby&amp;order=$order&amp;uid=".$mybb->get_input('uid', MyBB::INPUT_INT));

Zeile 676Zeile 676

$selectall = '';
$inlinemod = '';


$selectall = '';
$inlinemod = '';





		// Inline Thread Moderation Options
if($show_inline_moderation)
{

		// Inline Thread Moderation Options
if($show_inline_moderation)
{

Zeile 723Zeile 723
	}
else // Displaying results as posts
{

	}
else // Displaying results as posts
{

		if(!$search['posts'])

		if(empty($search['posts']))

		{
error($lang->error_nosearchresults);
}

		{
error($lang->error_nosearchresults);
}

Zeile 768Zeile 768
				if(!empty($forum_permissions['canonlyviewownthreads']))
{
$onlyusfids[] = $fid;

				if(!empty($forum_permissions['canonlyviewownthreads']))
{
$onlyusfids[] = $fid;

				}

				}

			}

if($onlyusfids)

			}

if($onlyusfids)

Zeile 834Zeile 834
			while($post = $db->fetch_array($query))
{
$dot_icon[$post['tid']] = true;

			while($post = $db->fetch_array($query))
{
$dot_icon[$post['tid']] = true;

			}
}

			}
}


$results = '';



$results = '';


Zeile 1200Zeile 1200
		"uid" => $mybb->user['uid'],
"dateline" => TIME_NOW,
"ipaddress" => $db->escape_binary($session->packedip),

		"uid" => $mybb->user['uid'],
"dateline" => TIME_NOW,
"ipaddress" => $db->escape_binary($session->packedip),

		"threads" => $db->escape_string($tids),
"posts" => $db->escape_string($pids),
"resulttype" => "posts",
"querycache" => '',
"keywords" => ''
);
$plugins->run_hooks("search_do_search_process");
$db->insert_query("searchlog", $searcharray);
redirect("search.php?action=results&sid=".$sid, $lang->redirect_searchresults);
}
elseif($mybb->input['action'] == "finduser")
{
$where_sql = "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";

$unsearchforums = get_unsearchable_forums();
if($unsearchforums)
{
$where_sql .= " AND fid NOT IN ($unsearchforums)";
}
$inactiveforums = get_inactive_forums();
if($inactiveforums)
{
$where_sql .= " AND fid NOT IN ($inactiveforums)";
}

// Moderators can view unapproved threads and deleted threads from forums they moderate
$unapproved_where = get_visible_where();
$where_sql .= " AND ({$unapproved_where})";

$permsql = "";
$onlyusfids = array();

// Check group permissions if we can't view threads not started by us
$group_permissions = forum_permissions();
foreach($group_permissions as $fid => $forum_permissions)
{
if(isset($forum_permissions['canonlyviewownthreads']) && $forum_permissions['canonlyviewownthreads'] == 1)
{
$onlyusfids[] = $fid;
}
}
if(!empty($onlyusfids))
{
$where_sql .= "AND ((fid IN(".implode(',', $onlyusfids).") AND uid='{$mybb->user['uid']}') OR fid NOT IN(".implode(',', $onlyusfids)."))";
}

$options = array(
'order_by' => 'dateline DESC, pid DESC',
);

// Do we have a hard search limit?
if($mybb->settings['searchhardlimit'] > 0)
{
$options['limit'] = (int)$mybb->settings['searchhardlimit'];
}

$pids = '';
$comma = '';
$query = $db->simple_select("posts", "pid", "{$where_sql}", $options);
while($pid = $db->fetch_field($query, "pid"))
{
$pids .= $comma.$pid;
$comma = ',';
}

$tids = '';
$comma = '';
$query = $db->simple_select("threads", "tid", $where_sql);
while($tid = $db->fetch_field($query, "tid"))
{
$tids .= $comma.$tid;
$comma = ',';
}


		"threads" => $db->escape_string($tids),
"posts" => $db->escape_string($pids),
"resulttype" => "posts",
"querycache" => '',
"keywords" => ''
);
$plugins->run_hooks("search_do_search_process");
$db->insert_query("searchlog", $searcharray);
redirect("search.php?action=results&sid=".$sid, $lang->redirect_searchresults);
}
elseif($mybb->input['action'] == "finduser")
{
$where_sql = "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";

$unsearchforums = get_unsearchable_forums();
if($unsearchforums)
{
$where_sql .= " AND fid NOT IN ($unsearchforums)";
}
$inactiveforums = get_inactive_forums();
if($inactiveforums)
{
$where_sql .= " AND fid NOT IN ($inactiveforums)";
}

// Moderators can view unapproved threads and deleted threads from forums they moderate
$unapproved_where = get_visible_where();
$where_sql .= " AND ({$unapproved_where})";

$permsql = "";
$onlyusfids = array();

// Check group permissions if we can't view threads not started by us
$group_permissions = forum_permissions();
foreach($group_permissions as $fid => $forum_permissions)
{
if(isset($forum_permissions['canonlyviewownthreads']) && $forum_permissions['canonlyviewownthreads'] == 1)
{
$onlyusfids[] = $fid;
}
}
if(!empty($onlyusfids))
{
$where_sql .= "AND ((fid IN(".implode(',', $onlyusfids).") AND uid='{$mybb->user['uid']}') OR fid NOT IN(".implode(',', $onlyusfids)."))";
}

$options = array(
'order_by' => 'dateline DESC, pid DESC',
);

// Do we have a hard search limit?
if($mybb->settings['searchhardlimit'] > 0)
{
$options['limit'] = (int)$mybb->settings['searchhardlimit'];
}

$pids = '';
$comma = '';
$query = $db->simple_select("posts", "pid", "{$where_sql}", $options);
while($pid = $db->fetch_field($query, "pid"))
{
$pids .= $comma.$pid;
$comma = ',';
}

$tids = '';
$comma = '';
$query = $db->simple_select("threads", "tid", $where_sql);
while($tid = $db->fetch_field($query, "tid"))
{
$tids .= $comma.$tid;
$comma = ',';
}


	$sid = md5(uniqid(microtime(), true));
$searcharray = array(
"sid" => $db->escape_string($sid),

	$sid = md5(uniqid(microtime(), true));
$searcharray = array(
"sid" => $db->escape_string($sid),

Zeile 1284Zeile 1284
		"posts" => $db->escape_string($pids),
"resulttype" => "posts",
"querycache" => '',

		"posts" => $db->escape_string($pids),
"resulttype" => "posts",
"querycache" => '',

		"keywords" => ''

		"keywords" => ''

	);
$plugins->run_hooks("search_do_search_process");
$db->insert_query("searchlog", $searcharray);

	);
$plugins->run_hooks("search_do_search_process");
$db->insert_query("searchlog", $searcharray);

Zeile 1293Zeile 1293
elseif($mybb->input['action'] == "finduserthreads")
{
$where_sql = "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";

elseif($mybb->input['action'] == "finduserthreads")
{
$where_sql = "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";


$unsearchforums = get_unsearchable_forums();
if($unsearchforums)


$unsearchforums = get_unsearchable_forums();
if($unsearchforums)

	{
$where_sql .= " AND fid NOT IN ($unsearchforums)";
}

	{
$where_sql .= " AND fid NOT IN ($unsearchforums)";
}

Zeile 1329Zeile 1329
	$tids = '';
$comma = '';
$query = $db->simple_select("threads", "tid", $where_sql);

	$tids = '';
$comma = '';
$query = $db->simple_select("threads", "tid", $where_sql);

	while($tid = $db->fetch_field($query, "tid"))

	while($tid = $db->fetch_field($query, "tid"))

	{
$tids .= $comma.$tid;
$comma = ',';

	{
$tids .= $comma.$tid;
$comma = ',';

Zeile 1352Zeile 1352
	redirect("search.php?action=results&sid=".$sid, $lang->redirect_searchresults);
}
elseif($mybb->input['action'] == "getnew")

	redirect("search.php?action=results&sid=".$sid, $lang->redirect_searchresults);
}
elseif($mybb->input['action'] == "getnew")

{

$where_sql = "lastpost >= '".(int)$mybb->user['lastvisit']."'";

if($mybb->get_input('fid', MyBB::INPUT_INT))
{
$where_sql .= " AND fid='".$mybb->get_input('fid', MyBB::INPUT_INT)."'";
}
else if($mybb->get_input('fids'))
{
$fids = explode(',', $mybb->get_input('fids'));
foreach($fids as $key => $fid)
{
$fids[$key] = (int)$fid;
}

if(!empty($fids))
{
$where_sql .= " AND fid IN (".implode(',', $fids).")";
}
}

$unsearchforums = get_unsearchable_forums();
if($unsearchforums)
{
$where_sql .= " AND fid NOT IN ($unsearchforums)";
}
$inactiveforums = get_inactive_forums();
if($inactiveforums)
{
$where_sql .= " AND fid NOT IN ($inactiveforums)";
}

// Moderators can view unapproved threads and deleted threads from forums they moderate
$unapproved_where = get_visible_where();
$where_sql .= " AND ({$unapproved_where})";

$permsql = "";
$onlyusfids = array();

// Check group permissions if we can't view threads not started by us
$group_permissions = forum_permissions();
foreach($group_permissions as $fid => $forum_permissions)
{
if(isset($forum_permissions['canonlyviewownthreads']) && $forum_permissions['canonlyviewownthreads'] == 1)
{
$onlyusfids[] = $fid;
}
}
if(!empty($onlyusfids))
{
$where_sql .= "AND ((fid IN(".implode(',', $onlyusfids).") AND uid='{$mybb->user['uid']}') OR fid NOT IN(".implode(',', $onlyusfids)."))";
}

$tids = '';
$comma = '';
$query = $db->simple_select("threads", "tid", $where_sql);
while($tid = $db->fetch_field($query, "tid"))
{
$tids .= $comma.$tid;
$comma = ',';
}

$sid = md5(uniqid(microtime(), true));
$searcharray = array(
"sid" => $db->escape_string($sid),
"uid" => $mybb->user['uid'],
"dateline" => TIME_NOW,
"ipaddress" => $db->escape_binary($session->packedip),
"threads" => $db->escape_string($tids),
"posts" => '',
"resulttype" => "threads",
"querycache" => $db->escape_string($where_sql),
"keywords" => ''
);


{

$where_sql = "lastpost >= '".(int)$mybb->user['lastvisit']."'";

if($mybb->get_input('fid', MyBB::INPUT_INT))
{
$where_sql .= " AND fid='".$mybb->get_input('fid', MyBB::INPUT_INT)."'";
}
else if($mybb->get_input('fids'))
{
$fids = explode(',', $mybb->get_input('fids'));
foreach($fids as $key => $fid)
{
$fids[$key] = (int)$fid;
}

if(!empty($fids))
{
$where_sql .= " AND fid IN (".implode(',', $fids).")";
}
}

$unsearchforums = get_unsearchable_forums();
if($unsearchforums)
{
$where_sql .= " AND fid NOT IN ($unsearchforums)";
}
$inactiveforums = get_inactive_forums();
if($inactiveforums)
{
$where_sql .= " AND fid NOT IN ($inactiveforums)";
}

// Moderators can view unapproved threads and deleted threads from forums they moderate
$unapproved_where = get_visible_where();
$where_sql .= " AND ({$unapproved_where})";

$permsql = "";
$onlyusfids = array();

// Check group permissions if we can't view threads not started by us
$group_permissions = forum_permissions();
foreach($group_permissions as $fid => $forum_permissions)
{
if(isset($forum_permissions['canonlyviewownthreads']) && $forum_permissions['canonlyviewownthreads'] == 1)
{
$onlyusfids[] = $fid;
}
}
if(!empty($onlyusfids))
{
$where_sql .= "AND ((fid IN(".implode(',', $onlyusfids).") AND uid='{$mybb->user['uid']}') OR fid NOT IN(".implode(',', $onlyusfids)."))";
}

$tids = '';
$comma = '';
$query = $db->simple_select("threads", "tid", $where_sql);
while($tid = $db->fetch_field($query, "tid"))
{
$tids .= $comma.$tid;
$comma = ',';
}

$sid = md5(uniqid(microtime(), true));
$searcharray = array(
"sid" => $db->escape_string($sid),
"uid" => $mybb->user['uid'],
"dateline" => TIME_NOW,
"ipaddress" => $db->escape_binary($session->packedip),
"threads" => $db->escape_string($tids),
"posts" => '',
"resulttype" => "threads",
"querycache" => $db->escape_string($where_sql),
"keywords" => ''
);


	$plugins->run_hooks("search_do_search_process");
$db->insert_query("searchlog", $searcharray);
redirect("search.php?action=results&sid=".$sid, $lang->redirect_searchresults);

	$plugins->run_hooks("search_do_search_process");
$db->insert_query("searchlog", $searcharray);
redirect("search.php?action=results&sid=".$sid, $lang->redirect_searchresults);

Zeile 1449Zeile 1449
	if($mybb->get_input('fid', MyBB::INPUT_INT))
{
$where_sql .= " AND fid='".$mybb->get_input('fid', MyBB::INPUT_INT)."'";

	if($mybb->get_input('fid', MyBB::INPUT_INT))
{
$where_sql .= " AND fid='".$mybb->get_input('fid', MyBB::INPUT_INT)."'";

	}

	}

	else if($mybb->get_input('fids'))
{
$fids = explode(',', $mybb->get_input('fids'));

	else if($mybb->get_input('fids'))
{
$fids = explode(',', $mybb->get_input('fids'));

Zeile 1494Zeile 1494
	if(!empty($onlyusfids))
{
$where_sql .= "AND ((fid IN(".implode(',', $onlyusfids).") AND uid='{$mybb->user['uid']}') OR fid NOT IN(".implode(',', $onlyusfids)."))";

	if(!empty($onlyusfids))
{
$where_sql .= "AND ((fid IN(".implode(',', $onlyusfids).") AND uid='{$mybb->user['uid']}') OR fid NOT IN(".implode(',', $onlyusfids)."))";

	}


	}


	$tids = '';
$comma = '';
$query = $db->simple_select("threads", "tid", $where_sql);

	$tids = '';
$comma = '';
$query = $db->simple_select("threads", "tid", $where_sql);

Zeile 1516Zeile 1516
		"resulttype" => "threads",
"querycache" => $db->escape_string($where_sql),
"keywords" => ''

		"resulttype" => "threads",
"querycache" => $db->escape_string($where_sql),
"keywords" => ''

	);


	);


	$plugins->run_hooks("search_do_search_process");
$db->insert_query("searchlog", $searcharray);
redirect("search.php?action=results&sid=".$sid, $lang->redirect_searchresults);

	$plugins->run_hooks("search_do_search_process");
$db->insert_query("searchlog", $searcharray);
redirect("search.php?action=results&sid=".$sid, $lang->redirect_searchresults);

Zeile 1563Zeile 1563
	else
{
$resulttype = "posts";

	else
{
$resulttype = "posts";

 
	}

if(isset($mybb->input['forums']) && is_array($mybb->input['forums']))
{
$forums = $mybb->get_input('forums', MyBB::INPUT_ARRAY);
}
else
{
$forums = array($mybb->get_input('forums'));

	}

$search_data = array(

	}

$search_data = array(

Zeile 1572Zeile 1581
		"matchusername" => $mybb->get_input('matchusername', MyBB::INPUT_INT),
"postdate" => $mybb->get_input('postdate', MyBB::INPUT_INT),
"pddir" => $mybb->get_input('pddir', MyBB::INPUT_INT),

		"matchusername" => $mybb->get_input('matchusername', MyBB::INPUT_INT),
"postdate" => $mybb->get_input('postdate', MyBB::INPUT_INT),
"pddir" => $mybb->get_input('pddir', MyBB::INPUT_INT),

		"forums" => $mybb->get_input('forums', MyBB::INPUT_ARRAY),

		"forums" => $forums,

		"findthreadst" => $mybb->get_input('findthreadst', MyBB::INPUT_INT),
"numreplies" => $mybb->get_input('numreplies', MyBB::INPUT_INT),
"threadprefix" => $mybb->get_input('threadprefix', MyBB::INPUT_ARRAY)

		"findthreadst" => $mybb->get_input('findthreadst', MyBB::INPUT_INT),
"numreplies" => $mybb->get_input('numreplies', MyBB::INPUT_INT),
"threadprefix" => $mybb->get_input('threadprefix', MyBB::INPUT_ARRAY)