Vergleich search.php - 1.6.7 - 1.6.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: search.php 5765 2012-03-27 09:52:45Z Tomm $

 * $Id$

 */

 */



 

define("IN_MYBB", 1);
define("IGNORE_CLEAN_VARS", "sid");
define('THIS_SCRIPT', 'search.php');


define("IN_MYBB", 1);
define("IGNORE_CLEAN_VARS", "sid");
define('THIS_SCRIPT', 'search.php');





$templatelist = "search,forumdisplay_thread_gotounread,search_results_threads_thread,search_results_threads,search_results_posts,search_results_posts_post";
$templatelist .= ",multipage_nextpage,multipage_page_current,multipage_page,multipage_start,multipage_end,multipage,forumdisplay_thread_multipage_more,forumdisplay_thread_multipage_page,forumdisplay_thread_multipage";

$templatelist = "search,forumdisplay_thread_gotounread,search_results_threads_thread,search_results_threads,search_results_posts,search_results_posts_post";
$templatelist .= ",multipage_nextpage,multipage_page_current,multipage_page,multipage_start,multipage_end,multipage,forumdisplay_thread_multipage_more,forumdisplay_thread_multipage_page,forumdisplay_thread_multipage";

$templatelist .= ",search_results_posts_inlinecheck,search_results_posts_nocheck,search_results_threads_inlinecheck,search_results_threads_nocheck,search_results_inlinemodcol,search_results_posts_inlinemoderation_custom_tool,search_results_posts_inlinemoderation_custom,search_results_posts_inlinemoderation,search_results_threads_inlinemoderation_custom_tool,search_results_threads_inlinemoderation_custom,search_results_threads_inlinemoderation,search_orderarrow,search_moderator_options";
$templatelist .= ",forumdisplay_thread_attachment_count,forumdisplay_threadlist_inlineedit_js,search_threads_inlinemoderation_selectall";



$templatelist .= ",search_results_posts_inlinecheck,search_results_posts_nocheck,search_results_threads_inlinecheck,search_results_threads_nocheck,search_results_inlinemodcol,search_results_posts_inlinemoderation_custom_tool";
$templatelist .= ",search_results_posts_inlinemoderation_custom,search_results_posts_inlinemoderation,search_results_threads_inlinemoderation_custom_tool,search_results_threads_inlinemoderation_custom,search_results_threads_inlinemoderation,search_orderarrow,search_moderator_options";
$templatelist .= ",forumdisplay_thread_attachment_count,forumdisplay_threadlist_inlineedit_js,search_threads_inlinemoderation_selectall,search_posts_inlinemoderation_selectall,multipage_prevpage";


require_once "./global.php";

require_once "./global.php";

 


require_once MYBB_ROOT."inc/functions_post.php";
require_once MYBB_ROOT."inc/functions_search.php";
require_once MYBB_ROOT."inc/class_parser.php";

require_once MYBB_ROOT."inc/functions_post.php";
require_once MYBB_ROOT."inc/functions_search.php";
require_once MYBB_ROOT."inc/class_parser.php";

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

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

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

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

}

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

}

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

Zeile 66Zeile 68
	$plugins->run_hooks("search_results_start");

// Decide on our sorting fields and sorting order.

	$plugins->run_hooks("search_results_start");

// Decide on our sorting fields and sorting order.

	$order = my_strtolower(htmlspecialchars($mybb->input['order']));
$sortby = my_strtolower(htmlspecialchars($mybb->input['sortby']));

	$order = my_strtolower(htmlspecialchars_uni($mybb->input['order']));
$sortby = my_strtolower(htmlspecialchars_uni($mybb->input['sortby']));


switch($sortby)
{


switch($sortby)
{

Zeile 189Zeile 191
	else
{
// Build a forum cache.

	else
{
// Build a forum cache.

		$query = $db->query("

		$query = $db->query("

			SELECT f.fid, fr.dateline AS lastread
FROM ".TABLE_PREFIX."forums f
LEFT JOIN ".TABLE_PREFIX."forumsread fr ON (fr.fid=f.fid AND fr.uid='{$mybb->user['uid']}')

			SELECT f.fid, fr.dateline AS lastread
FROM ".TABLE_PREFIX."forums f
LEFT JOIN ".TABLE_PREFIX."forumsread fr ON (fr.fid=f.fid AND fr.uid='{$mybb->user['uid']}')

Zeile 365Zeile 367
			{
$thread_cache[$readthread['tid']]['lastread'] = $readthread['dateline'];
}

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

 
		}

if(!$mybb->settings['maxmultipagelinks'])
{
$mybb->settings['maxmultipagelinks'] = 5;

		}

foreach($thread_cache as $thread)

		}

foreach($thread_cache as $thread)

Zeile 502Zeile 509
			{
$thread['pages'] = $thread['posts'] / $mybb->settings['postsperpage'];
$thread['pages'] = ceil($thread['pages']);

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

				if($thread['pages'] > 4)

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

				{

				{

					$pagesstop = 4;

					$pagesstop = $mybb->settings['maxmultipagelinks'] - 1;

					$page_link = get_thread_link($thread['tid'], $thread['pages']).$highlight;
eval("\$morelink = \"".$templates->get("forumdisplay_thread_multipage_more")."\";");
}

					$page_link = get_thread_link($thread['tid'], $thread['pages']).$highlight;
eval("\$morelink = \"".$templates->get("forumdisplay_thread_multipage_more")."\";");
}

Zeile 889Zeile 896
				$folder .= "hot";
$folder_label .= $lang->icon_hot;
}

				$folder .= "hot";
$folder_label .= $lang->icon_hot;
}

			if($thread['thread_closed'] == 1)

			if($post['thread_closed'] == 1)

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

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

Zeile 973Zeile 980
			$num_results = $db->num_rows($query);
$lang->page_selected = $lang->sprintf($lang->page_selected, intval($num_results));
$lang->select_all = $lang->sprintf($lang->select_all, intval($postcount));

			$num_results = $db->num_rows($query);
$lang->page_selected = $lang->sprintf($lang->page_selected, intval($num_results));
$lang->select_all = $lang->sprintf($lang->select_all, intval($postcount));

			$lang->all_selected = $lang->sprintf($lang->page_selected, intval($postcount));

			$lang->all_selected = $lang->sprintf($lang->all_selected, intval($postcount));

			eval("\$selectall = \"".$templates->get("search_posts_inlinemoderation_selectall")."\";");

$customthreadtools = $customposttools = '';

			eval("\$selectall = \"".$templates->get("search_posts_inlinemoderation_selectall")."\";");

$customthreadtools = $customposttools = '';

Zeile 1459Zeile 1466
	{
$sortorder = "desc";
}

	{
$sortorder = "desc";
}

	$sortby = htmlspecialchars($mybb->input['sortby']);

	$sortby = htmlspecialchars_uni($mybb->input['sortby']);

	$plugins->run_hooks("search_do_search_end");
redirect("search.php?action=results&sid=".$sid."&sortby=".$sortby."&order=".$sortorder, $lang->redirect_searchresults);
}

	$plugins->run_hooks("search_do_search_end");
redirect("search.php?action=results&sid=".$sid."&sortby=".$sortby."&order=".$sortorder, $lang->redirect_searchresults);
}