Vergleich search.php - 1.4.9 - 1.4.14

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: search.php 4375 2009-05-26 12:06:03Z Tomm $

 * $Id: search.php 4505 2009-11-13 15:59:56Z Tomm $

 */



 */



Zeile 48Zeile 48
$limitsql = "";
if(intval($mybb->settings['searchhardlimit']) > 0)
{

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

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

	$limitsql = "ORDER BY t.dateline DESC LIMIT ".intval($mybb->settings['searchhardlimit']);

}

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

}

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

Zeile 638Zeile 638
			$t_unapproved_where = 'visible < 1';
}


			$t_unapproved_where = 'visible < 1';
}


		$post_cache_options = array('LIMIT' => intval($mybb->settings['searchhardlimit']));





		$post_cache_options = array();
if(intval($mybb->settings['searchhardlimit']) > 0)
{
$post_cache_options['limit'] = intval($mybb->settings['searchhardlimit']);
}

		if(strpos($sortfield, 'p.') !== false)
{
$post_cache_options['order_by'] = str_replace('p.', '', $sortfield);

		if(strpos($sortfield, 'p.') !== false)
{
$post_cache_options['order_by'] = str_replace('p.', '', $sortfield);

Zeile 653Zeile 657
		{
$pids[$post['pid']] = $post['tid'];
$tids[$post['tid']][$post['pid']] = $post['pid'];

		{
$pids[$post['pid']] = $post['tid'];
$tids[$post['tid']][$post['pid']] = $post['pid'];

		}

		}

		
if(!empty($pids))
{

		
if(!empty($pids))
{

Zeile 674Zeile 678
				}
}
unset($temp_pids);

				}
}
unset($temp_pids);

		}


		}


		// Declare our post count
$postcount = count($pids);

		// Declare our post count
$postcount = count($pids);

		

		

		if(!$postcount)

		if(!$postcount)

		{
error($lang->error_nosearchresults);
}


		{
error($lang->error_nosearchresults);
}


		// And now we have our sanatized post list
$search['posts'] = implode(',', array_keys($pids));


		// And now we have our sanatized post list
$search['posts'] = implode(',', array_keys($pids));


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

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

			}

			}

		}

$query = $db->query("

		}

$query = $db->query("

Zeile 728Zeile 732
			if($post['userusername'])
{
$post['username'] = $post['userusername'];

			if($post['userusername'])
{
$post['username'] = $post['userusername'];

			}

			}

			$post['profilelink'] = build_profile_link($post['username'], $post['uid']);
$post['subject'] = $parser->parse_badwords($post['subject']);
$post['thread_subject'] = $parser->parse_badwords($post['thread_subject']);

			$post['profilelink'] = build_profile_link($post['username'], $post['uid']);
$post['subject'] = $parser->parse_badwords($post['subject']);
$post['thread_subject'] = $parser->parse_badwords($post['thread_subject']);

Zeile 817Zeile 821
				$folder_label .= $lang->icon_hot;
}
if($thread['thread_closed'] == 1)

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

			{

			{

				$folder .= "lock";
$folder_label .= $lang->icon_lock;
}

				$folder .= "lock";
$folder_label .= $lang->icon_lock;
}

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

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

			}

			}

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

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

Zeile 923Zeile 927
		eval("\$searchresults = \"".$templates->get("search_results_posts")."\";");
$plugins->run_hooks("search_results_end");
output_page($searchresults);

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

	}

	}

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

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

Zeile 941Zeile 945
	}

$options = array(

	}

$options = array(

		'LIMIT' => intval($mybb->settings['searchhardlimit']),

 
		'order_by' => 'dateline',

		'order_by' => 'dateline',

		'order_dir' => 'DESC'

		'order_dir' => 'desc'

	);

	);

 

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


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


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

Zeile 952Zeile 961
	while($pid = $db->fetch_field($query, "pid"))
{
$pids .= $comma.$pid;

	while($pid = $db->fetch_field($query, "pid"))
{
$pids .= $comma.$pid;

			$comma = ',';
}

			$comma = ',';
}

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

	
$tids = '';
$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 975Zeile 984
		"resulttype" => "posts",
"querycache" => '',
"keywords" => ''

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

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

Zeile 986Zeile 995
	
$unsearchforums = get_unsearchable_forums();
if($unsearchforums)

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

	{

	{

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

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

Zeile 996Zeile 1005
	}

$options = array(

	}

$options = array(

		'LIMIT' => intval($mybb->settings['searchhardlimit']),

 
		'order_by' => 'dateline',

		'order_by' => 'dateline',

		'order_dir' => 'DESC'

		'order_dir' => 'desc'

	);

	);

 

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


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


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