mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Minor change to remove total_post count
git-svn-id: file:///svn/phpbb/trunk@3027 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
2fe1f1bc65
commit
bb20ba7235
1 changed files with 0 additions and 6 deletions
|
@ -22,23 +22,17 @@
|
||||||
function display_forums($root_data=array(), $display_moderators=TRUE)
|
function display_forums($root_data=array(), $display_moderators=TRUE)
|
||||||
{
|
{
|
||||||
global $db, $template, $auth, $user, $phpEx, $SID;
|
global $db, $template, $auth, $user, $phpEx, $SID;
|
||||||
global $total_posts;
|
|
||||||
|
|
||||||
$where_sql = ($root_data['forum_id']) ? ' WHERE left_id > ' . $root_data['left_id'] . ' AND left_id < ' . $root_data['right_id'] : '';
|
$where_sql = ($root_data['forum_id']) ? ' WHERE left_id > ' . $root_data['left_id'] . ' AND left_id < ' . $root_data['right_id'] : '';
|
||||||
|
|
||||||
$sql = 'SELECT * FROM ' . FORUMS_TABLE . $where_sql . ' ORDER BY left_id';
|
$sql = 'SELECT * FROM ' . FORUMS_TABLE . $where_sql . ' ORDER BY left_id';
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$total_posts = 0;
|
|
||||||
$branch_root_id = $root_data['forum_id'];
|
$branch_root_id = $root_data['forum_id'];
|
||||||
$forum_rows = $subforums = $forum_ids = $forum_moderators = array();
|
$forum_rows = $subforums = $forum_ids = $forum_moderators = array();
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
if ($row['post_count_inc'])
|
|
||||||
{
|
|
||||||
$total_posts += $row['forum_posts'];
|
|
||||||
}
|
|
||||||
if (isset($right_id))
|
if (isset($right_id))
|
||||||
{
|
{
|
||||||
if ($row['left_id'] < $right_id)
|
if ($row['left_id'] < $right_id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue