Vergleich stats.php - 1.8.3 - 1.8.4

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 56Zeile 56
// Get forum permissions
$unviewableforums = get_unviewable_forums(true);
$inactiveforums = get_inactive_forums();

// Get forum permissions
$unviewableforums = get_unviewable_forums(true);
$inactiveforums = get_inactive_forums();

$fidnot = '1=1 AND ';
$unviewableforumsarray = array();


$unviewablefids = $inactivefids = array();
$fidnot = '';


if($unviewableforums)

if($unviewableforums)

{
$fidnot .= "fid NOT IN ($unviewableforums) AND ";
$unviewableforumsfids = explode(',', str_replace("'", '', $unviewableforums));
foreach($unviewableforumsfids as $fid)
{
$unviewableforumsarray[] = (int)$fid;
}
}

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





if($inactiveforums)
{

if($inactiveforums)
{

	$fidnot .= "fid NOT IN ($inactiveforums) AND ";
$unviewableforumsfids = explode(',', $inactiveforums);
foreach($unviewableforumsfids as $fid)
{
$unviewableforumsarray[] = (int)$fid;
}

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





}

}

 

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


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


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

Zeile 88Zeile 83

$mostreplies = '';
if(!empty($most_replied))


$mostreplies = '';
if(!empty($most_replied))

{

{

	foreach($most_replied as $key => $thread)
{
if(!in_array($thread['fid'], $unviewableforumsarray))

	foreach($most_replied as $key => $thread)
{
if(!in_array($thread['fid'], $unviewableforumsarray))

Zeile 98Zeile 93
			$numbertype = $lang->replies;
$thread['threadlink'] = get_thread_link($thread['tid']);
eval("\$mostreplies .= \"".$templates->get("stats_thread")."\";");

			$numbertype = $lang->replies;
$thread['threadlink'] = get_thread_link($thread['tid']);
eval("\$mostreplies .= \"".$templates->get("stats_thread")."\";");

		}

		}

	}
}

	}
}





// Most viewed threads
$most_viewed = $cache->read("most_viewed_threads");

if(!$most_viewed)
{
$cache->update_most_viewed_threads();

// Most viewed threads
$most_viewed = $cache->read("most_viewed_threads");

if(!$most_viewed)
{
$cache->update_most_viewed_threads();

	$most_viewed = $cache->read("most_viewed_threads", true);

	$most_viewed = $cache->read("most_viewed_threads", true);

}

$mostviews = '';

}

$mostviews = '';

Zeile 139Zeile 134
{
$cache->update_statistics();
$statistics = $cache->read('statistics');

{
$cache->update_statistics();
$statistics = $cache->read('statistics');

}

}


// Top forum


// Top forum

if(!isset($statistics['top_forum']['posts']))
{




$query = $db->simple_select('forums', 'fid, name, threads, posts', "type='f'$fidnot", array('order_by' => 'posts', 'order_dir' => 'DESC', 'limit' => 1));
$forum = $db->fetch_array($query);

if(empty($forum['fid']))
{

	$topforum = $lang->none;
$topforumposts = $lang->no;
$topforumthreads = $lang->no;
}
else
{

	$topforum = $lang->none;
$topforumposts = $lang->no;
$topforumthreads = $lang->no;
}
else
{

	$forum = $forum_cache[(int)$statistics['top_forum']['fid']];

$topforum = "<a href=\"".get_forum_link($forum['fid'])."\">{$forum['name']}</a>";
$topforumposts = (int)$statistics['top_forum']['posts'];
$topforumthreads = (int)$statistics['top_forum']['threads'];

	$forum['name'] = htmlspecialchars_uni(strip_tags($forum['name']));
$topforum = '<a href="'.get_forum_link($forum['fid'])."\">{$forum['name']}</a>";
$topforumposts = $forum['posts'];
$topforumthreads = $forum['threads'];


}

// Top referrer defined for the templates even if we don't use it

}

// Top referrer defined for the templates even if we don't use it