Vergleich inc/functions_search.php - 1.8.33 - 1.8.37

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 355Zeile 355
	// Brace depth
$depth = 0;
$phrase_operator = '+';

	// Brace depth
$depth = 0;
$phrase_operator = '+';

 
	$inquote = false;

	foreach($keywords as $phrase)
{
$phrase = trim($phrase);

	foreach($keywords as $phrase)
{
$phrase = trim($phrase);

Zeile 1238Zeile 1239

$thread_prefixcut = '';
$prefixlist = array();


$thread_prefixcut = '';
$prefixlist = array();

	if($search['threadprefix'] && $search['threadprefix'][0] != 'any')

	if(!empty($search['threadprefix']) && $search['threadprefix'][0] != 'any')

	{
foreach($search['threadprefix'] as $threadprefix)
{

	{
foreach($search['threadprefix'] as $threadprefix)
{

Zeile 1526Zeile 1527
	}
$post_usersql = '';
$thread_usersql = '';

	}
$post_usersql = '';
$thread_usersql = '';

	if($search['author'])

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

	{
$userids = array();
$search['author'] = my_strtolower($search['author']);
if($search['matchusername'])

	{
$userids = array();
$search['author'] = my_strtolower($search['author']);
if($search['matchusername'])

		{

		{

			$user = get_user_by_username($search['author']);
if($user)

			$user = get_user_by_username($search['author']);
if($user)

			{
$userids[] = $user['uid'];
}
}

			{
$userids[] = $user['uid'];
}
}

		else
{
$query = $db->simple_select("users", "uid", "username LIKE '%".$db->escape_string_like($search['author'])."%'");

		else
{
$query = $db->simple_select("users", "uid", "username LIKE '%".$db->escape_string_like($search['author'])."%'");

Zeile 1546Zeile 1547
			{
$userids[] = $user['uid'];
}

			{
$userids[] = $user['uid'];
}

		}

		}


if(count($userids) < 1)


if(count($userids) < 1)

		{
error($lang->error_nosearchresults);
}

		{
error($lang->error_nosearchresults);
}

		else
{
$userids = implode(',', $userids);

		else
{
$userids = implode(',', $userids);

Zeile 1560Zeile 1561
		}
}
$datecut = $thread_datecut = $post_datecut = '';

		}
}
$datecut = $thread_datecut = $post_datecut = '';

	if($search['postdate'])

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

	{
if($search['pddir'] == 0)
{

	{
if($search['pddir'] == 0)
{

Zeile 1578Zeile 1579
	}

$thread_replycut = '';

	}

$thread_replycut = '';

	if($search['numreplies'] != '' && $search['findthreadst'])

	if(!empty($search['numreplies']) && $search['findthreadst'])

	{
if((int)$search['findthreadst'] == 1)
{
$thread_replycut = " AND t.replies >= '".(int)$search['numreplies']."'";

	{
if((int)$search['findthreadst'] == 1)
{
$thread_replycut = " AND t.replies >= '".(int)$search['numreplies']."'";

		}

		}

		else
{
$thread_replycut = " AND t.replies <= '".(int)$search['numreplies']."'";

		else
{
$thread_replycut = " AND t.replies <= '".(int)$search['numreplies']."'";

Zeile 1592Zeile 1593

$thread_prefixcut = '';
$prefixlist = array();


$thread_prefixcut = '';
$prefixlist = array();

	if($search['threadprefix'] && $search['threadprefix'][0] != 'any')
{

	if(!empty($search['threadprefix']) && $search['threadprefix'][0] != 'any')
{

		foreach($search['threadprefix'] as $threadprefix)
{
$threadprefix = (int)$threadprefix;
$prefixlist[] = $threadprefix;
}

		foreach($search['threadprefix'] as $threadprefix)
{
$threadprefix = (int)$threadprefix;
$prefixlist[] = $threadprefix;
}

	}

	}

	if(count($prefixlist) == 1)
{
$thread_prefixcut .= " AND t.prefix='$threadprefix' ";

	if(count($prefixlist) == 1)
{
$thread_prefixcut .= " AND t.prefix='$threadprefix' ";

	}

	}

	else
{
if(count($prefixlist) > 1)

	else
{
if(count($prefixlist) > 1)

Zeile 1647Zeile 1648
	$group_permissions = forum_permissions();
foreach($group_permissions as $fid => $forum_permissions)
{

	$group_permissions = forum_permissions();
foreach($group_permissions as $fid => $forum_permissions)
{

		if($forum_permissions['canonlyviewownthreads'] == 1)

		if(isset($forum_permissions['canonlyviewownthreads']) && $forum_permissions['canonlyviewownthreads'] == 1)

		{
$onlyusfids[] = $fid;
}

		{
$onlyusfids[] = $fid;
}

Zeile 1709Zeile 1710

// Searching a specific thread?
$tidsql = '';


// Searching a specific thread?
$tidsql = '';

	if($search['tid'])

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

	{
$tidsql = " AND t.tid='".(int)$search['tid']."'";

	{
$tidsql = " AND t.tid='".(int)$search['tid']."'";

	}

	}


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


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

	{

	{

		$limitsql = "LIMIT ".(int)$mybb->settings['searchhardlimit'];
}


		$limitsql = "LIMIT ".(int)$mybb->settings['searchhardlimit'];
}


Zeile 1727Zeile 1728
	if($search['postthread'] == 1)
{
// No need to search subjects when looking for results within a specific thread

	if($search['postthread'] == 1)
{
// No need to search subjects when looking for results within a specific thread

		if(!$search['tid'])

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

		{
$query = $db->query("
SELECT t.tid, t.firstpost

		{
$query = $db->query("
SELECT t.tid, t.firstpost