mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Removed function, replaced missing functionality
git-svn-id: file:///svn/phpbb/trunk@2979 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
34921891bb
commit
98f17b0f75
1 changed files with 8 additions and 2 deletions
|
@ -61,9 +61,15 @@ $memberdays = max(1, round( ( time() - $regdate ) / 86400 ));
|
|||
$posts_per_day = $profiledata['user_posts'] / $memberdays;
|
||||
|
||||
// Get the users percentage of total posts
|
||||
if ( $profiledata['user_posts'] != 0 )
|
||||
if ( $profiledata['user_posts'] )
|
||||
{
|
||||
$total_posts = get_db_stat('postcount');
|
||||
$sql = "SELECT SUM(forum_posts) AS total
|
||||
FROM " . FORUMS_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$total_posts = ($row = $db->sql_fetchrow($result)) ? $row['total'] : 0;
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$percentage = ( $total_posts ) ? min(100, ($profiledata['user_posts'] / $total_posts) * 100) : 0;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue