Vergleich forumdisplay.php - 1.8.9 - 1.8.18

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 611Zeile 611

if($fpermissions['canviewthreads'] != 0)
{


if($fpermissions['canviewthreads'] != 0)
{

	// How many posts are there?
if(($datecut > 0 && $datecut != 9999) || isset($fpermissions['canonlyviewownthreads']) && $fpermissions['canonlyviewownthreads'] == 1)
{
$query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $useronly $visibleonly $datecutsql $prefixsql");
$threadcount = $db->fetch_field($query, "threads");
}
else
{
$query = $db->simple_select("forums", "threads, unapprovedthreads, deletedthreads", "fid = '{$fid}'", array('limit' => 1));
$forum_threads = $db->fetch_array($query);
$threadcount = $forum_threads['threads'];
if($ismod == true)
{
$threadcount += $forum_threads['unapprovedthreads'] + $forum_threads['deletedthreads'];
}

// If we have 0 threads double check there aren't any "moved" threads
if($threadcount == 0)
{
$query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $useronly $visibleonly", array('limit' => 1));
$threadcount = $db->fetch_field($query, "threads");
}
}

	// How many threads are there?
$query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $useronly $visibleonly $datecutsql $prefixsql");
$threadcount = $db->fetch_field($query, "threads");





















}

// How many pages are there?

}

// How many pages are there?

Zeile 938Zeile 918

// Check participation by the current user in any of these threads - for 'dot' folder icons
if($mybb->settings['dotfolders'] != 0 && $mybb->user['uid'] && !empty($threadcache))


// Check participation by the current user in any of these threads - for 'dot' folder icons
if($mybb->settings['dotfolders'] != 0 && $mybb->user['uid'] && !empty($threadcache))

{

{

	$query = $db->simple_select("posts", "DISTINCT tid,uid", "uid='{$mybb->user['uid']}' AND tid IN ({$tids}) {$visibleonly}");
while($post = $db->fetch_array($query))
{
if(!empty($moved_threads[$post['tid']]))

	$query = $db->simple_select("posts", "DISTINCT tid,uid", "uid='{$mybb->user['uid']}' AND tid IN ({$tids}) {$visibleonly}");
while($post = $db->fetch_array($query))
{
if(!empty($moved_threads[$post['tid']]))

		{

		{

			$post['tid'] = $moved_threads[$post['tid']];
}
if($threadcache[$post['tid']])
{
$threadcache[$post['tid']]['doticon'] = 1;

			$post['tid'] = $moved_threads[$post['tid']];
}
if($threadcache[$post['tid']])
{
$threadcache[$post['tid']]['doticon'] = 1;

		}
}
}

		}
}
}


// Read threads
if($mybb->user['uid'] && $mybb->settings['threadreadcut'] > 0 && !empty($threadcache))


// Read threads
if($mybb->user['uid'] && $mybb->settings['threadreadcut'] > 0 && !empty($threadcache))

Zeile 988Zeile 968
	if(isset($mybb->cookies['mybb']['readallforums']) && !$forum_read)
{
$forum_read = $mybb->cookies['mybb']['lastvisit'];

	if(isset($mybb->cookies['mybb']['readallforums']) && !$forum_read)
{
$forum_read = $mybb->cookies['mybb']['lastvisit'];

	}

	}

}

}





$unreadpost = 0;
$threads = '';
if(!empty($threadcache) && is_array($threadcache))

$unreadpost = 0;
$threads = '';
if(!empty($threadcache) && is_array($threadcache))

Zeile 1001Zeile 981
	}

if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)

	}

if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)

	{

	{

		$mybb->settings['postsperpage'] = 20;
}


		$mybb->settings['postsperpage'] = 20;
}


Zeile 1039Zeile 1019
		$thread['author'] = $thread['uid'];
if(!$thread['username'])
{

		$thread['author'] = $thread['uid'];
if(!$thread['username'])
{

			$thread['username'] = $thread['profilelink'] = htmlspecialchars_uni($thread['threadusername']);








			if(!$thread['threadusername'])
{
$thread['username'] = $thread['profilelink'] = htmlspecialchars_uni($lang->guest);
}
else
{
$thread['username'] = $thread['profilelink'] = htmlspecialchars_uni($thread['threadusername']);
}

		}
else
{

		}
else
{

Zeile 1121Zeile 1108
		$threadpages = '';
$morelink = '';
$thread['posts'] = $thread['replies'] + 1;

		$threadpages = '';
$morelink = '';
$thread['posts'] = $thread['replies'] + 1;


if($thread['unapprovedposts'] > 0 && $ismod)

		if(is_moderator($fid, "canviewdeleted") == true || is_moderator($fid, "canviewunapprove") == true)


		{

		{

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












			if(is_moderator($fid, "canviewdeleted") == true)
{
$thread['posts'] += $thread['deletedposts'];
}
if(is_moderator($fid, "canviewunapprove") == true)
{
$thread['posts'] += $thread['unapprovedposts'];
}
}
elseif($fpermissions['canviewdeletionnotice'] != 0)
{
$thread['posts'] += $thread['deletedposts'];

		}

		}





		if($thread['posts'] > $mybb->settings['postsperpage'])
{
$thread['pages'] = $thread['posts'] / $mybb->settings['postsperpage'];
$thread['pages'] = ceil($thread['pages']);

if($thread['pages'] > $mybb->settings['maxmultipagelinks'])

		if($thread['posts'] > $mybb->settings['postsperpage'])
{
$thread['pages'] = $thread['posts'] / $mybb->settings['postsperpage'];
$thread['pages'] = ceil($thread['pages']);

if($thread['pages'] > $mybb->settings['maxmultipagelinks'])

			{

			{

				$pagesstop = $mybb->settings['maxmultipagelinks'] - 1;
$page_link = get_thread_link($thread['tid'], $thread['pages']);
eval("\$morelink = \"".$templates->get("forumdisplay_thread_multipage_more")."\";");

				$pagesstop = $mybb->settings['maxmultipagelinks'] - 1;
$page_link = get_thread_link($thread['tid'], $thread['pages']);
eval("\$morelink = \"".$templates->get("forumdisplay_thread_multipage_more")."\";");

			}

			}

			else
{
$pagesstop = $thread['pages'];

			else
{
$pagesstop = $thread['pages'];

			}

			}


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


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

Zeile 1150Zeile 1147
			}

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

			}

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

		}
else

		}
else

		{
$threadpages = '';
$morelink = '';

		{
$threadpages = '';
$morelink = '';

Zeile 1160Zeile 1157

if($ismod)
{


if($ismod)
{

			if(isset($mybb->cookies[$inlinecookie]) && my_strpos($mybb->cookies[$inlinecookie], "|{$thread['tid']}|"))

			if(isset($mybb->cookies[$inlinecookie]) && my_strpos($mybb->cookies[$inlinecookie], "|{$thread['tid']}|") !== false)

			{
$inlinecheck = "checked=\"checked\"";
++$inlinecount;

			{
$inlinecheck = "checked=\"checked\"";
++$inlinecount;

Zeile 1247Zeile 1244

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


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

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

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

		}

if($moved[0] == "moved")

		}

if($moved[0] == "moved")

Zeile 1268Zeile 1265
			$inline_edit_class = "subject_editable";
}


			$inline_edit_class = "subject_editable";
}


		$lastposter = htmlspecialchars_uni($thread['lastposter']);



		$lastposteruid = $thread['lastposteruid'];

		$lastposteruid = $thread['lastposteruid'];

 
		if(!$lastposteruid && !$thread['lastposter'])
{
$lastposter = htmlspecialchars_uni($lang->guest);
}
else
{
$lastposter = htmlspecialchars_uni($thread['lastposter']);
}

		$lastpostdate = my_date('relative', $thread['lastpost']);

// Don't link to guest's profiles (they have no profile).

		$lastpostdate = my_date('relative', $thread['lastpost']);

// Don't link to guest's profiles (they have no profile).

Zeile 1361Zeile 1366
					foreach($gids as $gid)
{
$gid = (int)$gid;

					foreach($gids as $gid)
{
$gid = (int)$gid;

						$gidswhere .= " OR CONCAT(',',groups,',') LIKE '%,{$gid},%'";

						$gidswhere .= " OR CONCAT(',',`groups`,',') LIKE '%,{$gid},%'";

					}

					}

					$query = $db->simple_select("modtools", 'tid, name', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND (groups='' OR CONCAT(',',groups,',') LIKE '%,-1,%'{$gidswhere}) AND type = 't'");

					$query = $db->simple_select("modtools", 'tid, name', "(CONCAT(',',forums,',') LIKE '%,$fid,%' OR CONCAT(',',forums,',') LIKE '%,-1,%' OR forums='') AND (`groups`='' OR CONCAT(',',`groups`,',') LIKE '%,-1,%'{$gidswhere}) AND type = 't'");

					break;
}

while($tool = $db->fetch_array($query))
{

					break;
}

while($tool = $db->fetch_array($query))
{

 
				$tool['name'] = htmlspecialchars_uni($tool['name']);

				eval("\$customthreadtools .= \"".$templates->get("forumdisplay_inlinemoderation_custom_tool")."\";");
}


				eval("\$customthreadtools .= \"".$templates->get("forumdisplay_inlinemoderation_custom_tool")."\";");
}


Zeile 1410Zeile 1416
			eval("\$inlinemodmanage = \"".$templates->get("forumdisplay_inlinemoderation_manage")."\";");
}


			eval("\$inlinemodmanage = \"".$templates->get("forumdisplay_inlinemoderation_manage")."\";");
}


		if(is_moderator($fid, "canapproveunapproveposts"))

		if(is_moderator($fid, "canapproveunapprovethreads"))

		{
eval("\$inlinemodapproveunapprove = \"".$templates->get("forumdisplay_inlinemoderation_approveunapprove")."\";");
}

		{
eval("\$inlinemodapproveunapprove = \"".$templates->get("forumdisplay_inlinemoderation_approveunapprove")."\";");
}

Zeile 1471Zeile 1477
	if($foruminfo['password'] != '')
{
eval("\$clearstoredpass = \"".$templates->get("forumdisplay_threadlist_clearpass")."\";");

	if($foruminfo['password'] != '')
{
eval("\$clearstoredpass = \"".$templates->get("forumdisplay_threadlist_clearpass")."\";");

	}

$post_code_string = '';
if($mybb->user['uid'])
{
$post_code_string = "&amp;my_post_key=".$mybb->post_code;

 
	}

$prefixselect = build_forum_prefix_select($fid, $tprefix);

	}

$prefixselect = build_forum_prefix_select($fid, $tprefix);