Vergleich forumdisplay.php - 1.8.27 - 1.8.31

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 11Zeile 11
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'forumdisplay.php');


define("IN_MYBB", 1);
define('THIS_SCRIPT', 'forumdisplay.php');


$templatelist = "forumdisplay,forumdisplay_thread,forumbit_depth1_cat,forumbit_depth2_cat,forumbit_depth2_forum,forumdisplay_subforums,forumdisplay_threadlist,forumdisplay_moderatedby,forumdisplay_searchforum,forumdisplay_thread_rating,forumdisplay_threadlist_rating";

$templatelist = "forumdisplay,forumdisplay_thread,forumbit_depth1_cat,forumbit_depth2_cat,forumbit_depth2_forum,forumdisplay_subforums,forumdisplay_threadlist,forumdisplay_moderatedby,forumdisplay_searchforum,forumdisplay_forumsort,forumdisplay_thread_rating,forumdisplay_threadlist_rating";

$templatelist .= ",forumbit_depth1_forum_lastpost,forumdisplay_thread_multipage_page,forumdisplay_thread_multipage,forumdisplay_thread_multipage_more,forumdisplay_thread_gotounread,forumbit_depth2_forum_lastpost,forumdisplay_rules_link,forumdisplay_orderarrow,forumdisplay_newthread";
$templatelist .= ",multipage,multipage_breadcrumb,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,forumdisplay_thread_unapproved_posts,forumdisplay_nothreads";
$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,forumdisplay_password_wrongpass,forumdisplay_password,forumdisplay_inlinemoderation_custom_tool,forumbit_subforums,forumbit_moderators,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_lastpost_hidden";

$templatelist .= ",forumbit_depth1_forum_lastpost,forumdisplay_thread_multipage_page,forumdisplay_thread_multipage,forumdisplay_thread_multipage_more,forumdisplay_thread_gotounread,forumbit_depth2_forum_lastpost,forumdisplay_rules_link,forumdisplay_orderarrow,forumdisplay_newthread";
$templatelist .= ",multipage,multipage_breadcrumb,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,forumdisplay_thread_unapproved_posts,forumdisplay_nothreads";
$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,forumdisplay_password_wrongpass,forumdisplay_password,forumdisplay_inlinemoderation_custom_tool,forumbit_subforums,forumbit_moderators,forumbit_depth2_forum_lastpost_never,forumbit_depth2_forum_lastpost_hidden";

Zeile 215Zeile 215

$moderators = '';
$parentlistexploded = explode(",", $parentlist);


$moderators = '';
$parentlistexploded = explode(",", $parentlist);

 
$comma = '';


foreach($parentlistexploded as $mfid)
{
// This forum has moderators


foreach($parentlistexploded as $mfid)
{
// This forum has moderators

	if(is_array($moderatorcache[$mfid]))

	if(isset($moderatorcache[$mfid]) && is_array($moderatorcache[$mfid]))

	{
// Fetch each moderator from the cache and format it, appending it to the list
foreach($moderatorcache[$mfid] as $modtype)

	{
// Fetch each moderator from the cache and format it, appending it to the list
foreach($moderatorcache[$mfid] as $modtype)

Zeile 544Zeile 545
$sortby = htmlspecialchars_uni($mybb->input['sortby']);

switch($mybb->input['sortby'])

$sortby = htmlspecialchars_uni($mybb->input['sortby']);

switch($mybb->input['sortby'])

{

{

	case "subject":
$sortfield = "subject";

	case "subject":
$sortfield = "subject";

		break;

		break;

	case "replies":
$sortfield = "replies";
break;

	case "replies":
$sortfield = "replies";
break;

Zeile 556Zeile 557
		break;
case "starter":
$sortfield = "username";

		break;
case "starter":
$sortfield = "username";

		break;

		break;

	case "rating":
$t = "";
$sortfield = "averagerating";
$sortfield2 = ", t.totalratings DESC";

	case "rating":
$t = "";
$sortfield = "averagerating";
$sortfield2 = ", t.totalratings DESC";

		break;

		break;

	case "started":
$sortfield = "dateline";

	case "started":
$sortfield = "dateline";

		break;

		break;

	default:
$sortby = "lastpost";
$sortfield = "lastpost";
$mybb->input['sortby'] = "lastpost";
break;

	default:
$sortby = "lastpost";
$sortfield = "lastpost";
$mybb->input['sortby'] = "lastpost";
break;

}


}


$sortsel['rating'] = ''; // Needs to be initialized in order to speed-up things. Fixes #2031
$sortsel[$mybb->input['sortby']] = ' selected="selected"';


$sortsel['rating'] = ''; // Needs to be initialized in order to speed-up things. Fixes #2031
$sortsel[$mybb->input['sortby']] = ' selected="selected"';


Zeile 583Zeile 584
else
{
$string = "&";

else
{
$string = "&";

}


}


// Are we viewing a specific page?
$mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT);
if($mybb->input['page'] > 1)

// Are we viewing a specific page?
$mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT);
if($mybb->input['page'] > 1)

Zeile 592Zeile 593
	$sorturl = get_forum_link($fid, $mybb->input['page']).$string."datecut=$datecut&prefix=$tprefix";
}
else

	$sorturl = get_forum_link($fid, $mybb->input['page']).$string."datecut=$datecut&prefix=$tprefix";
}
else

{

{

	$sorturl = get_forum_link($fid).$string."datecut=$datecut&prefix=$tprefix";
}


	$sorturl = get_forum_link($fid).$string."datecut=$datecut&prefix=$tprefix";
}


Zeile 604Zeile 605
{
$useronly = "AND uid={$mybb->user['uid']}";
$tuseronly = "AND t.uid={$mybb->user['uid']}";

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

}

}


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


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

Zeile 624Zeile 625
		if(in_array(-1, $visible_states))
{
$threadcount += $forum_threads['deletedthreads'];

		if(in_array(-1, $visible_states))
{
$threadcount += $forum_threads['deletedthreads'];

		}

		}


if(in_array(0, $visible_states))
{


if(in_array(0, $visible_states))
{

Zeile 705Zeile 706
	if($sortordernow != "desc")
{
$page_url .= "{$q}{$and}order={$sortordernow}";

	if($sortordernow != "desc")
{
$page_url .= "{$q}{$and}order={$sortordernow}";

		$q = '';
$and = "&";
}


		$q = '';
$and = "&";
}


	if($datecut > 0 && $datecut != 9999)
{
$page_url .= "{$q}{$and}datecut={$datecut}";

	if($datecut > 0 && $datecut != 9999)
{
$page_url .= "{$q}{$and}datecut={$datecut}";

Zeile 1036Zeile 1037
			$bgcolor = "trow_shaded";
}
elseif($thread['visible'] == -1 && is_moderator($fid, "canviewdeleted"))

			$bgcolor = "trow_shaded";
}
elseif($thread['visible'] == -1 && is_moderator($fid, "canviewdeleted"))

		{

		{

			$bgcolor = "trow_shaded trow_deleted";
}
else

			$bgcolor = "trow_shaded trow_deleted";
}
else

Zeile 1363Zeile 1364
			}

eval("\$attachment_count = \"".$templates->get("forumdisplay_thread_attachment_count")."\";");

			}

eval("\$attachment_count = \"".$templates->get("forumdisplay_thread_attachment_count")."\";");

		}
else

		}
else

		{
$attachment_count = '';
}

		{
$attachment_count = '';
}

Zeile 1423Zeile 1424
			{
eval("\$customthreadtools = \"".$templates->get("forumdisplay_inlinemoderation_custom")."\";");
}

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

		}

$inlinemodopenclose = $inlinemodstickunstick = $inlinemodsoftdelete = $inlinemodrestore = $inlinemoddelete = $inlinemodmanage = $inlinemodapproveunapprove = '';


		}

$inlinemodopenclose = $inlinemodstickunstick = $inlinemodsoftdelete = $inlinemodrestore = $inlinemoddelete = $inlinemodmanage = $inlinemodapproveunapprove = '';


		if(is_moderator($fid, "canopenclosethreads"))
{
eval("\$inlinemodopenclose = \"".$templates->get("forumdisplay_inlinemoderation_openclose")."\";");

		if(is_moderator($fid, "canopenclosethreads"))
{
eval("\$inlinemodopenclose = \"".$templates->get("forumdisplay_inlinemoderation_openclose")."\";");

		}


		}


		if(is_moderator($fid, "canstickunstickthreads"))
{
eval("\$inlinemodstickunstick = \"".$templates->get("forumdisplay_inlinemoderation_stickunstick")."\";");

		if(is_moderator($fid, "canstickunstickthreads"))
{
eval("\$inlinemodstickunstick = \"".$templates->get("forumdisplay_inlinemoderation_stickunstick")."\";");

		}


		}


		if(is_moderator($fid, "cansoftdeletethreads"))
{
eval("\$inlinemodsoftdelete = \"".$templates->get("forumdisplay_inlinemoderation_softdelete")."\";");

		if(is_moderator($fid, "cansoftdeletethreads"))
{
eval("\$inlinemodsoftdelete = \"".$templates->get("forumdisplay_inlinemoderation_softdelete")."\";");

Zeile 1445Zeile 1446
		if(is_moderator($fid, "canrestorethreads"))
{
eval("\$inlinemodrestore = \"".$templates->get("forumdisplay_inlinemoderation_restore")."\";");

		if(is_moderator($fid, "canrestorethreads"))
{
eval("\$inlinemodrestore = \"".$templates->get("forumdisplay_inlinemoderation_restore")."\";");

		}


		}


		if(is_moderator($fid, "candeletethreads"))
{
eval("\$inlinemoddelete = \"".$templates->get("forumdisplay_inlinemoderation_delete")."\";");

		if(is_moderator($fid, "candeletethreads"))
{
eval("\$inlinemoddelete = \"".$templates->get("forumdisplay_inlinemoderation_delete")."\";");

Zeile 1508Zeile 1509
if($foruminfo['type'] != "c")
{
if($fpermissions['canviewthreads'] != 1)

if($foruminfo['type'] != "c")
{
if($fpermissions['canviewthreads'] != 1)

	{

	{

		eval("\$threads = \"".$templates->get("forumdisplay_nopermission")."\";");

		eval("\$threads = \"".$templates->get("forumdisplay_nopermission")."\";");

	}


	}


	if(!$threadcount && $fpermissions['canviewthreads'] == 1)

	if(!$threadcount && $fpermissions['canviewthreads'] == 1)

	{

	{

		eval("\$threads = \"".$templates->get("forumdisplay_nothreads")."\";");

		eval("\$threads = \"".$templates->get("forumdisplay_nothreads")."\";");

	}


	}


	$clearstoredpass = '';
if($foruminfo['password'] != '')
{

	$clearstoredpass = '';
if($foruminfo['password'] != '')
{

Zeile 1527Zeile 1528

// Populate Forumsort
$forumsort = '';


// Populate Forumsort
$forumsort = '';

	
if($threadcount > 0)
{
eval("\$forumsort = \"".$templates->get("forumdisplay_forumsort")."\";");
}


	eval("\$forumsort = \"".$templates->get("forumdisplay_forumsort")."\";");






	$plugins->run_hooks("forumdisplay_threadlist");

$lang->rss_discovery_forum = $lang->sprintf($lang->rss_discovery_forum, htmlspecialchars_uni(strip_tags($foruminfo['name'])));

	$plugins->run_hooks("forumdisplay_threadlist");

$lang->rss_discovery_forum = $lang->sprintf($lang->rss_discovery_forum, htmlspecialchars_uni(strip_tags($foruminfo['name'])));