aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_display.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-09-26 19:59:41 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-09-26 19:59:41 +0000
commit734492958eaa2f193db304fd5d4cf050390eff1a (patch)
tree37f19f2dd765fd45024bcd9180e729b79c9a430a /phpBB/includes/functions_display.php
parente339c36ec035520ce6f3ae4c8ad69bff35eabde6 (diff)
downloadforums-734492958eaa2f193db304fd5d4cf050390eff1a.tar
forums-734492958eaa2f193db304fd5d4cf050390eff1a.tar.gz
forums-734492958eaa2f193db304fd5d4cf050390eff1a.tar.bz2
forums-734492958eaa2f193db304fd5d4cf050390eff1a.tar.xz
forums-734492958eaa2f193db304fd5d4cf050390eff1a.zip
These changes should let olympus scale a little bit better.
i haven't adjusted the schemas but added the details to create_schema_files - david is able to build them then in line with his changes. :) git-svn-id: file:///svn/phpbb/trunk@6411 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r--phpBB/includes/functions_display.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 2c82fda5ed..fccefa0552 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -1018,6 +1018,12 @@ function display_user_activity(&$userdata)
global $auth, $template, $db, $user;
global $phpbb_root_path, $phpEx;
+ // Do not display user activity for users having more than 5000 posts...
+ if ($userdata['user_posts'] > 5000)
+ {
+ return;
+ }
+
$forum_ary = array();
// Do not include those forums the user is not having read access to...
@@ -1070,7 +1076,7 @@ function display_user_activity(&$userdata)
}
// Obtain active topic
- $sql = 'SELECT topic_id, COUNT(post_id) AS num_posts
+ $sql = 'SELECT topic_id, COUNT(post_id) AS num_posts
FROM ' . POSTS_TABLE . '
WHERE poster_id = ' . $userdata['user_id'] . "
AND post_postcount = 1
@@ -1133,7 +1139,8 @@ function display_user_activity(&$userdata)
'ACTIVE_TOPIC_POSTS' => ($active_t_count == 1) ? sprintf($user->lang['USER_POST'], 1) : sprintf($user->lang['USER_POSTS'], $active_t_count),
'ACTIVE_TOPIC_PCT' => sprintf($user->lang['POST_PCT_ACTIVE'], $active_t_pct),
'U_ACTIVE_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $active_f_id),
- 'U_ACTIVE_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $active_t_id))
+ 'U_ACTIVE_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $active_t_id),
+ 'S_SHOW_ACTIVITY' => true)
);
}