Vergleich search.php - 1.8.3 - 1.8.7

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 166Zeile 166
	$sorturl = "search.php?action=results&sid={$sid}";
$thread_url = "";
$post_url = "";

	$sorturl = "search.php?action=results&sid={$sid}";
$thread_url = "";
$post_url = "";

	



	$orderarrow = array('replies' => '', 'views' => '', 'subject' => '', 'forum' => '', 'starter' => '', 'lastpost' => '', 'dateline' => '');

eval("\$orderarrow['$sortby'] = \"".$templates->get("search_orderarrow")."\";");

	$orderarrow = array('replies' => '', 'views' => '', 'subject' => '', 'forum' => '', 'starter' => '', 'lastpost' => '', 'dateline' => '');

eval("\$orderarrow['$sortby'] = \"".$templates->get("search_orderarrow")."\";");

Zeile 236Zeile 236
		$threadcount = 0;

// Moderators can view unapproved threads

		$threadcount = 0;

// Moderators can view unapproved threads

		$query = $db->simple_select("moderators", "fid", "(id='{$mybb->user['uid']}' AND isgroup='0') OR (id='{$mybb->user['usergroup']}' AND isgroup='1')");

		$query = $db->simple_select("moderators", "fid, canviewunapprove, canviewdeleted", "(id='{$mybb->user['uid']}' AND isgroup='0') OR (id='{$mybb->user['usergroup']}' AND isgroup='1')");

		if($mybb->usergroup['issupermod'] == 1)
{
// Super moderators (and admins)

		if($mybb->usergroup['issupermod'] == 1)
{
// Super moderators (and admins)

Zeile 245Zeile 245
		elseif($db->num_rows($query))
{
// Normal moderators

		elseif($db->num_rows($query))
{
// Normal moderators

			$moderated_forums = '0';
while($forum = $db->fetch_array($query))
{
$moderated_forums .= ','.$forum['fid'];
}
$unapproved_where = "(t.visible>0 OR (t.visible IN (-1,0) AND t.fid IN ({$moderated_forums})))";
}
else
{




















			$unapprove_forums = array();
$deleted_forums = array();
$unapproved_where = '(t.visible = 1';
while($moderator = $db->fetch_array($query))
{
if($moderator['canviewunapprove'] == 1)
{
$unapprove_forums[] = $moderator['fid'];
}

if($moderator['canviewdeleted'] == 1)
{
$deleted_forums[] = $moderator['fid'];
}
}

if(!empty($unapprove_forums))
{
$unapproved_where .= " OR (t.visible = 0 AND t.fid IN(".implode(',', $unapprove_forums)."))";
}
if(!empty($deleted_forums))
{
$unapproved_where .= " OR (t.visible = -1 AND t.fid IN(".implode(',', $deleted_forums)."))";
}
$unapproved_where .= ')';
}
else
{

			// Normal users
$unapproved_where = 't.visible>0';
}

			// Normal users
$unapproved_where = 't.visible>0';
}

Zeile 334Zeile 353
			FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
WHERE $where_conditions AND {$unapproved_where} {$permsql} AND t.closed NOT LIKE 'moved|%'

			FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
WHERE $where_conditions AND {$unapproved_where} {$permsql} AND t.closed NOT LIKE 'moved|%'

			ORDER BY $sortfield $order

			ORDER BY $sortfield $order

			LIMIT $start, $perpage
");


			LIMIT $start, $perpage
");


Zeile 359Zeile 378
		// 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)
{

			$query = $db->simple_select("posts", "DISTINCT tid,uid", "uid='".$mybb->user['uid']."' AND tid IN(".$thread_ids.")");


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

			while($thread = $db->fetch_array($query))
{
$thread_cache[$thread['tid']]['dot_icon'] = 1;

			while($thread = $db->fetch_array($query))
{
$thread_cache[$thread['tid']]['dot_icon'] = 1;

Zeile 373Zeile 393
			while($readthread = $db->fetch_array($query))
{
$thread_cache[$readthread['tid']]['lastread'] = $readthread['dateline'];

			while($readthread = $db->fetch_array($query))
{
$thread_cache[$readthread['tid']]['lastread'] = $readthread['dateline'];

			}
}

			}
}


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


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

		{

		{

			$mybb->settings['maxmultipagelinks'] = 5;
}

$results = '';

			$mybb->settings['maxmultipagelinks'] = 5;
}

$results = '';





		foreach($thread_cache as $thread)
{
$bgcolor = alt_trow();

		foreach($thread_cache as $thread)
{
$bgcolor = alt_trow();

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

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

			}

			}

			elseif($thread['visible'] == -1)

			elseif($thread['visible'] == -1)

			{

			{

				$bgcolor = 'trow_shaded trow_deleted';

				$bgcolor = 'trow_shaded trow_deleted';

			}

			}


if($thread['userusername'])


if($thread['userusername'])

			{

			{

				$thread['username'] = $thread['userusername'];

				$thread['username'] = $thread['userusername'];

			}

			}

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

// If this thread has a prefix, insert a space between prefix and subject

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

// If this thread has a prefix, insert a space between prefix and subject

Zeile 410Zeile 430
			{
$thread['threadprefix'] .= ' ';
}

			{
$thread['threadprefix'] .= ' ';
}





			$thread['subject'] = $parser->parse_badwords($thread['subject']);
$thread['subject'] = htmlspecialchars_uni($thread['subject']);

			$thread['subject'] = $parser->parse_badwords($thread['subject']);
$thread['subject'] = htmlspecialchars_uni($thread['subject']);





			if(isset($icon_cache[$thread['icon']]))
{
$posticon = $icon_cache[$thread['icon']];

			if(isset($icon_cache[$thread['icon']]))
{
$posticon = $icon_cache[$thread['icon']];

Zeile 452Zeile 472
				if($forum_read == 0 || $forum_read < $read_cutoff)
{
$forum_read = $read_cutoff;

				if($forum_read == 0 || $forum_read < $read_cutoff)
{
$forum_read = $read_cutoff;

				}

				}

			}
else
{

			}
else
{

Zeile 492Zeile 512
			else
{
$new_class = 'subject_old';

			else
{
$new_class = 'subject_old';

				$folder_label .= $lang->icon_no_new;
}

if($thread['replies'] >= $mybb->settings['hottopic'] || $thread['views'] >= $mybb->settings['hottopicviews'])
{
$folder .= "hot";

				$folder_label .= $lang->icon_no_new;
}

if($thread['replies'] >= $mybb->settings['hottopic'] || $thread['views'] >= $mybb->settings['hottopicviews'])
{
$folder .= "hot";

				$folder_label .= $lang->icon_hot;
}
if($thread['closed'] == 1)

				$folder_label .= $lang->icon_hot;
}
if($thread['closed'] == 1)

Zeile 518Zeile 538
			$morelink = '';
$thread['posts'] = $thread['replies'] + 1;
if(is_moderator($thread['fid'], "canviewunapprove"))

			$morelink = '';
$thread['posts'] = $thread['replies'] + 1;
if(is_moderator($thread['fid'], "canviewunapprove"))

			{

			{

				$thread['posts'] += $thread['unapprovedposts'];
}

				$thread['posts'] += $thread['unapprovedposts'];
}

 
			if(is_moderator($thread['fid'], "canviewdeleted"))
{
$thread['posts'] += $thread['deletedposts'];
}


			if($thread['posts'] > $mybb->settings['postsperpage'])
{
$thread['pages'] = $thread['posts'] / $mybb->settings['postsperpage'];

			if($thread['posts'] > $mybb->settings['postsperpage'])
{
$thread['pages'] = $thread['posts'] / $mybb->settings['postsperpage'];

Zeile 558Zeile 583
			if($lastposteruid == 0)
{
$lastposterlink = $lastposter;

			if($lastposteruid == 0)
{
$lastposterlink = $lastposter;

			}
else

			}
else

			{
$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}

			{
$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}

Zeile 599Zeile 624
				}

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

				}

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

			}

			}

			else
{
$attachment_count = '';

			else
{
$attachment_count = '';

Zeile 634Zeile 659
		{
error($lang->error_nosearchresults);
}

		{
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', 1));

		$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));

		if($upper > $threadcount)
{
$upper = $threadcount;

		if($upper > $threadcount)
{
$upper = $threadcount;

Zeile 658Zeile 683
					break;
default:
$query = $db->simple_select("modtools", "tid, name", "type='t' AND (CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='')");

					break;
default:
$query = $db->simple_select("modtools", "tid, name", "type='t' AND (CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='')");

			}

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

			}

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

				eval("\$customthreadtools .= \"".$templates->get("search_results_threads_inlinemoderation_custom_tool")."\";");
}
// Build inline moderation dropdown

				eval("\$customthreadtools .= \"".$templates->get("search_results_threads_inlinemoderation_custom_tool")."\";");
}
// Build inline moderation dropdown

Zeile 680Zeile 705
	else // Displaying results as posts
{
if(!$search['posts'])

	else // Displaying results as posts
{
if(!$search['posts'])

		{
error($lang->error_nosearchresults);
}

		{
error($lang->error_nosearchresults);
}


$postcount = 0;


$postcount = 0;





		// Moderators can view unapproved threads

		// Moderators can view unapproved threads

		$query = $db->simple_select("moderators", "fid", "(id='{$mybb->user['uid']}' AND isgroup='0') OR (id='{$mybb->user['usergroup']}' AND isgroup='1')");

		$query = $db->simple_select("moderators", "fid, canviewunapprove, canviewdeleted", "(id='{$mybb->user['uid']}' AND isgroup='0') OR (id='{$mybb->user['usergroup']}' AND isgroup='1')");

		if($mybb->usergroup['issupermod'] == 1)

		if($mybb->usergroup['issupermod'] == 1)

		{

		{

			// Super moderators (and admins)

			// Super moderators (and admins)

			$p_unapproved_where = "visible >= -1";
$t_unapproved_where = "visible < -1";

			$unapproved_where = "visible >= -1";


		}
elseif($db->num_rows($query))
{
// Normal moderators

		}
elseif($db->num_rows($query))
{
// Normal moderators

			$moderated_forums = '0';
while($forum = $db->fetch_array($query))





















			$unapprove_forums = array();
$deleted_forums = array();
$unapproved_where = '(visible = 1';

while($moderator = $db->fetch_array($query))
{
if($moderator['canviewunapprove'] == 1)
{
$unapprove_forums[] = $moderator['fid'];
}

if($moderator['canviewdeleted'] == 1)
{
$deleted_forums[] = $moderator['fid'];
}
}

if(!empty($unapprove_forums))
{
$unapproved_where .= " OR (visible = 0 AND fid IN(".implode(',', $unapprove_forums)."))";
}
if(!empty($deleted_forums))

			{

			{

				$moderated_forums .= ','.$forum['fid'];
$test_moderated_forums[$forum['fid']] = $forum['fid'];

				$unapproved_where .= " OR (visible = -1 AND fid IN(".implode(',', $deleted_forums)."))";


			}

			}

			$p_unapproved_where = "(visible>0 OR (visible IN (-1,0) AND fid IN ({$moderated_forums})))";
$t_unapproved_where = "(visible<0 AND (visible <1 OR fid NOT IN ({$moderated_forums})))";

			$unapproved_where .= ')';


		}
else
{
// Normal users

		}
else
{
// Normal users

			$p_unapproved_where = 'visible=1';
$t_unapproved_where = 'visible < 1';

			$unapproved_where = 'visible = 1';


		}

$post_cache_options = array();

		}

$post_cache_options = array();

Zeile 728Zeile 769
		$tids = array();
$pids = array();
// Make sure the posts we're viewing we have permission to view.

		$tids = array();
$pids = array();
// Make sure the posts we're viewing we have permission to view.

		$query = $db->simple_select("posts", "pid, tid", "pid IN(".$db->escape_string($search['posts']).") AND {$p_unapproved_where}", $post_cache_options);

		$query = $db->simple_select("posts", "pid, tid", "pid IN(".$db->escape_string($search['posts']).") AND {$unapproved_where}", $post_cache_options);

		while($post = $db->fetch_array($query))
{
$pids[$post['pid']] = $post['tid'];
$tids[$post['tid']][$post['pid']] = $post['pid'];

		while($post = $db->fetch_array($query))
{
$pids[$post['pid']] = $post['tid'];
$tids[$post['tid']][$post['pid']] = $post['pid'];

		}


		}


		if(!empty($pids))
{
$temp_pids = array();

		if(!empty($pids))
{
$temp_pids = array();

 

$group_permissions = forum_permissions();
$permsql = '';
$onlyusfids = array();

foreach($group_permissions as $fid => $forum_permissions)
{
if(!empty($forum_permissions['canonlyviewownthreads']))
{
$onlyusfids[] = $fid;
}
}

if($onlyusfids)
{
$permsql .= " OR (fid IN(".implode(',', $onlyusfids).") AND uid!={$mybb->user['uid']})";
}
$unsearchforums = get_unsearchable_forums();
if($unsearchforums)
{
$permsql .= " OR fid IN ($unsearchforums)";
}
$inactiveforums = get_inactive_forums();
if($inactiveforums)
{
$permsql .= " OR fid IN ($inactiveforums)";
}


// Check the thread records as well. If we don't have permissions, remove them from the listing.


// Check the thread records as well. If we don't have permissions, remove them from the listing.

			$query = $db->simple_select("threads", "tid", "tid IN(".$db->escape_string(implode(',', $pids)).") AND ({$t_unapproved_where} OR closed LIKE 'moved|%')");

			$query = $db->simple_select("threads", "tid", "tid IN(".$db->escape_string(implode(',', $pids)).") AND ({$unapproved_where}{$permsql} OR closed LIKE 'moved|%')");

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

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

				if(array_key_exists($thread['tid'], $tids) != false)

				if(array_key_exists($thread['tid'], $tids) != true)

				{
$temp_pids = $tids[$thread['tid']];
foreach($temp_pids as $pid)

				{
$temp_pids = $tids[$thread['tid']];
foreach($temp_pids as $pid)

Zeile 776Zeile 844
			while($readthread = $db->fetch_array($query))
{
$readthreads[$readthread['tid']] = $readthread['dateline'];

			while($readthread = $db->fetch_array($query))
{
$readthreads[$readthread['tid']] = $readthread['dateline'];

			}
}

			}
}


$dot_icon = array();
if($mybb->settings['dotfolders'] != 0 && $mybb->user['uid'] != 0)
{


$dot_icon = array();
if($mybb->settings['dotfolders'] != 0 && $mybb->user['uid'] != 0)
{

			$query = $db->simple_select("posts", "DISTINCT tid,uid", "uid='".$mybb->user['uid']."' AND tid IN(".$db->escape_string($tids).")");

			$query = $db->simple_select("posts", "DISTINCT tid,uid", "uid='{$mybb->user['uid']}' AND tid IN({$db->escape_string($tids)}) AND {$unapproved_where}");

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

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

Zeile 834Zeile 902
			}

if(!empty($forumcache[$thread['fid']]))

			}

if(!empty($forumcache[$thread['fid']]))

			{
$post['forumlink'] = "<a href=\"".get_forum_link($post['fid'])."\">".$forumcache[$post['fid']]['name']."</a>";
}
else
{

			{
$post['forumlink'] = "<a href=\"".get_forum_link($post['fid'])."\">".$forumcache[$post['fid']]['name']."</a>";
}
else
{

				$post['forumlink'] = "";
}
// Determine the folder

				$post['forumlink'] = "";
}
// Determine the folder

Zeile 849Zeile 917
			$donenew = 0;
$last_read = 0;
$post['thread_lastread'] = $readthreads[$post['tid']];

			$donenew = 0;
$last_read = 0;
$post['thread_lastread'] = $readthreads[$post['tid']];





			if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'])
{
$forum_read = $readforums[$post['fid']];

			if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'])
{
$forum_read = $readforums[$post['fid']];

Zeile 858Zeile 926
				if($forum_read == 0 || $forum_read < $read_cutoff)
{
$forum_read = $read_cutoff;

				if($forum_read == 0 || $forum_read < $read_cutoff)
{
$forum_read = $read_cutoff;

				}
}

				}
}

			else
{
$forum_read = $forumsread[$post['fid']];

			else
{
$forum_read = $forumsread[$post['fid']];

Zeile 878Zeile 946
					{
$last_read = 1;
}

					{
$last_read = 1;
}

				}
}


				}
}


			if(isset($dot_icon[$post['tid']]))

			if(isset($dot_icon[$post['tid']]))

			{

			{

				$folder = "dot_";
$folder_label .= $lang->icon_dot;
}

				$folder = "dot_";
$folder_label .= $lang->icon_dot;
}

Zeile 897Zeile 965
				elseif($forum_read > $mybb->user['lastvisit'])
{
$last_read = $forum_read;

				elseif($forum_read > $mybb->user['lastvisit'])
{
$last_read = $forum_read;

				}
else
{

				}
else
{

					$last_read = $mybb->user['lastvisit'];
}
}

					$last_read = $mybb->user['lastvisit'];
}
}

Zeile 1000Zeile 1068
		if(!$results)
{
error($lang->error_nosearchresults);

		if(!$results)
{
error($lang->error_nosearchresults);

		}
$multipage = multipage($postcount, $perpage, $page, "search.php?action=results&amp;sid=".htmlspecialchars_uni($mybb->get_input('sid'))."&amp;sortby=$sortby&amp;order=$order&amp;uid=".$mybb->get_input('uid', 1));

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

		if($upper > $postcount)
{
$upper = $postcount;

		if($upper > $postcount)
{
$upper = $postcount;

Zeile 1038Zeile 1106
				eval("\$customposttools = \"".$templates->get("search_results_posts_inlinemoderation_custom")."\";");
}
eval("\$inlinemod = \"".$templates->get("search_results_posts_inlinemoderation")."\";");

				eval("\$customposttools = \"".$templates->get("search_results_posts_inlinemoderation_custom")."\";");
}
eval("\$inlinemod = \"".$templates->get("search_results_posts_inlinemoderation")."\";");

		}

$plugins->run_hooks("search_results_end");


		}

$plugins->run_hooks("search_results_end");


		eval("\$searchresults = \"".$templates->get("search_results_posts")."\";");
output_page($searchresults);

		eval("\$searchresults = \"".$templates->get("search_results_posts")."\";");
output_page($searchresults);

	}

	}

}
elseif($mybb->input['action'] == "findguest")
{
$where_sql = "uid='0'";

}
elseif($mybb->input['action'] == "findguest")
{
$where_sql = "uid='0'";


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

$permsql = "";


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

$permsql = "";

	$onlyusfids = array();

// Check group permissions if we can't view threads not started by us

	$onlyusfids = array();

// Check group permissions if we can't view threads not started by us

Zeile 1076Zeile 1144
	if(!empty($onlyusfids))
{
$where_sql .= " AND fid NOT IN(".implode(',', $onlyusfids).")";

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

	}

$options = array(
'order_by' => 'dateline',
'order_dir' => 'desc'
);

	}

$options = array(
'order_by' => 'dateline',
'order_dir' => 'desc'
);


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


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

	}

	}


$pids = '';
$comma = '';


$pids = '';
$comma = '';

Zeile 1102Zeile 1170
	$comma = '';
$query = $db->simple_select("threads", "tid", $where_sql);
while($tid = $db->fetch_field($query, "tid"))

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

	{

	{

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

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

Zeile 1125Zeile 1193
}
elseif($mybb->input['action'] == "finduser")
{

}
elseif($mybb->input['action'] == "finduser")
{

	$where_sql = "uid='".$mybb->get_input('uid', 1)."'";

	$where_sql = "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";


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


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

Zeile 1164Zeile 1232
	if($mybb->settings['searchhardlimit'] > 0)
{
$options['limit'] = (int)$mybb->settings['searchhardlimit'];

	if($mybb->settings['searchhardlimit'] > 0)
{
$options['limit'] = (int)$mybb->settings['searchhardlimit'];

	}


	}


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

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

Zeile 1202Zeile 1270
}
elseif($mybb->input['action'] == "finduserthreads")
{

}
elseif($mybb->input['action'] == "finduserthreads")
{

	$where_sql = "t.uid='".$mybb->get_input('uid', 1)."'";

	$where_sql = "t.uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";


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


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

Zeile 1253Zeile 1321

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



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


	if($mybb->get_input('fid', 1))

	if($mybb->get_input('fid', MyBB::INPUT_INT))

	{

	{

		$where_sql .= " AND t.fid='".$mybb->get_input('fid', 1)."'";

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

	}
else if($mybb->get_input('fids'))
{

	}
else if($mybb->get_input('fids'))
{

Zeile 1318Zeile 1386
}
elseif($mybb->input['action'] == "getdaily")
{

}
elseif($mybb->input['action'] == "getdaily")
{

	if($mybb->get_input('days', 1) < 1)

	if($mybb->get_input('days', MyBB::INPUT_INT) < 1)

	{
$days = 1;
}
else
{

	{
$days = 1;
}
else
{

		$days = $mybb->get_input('days', 1);

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

	}
$datecut = TIME_NOW-(86400*$days);

$where_sql = "t.lastpost >='".$datecut."'";


	}
$datecut = TIME_NOW-(86400*$days);

$where_sql = "t.lastpost >='".$datecut."'";


	if($mybb->get_input('fid', 1))

	if($mybb->get_input('fid', MyBB::INPUT_INT))

	{

	{

		$where_sql .= " AND t.fid='".$mybb->get_input('fid', 1)."'";

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

	}
else if($mybb->get_input('fids'))
{

	}
else if($mybb->get_input('fids'))
{

Zeile 1439Zeile 1507
	$search_data = array(
"keywords" => $mybb->input['keywords'],
"author" => $mybb->get_input('author'),

	$search_data = array(
"keywords" => $mybb->input['keywords'],
"author" => $mybb->get_input('author'),

		"postthread" => $mybb->get_input('postthread', 1),
"matchusername" => $mybb->get_input('matchusername', 1),
"postdate" => $mybb->get_input('postdate', 1),
"pddir" => $mybb->get_input('pddir', 1),

		"postthread" => $mybb->get_input('postthread', 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->input['forums'],

		"forums" => $mybb->input['forums'],

		"findthreadst" => $mybb->get_input('findthreadst', 1),
"numreplies" => $mybb->get_input('numreplies', 1),
"threadprefix" => $mybb->get_input('threadprefix', 2)

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

	);

if(is_moderator() && !empty($mybb->input['visible']))
{

	);

if(is_moderator() && !empty($mybb->input['visible']))
{

		$search_data['visible'] = $mybb->get_input('visible', 1);

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

	}

if($db->can_search == true)

	}

if($db->can_search == true)

Zeile 1500Zeile 1568
else if($mybb->input['action'] == "thread")
{
// Fetch thread info

else if($mybb->input['action'] == "thread")
{
// Fetch thread info

	$thread = get_thread($mybb->get_input('tid', 1));
if(is_moderator($fid))
{
$ismod = true;
}
else
{
$ismod = false;
}
if(!$thread || ($thread['visible'] != 1 && $ismod == false && ($thread['visible'] != -1 || $mybb->settings['soft_delete'] != 1 || $mybb->settings['soft_delete_show_own'] != 1 || !$mybb->user['uid'] || $mybb->user['uid'] != $thread['uid'])) || ($thread['visible'] > 1 && $ismod == true))

	$thread = get_thread($mybb->get_input('tid', MyBB::INPUT_INT));
$ismod = is_moderator($thread['fid']);

if(!$thread || ($thread['visible'] != 1 && $ismod == false && ($thread['visible'] != -1 || $mybb->settings['soft_delete'] != 1 || !$mybb->user['uid'] || $mybb->user['uid'] != $thread['uid'])) || ($thread['visible'] > 1 && $ismod == true))







	{
error($lang->error_invalidthread);
}

	{
error($lang->error_invalidthread);
}

Zeile 1570Zeile 1632
	$search_data = array(
"keywords" => $mybb->input['keywords'],
"postthread" => 1,

	$search_data = array(
"keywords" => $mybb->input['keywords'],
"postthread" => 1,

		"tid" => $mybb->get_input('tid', 1)

		"tid" => $mybb->get_input('tid', MyBB::INPUT_INT)

	);

if($db->can_search == true)

	);

if($db->can_search == true)