Vergleich search.php - 1.03 - 1.16

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 55Zeile 55
		$sortorder = "DESC";
$order = "desc";
}

		$sortorder = "DESC";
$order = "desc";
}

	if($sortby == "subject")
{
$sortfield = "subject";
}
elseif($sortby == "replies")
{
$sortfield = "replies";
}
elseif($sortby == "views")
{
$sortfield = "views";
}
elseif($sortby == "starter")
{
$sortfield = "username";
}
elseif($sortby == "lastposter")
{
$sortfield = "t.lastposter";
}
elseif($sortby == "dateline")
{
$sortfield = "p.dateline";





    if($sortby == "subject")
{
$sortfield = "subject";
}
elseif($sortby == "replies")
{
$sortfield = "replies";
}
elseif($sortby == "views")
{
$sortfield = "views";
}
elseif($sortby == "starter")
{
$sortfield = "username";
}
elseif($sortby == "lastposter")
{
$sortfield = "t.lastposter";
}
elseif($sortby == "dateline")
{
$sortfield = "p.dateline";
}
elseif($sortby == "forum")
{
$sortfield = "f.name";

	}
else
{

	}
else
{

Zeile 214Zeile 218
				}
}
if(!$donenew)

				}
}
if(!$donenew)

			{

			{

				$tread = mygetarraycookie("threadread", $result['tid']);
if($result['lastpost'] > $tread)
{

				$tread = mygetarraycookie("threadread", $result['tid']);
if($result['lastpost'] > $tread)
{

Zeile 347Zeile 351
		"dateline" => time(),
"ipaddress" => $ipaddress,
"wheresql" => $wheresql,

		"dateline" => time(),
"ipaddress" => $ipaddress,
"wheresql" => $wheresql,

		"lookin" => "p.message",
"showposts" => 2
);
$plugins->run_hooks("search_do_search_process");

		"lookin" => "p.message",
"showposts" => 2
);
$plugins->run_hooks("search_do_search_process");

	$db->insert_query(TABLE_PREFIX."searchlog", $searcharray);
$sid = $db->insert_id();


	$db->insert_query(TABLE_PREFIX."searchlog", $searcharray);
$sid = $db->insert_id();


Zeile 583Zeile 587
		}
foreach($mybb->input['forums'] as $forum)
{

		}
foreach($mybb->input['forums'] as $forum)
{

 
			$forum = intval($forum);

			if(!$searchin[$forum])
{
$query = $db->query("SELECT f.fid FROM ".TABLE_PREFIX."forums f LEFT JOIN ".TABLE_PREFIX."forumpermissions p ON (f.fid=p.fid AND p.gid='".$mybb->user[usergroup]."') WHERE INSTR(CONCAT(',',parentlist,','),',$forum,') > 0 AND active!='no' AND (ISNULL(p.fid) OR p.cansearch='yes')");

			if(!$searchin[$forum])
{
$query = $db->query("SELECT f.fid FROM ".TABLE_PREFIX."forums f LEFT JOIN ".TABLE_PREFIX."forumpermissions p ON (f.fid=p.fid AND p.gid='".$mybb->user[usergroup]."') WHERE INSTR(CONCAT(',',parentlist,','),',$forum,') > 0 AND active!='no' AND (ISNULL(p.fid) OR p.cansearch='yes')");

Zeile 624Zeile 629
		$permsql = " AND t.fid NOT IN ($unsearchforums)";
}


		$permsql = " AND t.fid NOT IN ($unsearchforums)";
}


	$query = $db->query("SELECT p.tid FROM ".TABLE_PREFIX."posts p, ".TABLE_PREFIX."threads t WHERE $wheresql $permsql");
$results = $db->num_rows($query);




	$wheresql .= " AND p.tid=t.tid";

$query = $db->query("SELECT COUNT(p.tid) AS count FROM ".TABLE_PREFIX."posts p, ".TABLE_PREFIX."threads t WHERE $wheresql $permsql");
$count = $db->fetch_array($query);
$results = $count['count'];


if(!$results)
{


if(!$results)
{