Vergleich showthread.php - 1.8.27 - 1.8.37

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 204Zeile 204
if($mybb->input['action'] == "newpost")
{
// First, figure out what time the thread or forum were last read

if($mybb->input['action'] == "newpost")
{
// First, figure out what time the thread or forum were last read

 
	$lastread = $cutoff = 0;

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


Zeile 269Zeile 270
	$query = $db->simple_select("posts", "pid", "tid='{$tid}' AND dateline > '{$lastread}' {$visibleonly}", $options);
$newpost = $db->fetch_array($query);


	$query = $db->simple_select("posts", "pid", "tid='{$tid}' AND dateline > '{$lastread}' {$visibleonly}", $options);
$newpost = $db->fetch_array($query);


	if($newpost['pid'] && $lastread)

	if($newpost && $lastread)

	{
$highlight = '';
if($mybb->get_input('highlight'))

	{
$highlight = '';
if($mybb->get_input('highlight'))

Zeile 333Zeile 334
	$nextthread = $db->fetch_array($query);

// Are there actually next newest posts?

	$nextthread = $db->fetch_array($query);

// Are there actually next newest posts?

	if(!$nextthread['tid'])

	if(!$nextthread)

	{
error($lang->error_nonextnewest);
}

	{
error($lang->error_nonextnewest);
}

Zeile 363Zeile 364
	$nextthread = $db->fetch_array($query);

// Are there actually next oldest posts?

	$nextthread = $db->fetch_array($query);

// Are there actually next oldest posts?

	if(!$nextthread['tid'])

	if(!$nextthread)

	{
error($lang->error_nonextoldest);
}

	{
error($lang->error_nonextoldest);
}

Zeile 617Zeile 618
		// Decide what poll status to show depending on the status of the poll and whether or not the user voted already.
if(isset($alreadyvoted) || isset($showresults) || isset($nopermission))
{

		// Decide what poll status to show depending on the status of the poll and whether or not the user voted already.
if(isset($alreadyvoted) || isset($showresults) || isset($nopermission))
{

			if($alreadyvoted)



			$undovote = '';

if(isset($alreadyvoted))

			{
$pollstatus = $lang->already_voted;


			{
$pollstatus = $lang->already_voted;


				$undovote = '';

 
				if($mybb->usergroup['canundovotes'] == 1)
{
eval("\$undovote = \"".$templates->get("showthread_poll_undovote")."\";");
}
}

				if($mybb->usergroup['canundovotes'] == 1)
{
eval("\$undovote = \"".$templates->get("showthread_poll_undovote")."\";");
}
}

			elseif($nopermission)

			elseif(isset($nopermission))

			{
$pollstatus = $lang->no_voting_permission;
}

			{
$pollstatus = $lang->no_voting_permission;
}

Zeile 665Zeile 667
	}

// Create the forum jump dropdown box.

	}

// Create the forum jump dropdown box.

 
	$forumjump = '';

	if($mybb->settings['enableforumjump'] != 0)
{
$forumjump = build_forum_jump("", $fid, 1);

	if($mybb->settings['enableforumjump'] != 0)
{
$forumjump = build_forum_jump("", $fid, 1);

Zeile 762Zeile 765
	// Work out the thread rating for this thread.
$rating = $ratethread = '';
if($mybb->settings['allowthreadratings'] != 0 && $forum['allowtratings'] != 0)

	// Work out the thread rating for this thread.
$rating = $ratethread = '';
if($mybb->settings['allowthreadratings'] != 0 && $forum['allowtratings'] != 0)

	{

	{

		$rated = 0;
$lang->load("ratethread");
if($thread['numratings'] <= 0)

		$rated = 0;
$lang->load("ratethread");
if($thread['numratings'] <= 0)

Zeile 797Zeile 800
	}

// Can this user perform searches? If so, we can show them the "Search thread" form

	}

// Can this user perform searches? If so, we can show them the "Search thread" form

 
	$search_thread='';

	if($forumpermissions['cansearch'] != 0)
{
eval("\$search_thread = \"".$templates->get("showthread_search")."\";");

	if($forumpermissions['cansearch'] != 0)
{
eval("\$search_thread = \"".$templates->get("showthread_search")."\";");

Zeile 859Zeile 863
			WHERE p.tid='$tid' $visibleonly_p $where
");
$showpost = $db->fetch_array($query);

			WHERE p.tid='$tid' $visibleonly_p $where
");
$showpost = $db->fetch_array($query);

 

// Is there actually a pid to display?
if(!$showpost)
{
error($lang->error_invalidpost);
}


// Choose what pid to display.
if(!$mybb->input['pid'])
{
$mybb->input['pid'] = $showpost['pid'];


// Choose what pid to display.
if(!$mybb->input['pid'])
{
$mybb->input['pid'] = $showpost['pid'];

		}

// Is there actually a pid to display?
if(!$showpost['pid'])
{
error($lang->error_invalidpost);
}


		}








		$attachcache = array();
if($mybb->settings['enableattachments'] == 1 && $thread['attachmentcount'] > 0 || is_moderator($fid, 'caneditposts'))
{

		$attachcache = array();
if($mybb->settings['enableattachments'] == 1 && $thread['attachmentcount'] > 0 || is_moderator($fid, 'caneditposts'))
{

Zeile 882Zeile 886
				$attachcache[$attachment['pid']][$attachment['aid']] = $attachment;
}
}

				$attachcache[$attachment['pid']][$attachment['aid']] = $attachment;
}
}





		$multipage = '';

// Build the threaded post display tree.

		$multipage = '';

// Build the threaded post display tree.

Zeile 905Zeile 909
				}
$tree[$post['replyto']][$post['pid']] = $post;
$postsdone[$post['pid']] = 1;

				}
$tree[$post['replyto']][$post['pid']] = $post;
$postsdone[$post['pid']] = 1;

			}

			}

		}

$threadedbits = buildtree();

		}

$threadedbits = buildtree();

Zeile 1047Zeile 1051
				else
{
$highlight = "&amp;highlight=".urlencode($mybb->get_input('highlight'));

				else
{
$highlight = "&amp;highlight=".urlencode($mybb->get_input('highlight'));

				}

				}

			}

if($defaultmode != "linear")

			}

if($defaultmode != "linear")

Zeile 1126Zeile 1130
	if($mybb->settings['showsimilarthreads'] != 0)
{
$own_perm = '';

	if($mybb->settings['showsimilarthreads'] != 0)
{
$own_perm = '';

		if($forumpermissions['canonlyviewownthreads'] == 1)

		if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] == 1)

		{
$own_perm = " AND t.uid={$mybb->user['uid']}";
}

		{
$own_perm = " AND t.uid={$mybb->user['uid']}";
}

Zeile 1191Zeile 1195
				{
$similar_thread['threadprefix'] = $prefix['displaystyle'].'&nbsp;';
}

				{
$similar_thread['threadprefix'] = $prefix['displaystyle'].'&nbsp;';
}

 
			}
else
{
$similar_thread['threadprefix'] = '';

			}

$similar_thread['subject'] = $parser->parse_badwords($similar_thread['subject']);

			}

$similar_thread['subject'] = $parser->parse_badwords($similar_thread['subject']);

Zeile 1519Zeile 1527
	}

// Get users viewing this thread

	}

// Get users viewing this thread

 
	$usersbrowsing='';

	if($mybb->settings['browsingthisthread'] != 0)
{
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];

	if($mybb->settings['browsingthisthread'] != 0)
{
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];