Vergleich search.php - 1.4.0 - 1.4.3

  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 3869 2008-05-27 00:05:03Z Tikitiki $

 * $Id: search.php 4178 2008-09-06 16:39:10Z Tikitiki $

 */


define("IN_MYBB", 1);
define("IGNORE_CLEAN_VARS", "sid");

 */


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

Zeile 140Zeile 141
	$upper = $end;

// Work out if we have terms to highlight

	$upper = $end;

// Work out if we have terms to highlight

 
	$highlight = "";

	if($search['keywords'])
{
if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && $_SERVER['SEO_SUPPORT'] == 1))

	if($search['keywords'])
{
if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && $_SERVER['SEO_SUPPORT'] == 1))

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


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


 
	if($mybb->user['uid'] == 0)
{
// Build a forum cache.
$query = $db->query("
SELECT fid
FROM ".TABLE_PREFIX."forums
WHERE active != 0
ORDER BY pid, disporder
");

$forumsread = unserialize($mybb->cookies['mybb']['forumread']);
}
else
{
// Build a forum cache.
$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']}')
WHERE f.active != 0
ORDER BY pid, disporder
");
}
while($forum = $db->fetch_array($query))
{
if($mybb->user['uid'] == 0)
{
if($forumsread[$forum['fid']])
{
$forum['lastread'] = $forumsread[$forum['fid']];
}
}
$readforums[$forum['fid']] = $forum['lastread'];
}

	$fpermissions = forum_permissions();

// Inline Mod Column for moderators

	$fpermissions = forum_permissions();

// Inline Mod Column for moderators

Zeile 289Zeile 325
		{
$query = $db->simple_select("threadsread", "tid,dateline", "uid='".$mybb->user['uid']."' AND tid IN(".$thread_ids.")");
while($readthread = $db->fetch_array($query))

		{
$query = $db->simple_select("threadsread", "tid,dateline", "uid='".$mybb->user['uid']."' AND tid IN(".$thread_ids.")");
while($readthread = $db->fetch_array($query))

			{

			{

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

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

Zeile 340Zeile 376
			$gotounread = '';
$isnew = 0;
$donenew = 0;

			$gotounread = '';
$isnew = 0;
$donenew = 0;

			$lastread = 0;

if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $thread['lastpost'] > $forumread)
{
$cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
if($thread['lastpost'] > $cutoff)
{
if($thread['lastread'])
{
$lastread = $thread['lastread'];
}
else
{
$lastread = 1;
}
}
}
$lastread = $thread['lastread'];
if(!$lastread)
{
$readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']);
if($readcookie > $forumread)
{
$lastread = $readcookie;
}
elseif($forumread > $mybb->user['lastvisit'])
{
$lastread = $forumread;

			$last_read = 0;

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

$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
if($forum_read == 0 || $forum_read < $read_cutoff)
{
$forum_read = $read_cutoff;
}
}
else
{
$forum_read = $forumsread[$thread['fid']];
}

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







				}
else
{

				}
else
{

					$lastread = $mybb->user['lastvisit'];

					$last_read = $read_cutoff;

				}

				}

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

if($forum_read > $last_read)
{
$last_read = $forum_read;

			}


			}


			if($thread['lastpost'] > $lastread && $lastread)

			if($thread['lastpost'] > $last_read && $last_read)

			{
$folder .= "new";
$new_class = "subject_new";
$folder_label .= $lang->icon_new;

			{
$folder .= "new";
$new_class = "subject_new";
$folder_label .= $lang->icon_new;

				$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost");

				$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost").$highlight;

				eval("\$gotounread = \"".$templates->get("forumdisplay_thread_gotounread")."\";");
$unreadpost = 1;
}

				eval("\$gotounread = \"".$templates->get("forumdisplay_thread_gotounread")."\";");
$unreadpost = 1;
}

Zeile 419Zeile 458
				if($thread['pages'] > 4)
{
$pagesstop = 4;

				if($thread['pages'] > 4)
{
$pagesstop = 4;

					$page_link = get_thread_link($thread['tid'], $thread['pages']);

					$page_link = get_thread_link($thread['tid'], $thread['pages']).$highlight;

					eval("\$morelink = \"".$templates->get("forumdisplay_thread_multipage_more")."\";");
}
else

					eval("\$morelink = \"".$templates->get("forumdisplay_thread_multipage_more")."\";");
}
else

Zeile 428Zeile 467
				}
for($i = 1; $i <= $pagesstop; ++$i)
{

				}
for($i = 1; $i <= $pagesstop; ++$i)
{

					$page_link = get_thread_link($thread['tid'], $i);

					$page_link = get_thread_link($thread['tid'], $i).$highlight;

					eval("\$threadpages .= \"".$templates->get("forumdisplay_thread_multipage_page")."\";");
}

					eval("\$threadpages .= \"".$templates->get("forumdisplay_thread_multipage_page")."\";");
}

				eval("\$thread[multipage] = \"".$templates->get("forumdisplay_thread_multipage")."\";");

				eval("\$thread['multipage'] = \"".$templates->get("forumdisplay_thread_multipage")."\";");

			}
else
{

			}
else
{

Zeile 700Zeile 739
			$gotounread = '';
$isnew = 0;
$donenew = 0;

			$gotounread = '';
$isnew = 0;
$donenew = 0;

			$lastread = 0;

			$last_read = 0;

			$post['thread_lastread'] = $readthreads[$post['tid']];
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $post['thread_lastpost'] > $forumread)
{

			$post['thread_lastread'] = $readthreads[$post['tid']];
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $post['thread_lastpost'] > $forumread)
{

Zeile 709Zeile 748
				{
if($post['thread_lastread'])
{

				{
if($post['thread_lastread'])
{

						$lastread = $post['thread_lastread'];

						$last_read = $post['thread_lastread'];

					}
else
{

					}
else
{

						$lastread = 1;

						$last_read = 1;

					}
}
}

					}
}
}

Zeile 724Zeile 763
				$folder_label .= $lang->icon_dot;
}


				$folder_label .= $lang->icon_dot;
}


			if(!$lastread)

			if(!$last_read)

			{
$readcookie = $threadread = my_get_array_cookie("threadread", $post['tid']);
if($readcookie > $forumread)
{

			{
$readcookie = $threadread = my_get_array_cookie("threadread", $post['tid']);
if($readcookie > $forumread)
{

					$lastread = $readcookie;

					$last_read = $readcookie;

				}
elseif($forumread > $mybb->user['lastvisit'])
{

				}
elseif($forumread > $mybb->user['lastvisit'])
{

					$lastread = $forumread;

					$last_read = $forumread;

				}
else
{

				}
else
{

					$lastread = $mybb->user['lastvisit'];

					$last_read = $mybb->user['lastvisit'];

				}
}


				}
}


			if($post['thread_lastpost'] > $lastread && $lastread)

			if($post['thread_lastpost'] > $last_read && $last_read)

			{
$folder .= "new";
$folder_label .= $lang->icon_new;

			{
$folder .= "new";
$folder_label .= $lang->icon_new;