Vergleich search.php - 1.8.15 - 1.8.21

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 90Zeile 90
			}
break;
case "forum":

			}
break;
case "forum":

			$sortfield = "t.fid";

			$sortfield = "f.name";

			break;
case "starter":
if($search['resulttype'] == "threads")

			break;
case "starter":
if($search['resulttype'] == "threads")

Zeile 339Zeile 339
		if($inactiveforums)
{
$permsql .= " AND t.fid NOT IN ($inactiveforums)";

		if($inactiveforums)
{
$permsql .= " AND t.fid NOT IN ($inactiveforums)";

 
		}

$pages = ceil($threadcount / $perpage);
if($page > $pages)
{
$start = 0;
$page = 1;

		}

// Begin selecting matching threads, cache them.

		}

// Begin selecting matching threads, cache them.

Zeile 352Zeile 359
			SELECT t.*, u.username AS userusername
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)

			SELECT t.*, u.username AS userusername
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)

 
			LEFT JOIN ".TABLE_PREFIX."forums f ON (t.fid=f.fid)

			WHERE $where_conditions AND {$unapproved_where} {$permsql} AND t.closed NOT LIKE 'moved|%'
ORDER BY $sortfield $order
LIMIT $start, $perpage

			WHERE $where_conditions AND {$unapproved_where} {$permsql} AND t.closed NOT LIKE 'moved|%'
ORDER BY $sortfield $order
LIMIT $start, $perpage

Zeile 373Zeile 381
		if(empty($thread_ids))
{
error($lang->error_nosearchresults);

		if(empty($thread_ids))
{
error($lang->error_nosearchresults);

		}


		}


		// 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)
{

Zeile 383Zeile 391
			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;

			}

			}

		}

// Fetch the read threads.

		}

// Fetch the read threads.

Zeile 400Zeile 408
		{
$mybb->settings['maxmultipagelinks'] = 5;
}

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





		$results = '';

foreach($thread_cache as $thread)

		$results = '';

foreach($thread_cache as $thread)

Zeile 408Zeile 416
			$bgcolor = alt_trow();
$folder = '';
$prefix = '';

			$bgcolor = alt_trow();
$folder = '';
$prefix = '';





			// Unapproved colour
if($thread['visible'] == 0)
{

			// Unapproved colour
if($thread['visible'] == 0)
{

Zeile 448Zeile 456
				$icon = " ";
}
if($thread['poll'])

				$icon = " ";
}
if($thread['poll'])

			{

			{

				$prefix = $lang->poll_prefix;
}


				$prefix = $lang->poll_prefix;
}


Zeile 456Zeile 464
			$folder = '';
$folder_label = '';
if(isset($thread['dot_icon']))

			$folder = '';
$folder_label = '';
if(isset($thread['dot_icon']))

			{

			{

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

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

Zeile 464Zeile 472
			$isnew = 0;
$donenew = 0;
$last_read = 0;

			$isnew = 0;
$donenew = 0;
$last_read = 0;





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

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

Zeile 473Zeile 481
				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

			{
$forum_read = $forumsread[$thread['fid']];
}

			{
$forum_read = $forumsread[$thread['fid']];
}

Zeile 489Zeile 497
				else
{
$last_read = $read_cutoff;

				else
{
$last_read = $read_cutoff;

				}
}
else
{

				}
}
else
{

				$last_read = my_get_array_cookie("threadread", $thread['tid']);
}


				$last_read = my_get_array_cookie("threadread", $thread['tid']);
}


Zeile 509Zeile 517
				$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost").$highlight;
eval("\$gotounread = \"".$templates->get("forumdisplay_thread_gotounread")."\";");
$unreadpost = 1;

				$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost").$highlight;
eval("\$gotounread = \"".$templates->get("forumdisplay_thread_gotounread")."\";");
$unreadpost = 1;

			}

			}

			else
{
$new_class = 'subject_old';

			else
{
$new_class = 'subject_old';

Zeile 523Zeile 531
			}
if($thread['closed'] == 1)
{

			}
if($thread['closed'] == 1)
{

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

				$folder .= "close";
$folder_label .= $lang->icon_close;

			}
$folder .= "folder";


			}
$folder .= "folder";


Zeile 545Zeile 553
					$thread['posts'] += $thread['deletedposts'];
}
if(is_moderator($thread['fid'], "canviewunapprove") == true)

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

				{

				{

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

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

Zeile 814Zeile 822
				if(!empty($forum_permissions['canonlyviewownthreads']))
{
$onlyusfids[] = $fid;

				if(!empty($forum_permissions['canonlyviewownthreads']))
{
$onlyusfids[] = $fid;

				}
}

				}
}


if($onlyusfids)
{


if($onlyusfids)
{

Zeile 874Zeile 882

$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)}) AND {$unapproved_where}");
while($post = $db->fetch_array($query))
{
$dot_icon[$post['tid']] = true;
}

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

		}


		}


		$results = '';

		$results = '';

 

$pages = ceil($postcount / $perpage);
if($page > $pages)
{
$start = 0;
$page = 1;
}


$query = $db->query("
SELECT p.*, u.username AS userusername, t.subject AS thread_subject, t.replies AS thread_replies, t.views AS thread_views, t.lastpost AS thread_lastpost, t.closed AS thread_closed, t.uid as thread_uid
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)


$query = $db->query("
SELECT p.*, u.username AS userusername, t.subject AS thread_subject, t.replies AS thread_replies, t.views AS thread_views, t.lastpost AS thread_lastpost, t.closed AS thread_closed, t.uid as thread_uid
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)

 
			LEFT JOIN ".TABLE_PREFIX."forums f ON (t.fid=f.fid)

			WHERE p.pid IN (".$db->escape_string($search['posts']).")
ORDER BY $sortfield $order
LIMIT $start, $perpage

			WHERE p.pid IN (".$db->escape_string($search['posts']).")
ORDER BY $sortfield $order
LIMIT $start, $perpage

Zeile 1017Zeile 1033
			}
if($post['thread_closed'] == 1)
{

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

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

				$folder .= "close";
$folder_label .= $lang->icon_close;

			}
$folder .= "folder";


			}
$folder .= "folder";