Vergleich stats.php - 1.8.6 - 1.8.15

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


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


$templatelist = "stats,stats_thread";


$templatelist = "stats,stats_thread,stats_topforum";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";
require_once MYBB_ROOT."inc/class_parser.php";

require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";
require_once MYBB_ROOT."inc/class_parser.php";

Zeile 19Zeile 20

// Load global language phrases
$lang->load("stats");


// Load global language phrases
$lang->load("stats");





add_breadcrumb($lang->nav_stats);

$stats = $cache->read("stats");

add_breadcrumb($lang->nav_stats);

$stats = $cache->read("stats");

Zeile 63Zeile 64
{
$fidnot .= "AND fid NOT IN ($unviewableforums)";
$unviewablefids = explode(',', $unviewableforums);

{
$fidnot .= "AND fid NOT IN ($unviewableforums)";
$unviewablefids = explode(',', $unviewableforums);

}

}

if($inactiveforums)

if($inactiveforums)

{

{

	$fidnot .= "AND fid NOT IN ($inactiveforums)";
$inactivefids = explode(',', $inactiveforums);

	$fidnot .= "AND fid NOT IN ($inactiveforums)";
$inactivefids = explode(',', $inactiveforums);

}


}


$unviewableforumsarray = array_merge($unviewablefids, $inactivefids);

$unviewableforumsarray = array_merge($unviewablefids, $inactivefids);

 

// Check group permissions if we can't view threads not started by us
$group_permissions = forum_permissions();
$onlyusfids = array();
foreach($group_permissions as $gpfid => $forum_permissions)
{
if(isset($forum_permissions['canonlyviewownthreads']) && $forum_permissions['canonlyviewownthreads'] == 1)
{
$onlyusfids[] = $gpfid;
}
}


// Most replied-to threads
$most_replied = $cache->read("most_replied_threads");


// Most replied-to threads
$most_replied = $cache->read("most_replied_threads");

Zeile 86Zeile 98
{
foreach($most_replied as $key => $thread)
{

{
foreach($most_replied as $key => $thread)
{

		if(!in_array($thread['fid'], $unviewableforumsarray))




		if(
!in_array($thread['fid'], $unviewableforumsarray) &&
(!in_array($thread['fid'], $onlyusfids) || ($mybb->user['uid'] && $thread['uid'] == $mybb->user['uid']))
)

		{
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));
$numberbit = my_number_format($thread['replies']);

		{
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));
$numberbit = my_number_format($thread['replies']);

Zeile 111Zeile 126
{
foreach($most_viewed as $key => $thread)
{

{
foreach($most_viewed as $key => $thread)
{

		if(!in_array($thread['fid'], $unviewableforumsarray))




		if(
!in_array($thread['fid'], $unviewableforumsarray) &&
(!in_array($thread['fid'], $onlyusfids) || ($mybb->user['uid'] && $thread['uid'] == $mybb->user['uid']))
)

		{
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));
$numberbit = my_number_format($thread['views']);

		{
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));
$numberbit = my_number_format($thread['views']);

Zeile 151Zeile 169
else
{
$forum['name'] = htmlspecialchars_uni(strip_tags($forum['name']));

else
{
$forum['name'] = htmlspecialchars_uni(strip_tags($forum['name']));

	$topforum = '<a href="'.get_forum_link($forum['fid'])."\">{$forum['name']}</a>";


	$forum['link'] = get_forum_link($forum['fid']);
eval("\$topforum = \"".$templates->get("stats_topforum")."\";");

	$topforumposts = $forum['posts'];
$topforumthreads = $forum['threads'];
}

	$topforumposts = $forum['posts'];
$topforumthreads = $forum['threads'];
}

Zeile 163Zeile 182
	// Only show this if we have anything more the 0 referrals
if($statistics['top_referrer']['referrals'] > 0)
{

	// Only show this if we have anything more the 0 referrals
if($statistics['top_referrer']['referrals'] > 0)
{

		$toprefuser = build_profile_link($statistics['top_referrer']['username'], $statistics['top_referrer']['uid']);

		$toprefuser = build_profile_link(htmlspecialchars_uni($statistics['top_referrer']['username']), $statistics['top_referrer']['uid']);

		$top_referrer = $lang->sprintf($lang->top_referrer, $toprefuser, my_number_format($statistics['top_referrer']['referrals']));
}
}

		$top_referrer = $lang->sprintf($lang->top_referrer, $toprefuser, my_number_format($statistics['top_referrer']['referrals']));
}
}

Zeile 182Zeile 201
	}
else
{

	}
else
{

		$topposter = build_profile_link($statistics['top_poster']['username'], $statistics['top_poster']['uid']);

		$topposter = build_profile_link(htmlspecialchars_uni($statistics['top_poster']['username']), $statistics['top_poster']['uid']);

	}

$topposterposts = $statistics['top_poster']['poststoday'];

	}

$topposterposts = $statistics['top_poster']['poststoday'];