Vergleich showthread.php - 1.4.1 - 1.4.2

  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: showthread.php 4081 2008-08-08 01:47:02Z Tikitiki $

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

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 118Zeile 118
	$query = $db->simple_select("threadsread", "dateline", "uid='{$mybb->user['uid']}' AND tid='{$thread['tid']}'");
$thread_read = $db->fetch_field($query, "dateline");


	$query = $db->simple_select("threadsread", "dateline", "uid='{$mybb->user['uid']}' AND tid='{$thread['tid']}'");
$thread_read = $db->fetch_field($query, "dateline");


	// Get forum read date
$forumread = my_get_array_cookie("forumread", $fid);

// If last visit is greater than forum read, change forum read date
if($mybb->user['lastvisit'] > $forumread)

	if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'])





	{

	{

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












		$query = $db->simple_select("forumsread", "dateline", "fid='{$fid}' AND uid='{$mybb->user['uid']}'");
$forum_read = $db->fetch_field($query, "dateline");

$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 = my_get_array_cookie("forumread", $fid);

	}

	}

	if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $thread['lastpost'] > $forumread)


	
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $thread['lastpost'] > $forum_read)

	{
$cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
if($thread['lastpost'] > $cutoff)

	{
$cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
if($thread['lastpost'] > $cutoff)

Zeile 141Zeile 149
			}
}
}

			}
}
}

 
	

	if(!$lastread)

	if(!$lastread)

	{

	{

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

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

		if($readcookie > $forumread)
{

		if($readcookie > $forum_read)
{

			$lastread = $readcookie;

			$lastread = $readcookie;

		}

		}

		else
{

		else
{

			$lastread = $forumread;

			$lastread = $forum_read;

		}
}

		}
}

 
	

	// Next, find the proper pid to link to.
$options = array(
"limit_start" => 0,

	// Next, find the proper pid to link to.
$options = array(
"limit_start" => 0,

Zeile 164Zeile 174
	$newpost = $db->fetch_array($query);
if($newpost['pid'])
{

	$newpost = $db->fetch_array($query);
if($newpost['pid'])
{

		header("Location:".htmlspecialchars_decode(get_post_link($newpost['pid'], $tid))."#pid{$newpost['pid']}");

		header("Location: ".htmlspecialchars_decode(get_post_link($newpost['pid'], $tid))."#pid{$newpost['pid']}");

	}
else
{

	}
else
{

Zeile 199Zeile 209
		$query = $db->simple_select('posts', 'pid', "tid={$tid}", $options);
$pid = $db->fetch_field($query, "pid");
}

		$query = $db->simple_select('posts', 'pid', "tid={$tid}", $options);
$pid = $db->fetch_field($query, "pid");
}

	header("Location:".htmlspecialchars_decode(get_post_link($pid, $tid))."#pid{$pid}");

	header("Location: ".htmlspecialchars_decode(get_post_link($pid, $tid))."#pid{$pid}");

	exit;

	exit;

}

}


// Jump to the next newest posts.
if($mybb->input['action'] == "nextnewest")


// Jump to the next newest posts.
if($mybb->input['action'] == "nextnewest")

Zeile 218Zeile 228
	if(!$nextthread['tid'])
{
error($lang->error_nonextnewest);

	if(!$nextthread['tid'])
{
error($lang->error_nonextnewest);

	}

	}

	$options = array(
"limit_start" => 0,
"limit" => 1,

	$options = array(
"limit_start" => 0,
"limit" => 1,

Zeile 226Zeile 236
		"order_dir" => "desc"
);
$query = $db->simple_select('posts', 'pid', "tid='{$nextthread['tid']}'", $options);

		"order_dir" => "desc"
);
$query = $db->simple_select('posts', 'pid', "tid='{$nextthread['tid']}'", $options);


// Redirect to the proper page.


// Redirect to the proper page.

	$pid = $db->fetch_field($query, "pid");

	$pid = $db->fetch_field($query, "pid");

	header("Location:".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");

	header("Location: ".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");

}

// Jump to the next oldest posts.
if($mybb->input['action'] == "nextoldest")

}

// Jump to the next oldest posts.
if($mybb->input['action'] == "nextoldest")

{
$options = array(
"limit" => 1,
"limit_start" => 0,

{
$options = array(
"limit" => 1,
"limit_start" => 0,

		"order_by" => "lastpost",
"order_dir" => "desc"
);

		"order_by" => "lastpost",
"order_dir" => "desc"
);

Zeile 246Zeile 256

// Are there actually next oldest posts?
if(!$nextthread['tid'])


// Are there actually next oldest posts?
if(!$nextthread['tid'])

	{

	{

		error($lang->error_nonextoldest);
}
$options = array(

		error($lang->error_nonextoldest);
}
$options = array(

Zeile 259Zeile 269

// Redirect to the proper page.
$pid = $db->fetch_field($query, "pid");


// Redirect to the proper page.
$pid = $db->fetch_field($query, "pid");

	header("Location:".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");

	header("Location: ".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");

}

if($mybb->input['pid'])

}

if($mybb->input['pid'])

Zeile 275Zeile 285
	if($thread['firstpost'] == 0)
{
update_first_post($tid);

	if($thread['firstpost'] == 0)
{
update_first_post($tid);

	}


	}


	// Does this thread have a poll?
if($thread['poll'])
{

	// Does this thread have a poll?
if($thread['poll'])
{

Zeile 303Zeile 313
			{	
$alreadyvoted = 1;
$votedfor[$votecheck['voteoption']] = 1;

			{	
$alreadyvoted = 1;
$votedfor[$votecheck['voteoption']] = 1;

			}
}

			}
}

		else
{
if($mybb->cookies['pollvotes'][$poll['pid']])

		else
{
if($mybb->cookies['pollvotes'][$poll['pid']])

Zeile 350Zeile 360
			{
$optionbg = "trow1";
$votestar = "";

			{
$optionbg = "trow1";
$votestar = "";

			}

			}


// If the user already voted or if the results need to be shown, do so; else show voting screen.
if($alreadyvoted || $showresults)


// If the user already voted or if the results need to be shown, do so; else show voting screen.
if($alreadyvoted || $showresults)

Zeile 717Zeile 727
			$page = 1;
}
$upper = $start+$perpage;

			$page = 1;
}
$upper = $start+$perpage;

 
		
// Work out if we have terms to highlight
$highlight = "";
if($mybb->input['highlight'])
{
if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && $_SERVER['SEO_SUPPORT'] == 1))
{
$highlight = "?highlight=".urlencode($mybb->input['highlight']);
}
else
{
$highlight = "&amp;highlight=".urlencode($mybb->input['highlight']);
}
}





		$multipage = multipage($postcount, $perpage, $page, str_replace("{tid}", $tid, THREAD_URL_PAGED));

		$multipage = multipage($postcount, $perpage, $page, str_replace("{tid}", $tid, THREAD_URL_PAGED.$highlight));

		if($postcount > $perpage)
{
eval("\$threadpages = \"".$templates->get("showthread_multipage")."\";");

		if($postcount > $perpage)
{
eval("\$threadpages = \"".$templates->get("showthread_multipage")."\";");