1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-28 04:20:32 +02:00

Cache moderator names? Output moderators for all forums in viewforum. Alter a few things in templates

git-svn-id: file:///svn/phpbb/trunk@3061 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen
2002-11-18 21:04:45 +00:00
parent ce40939e60
commit 6e910ca116
11 changed files with 287 additions and 212 deletions

View File

@@ -21,7 +21,7 @@
function display_forums($root_data=array(), $display_moderators=TRUE)
{
global $db, $template, $auth, $user, $phpEx, $SID;
global $db, $template, $auth, $user, $phpEx, $SID, $forum_moderators;
$where_sql = ($root_data['forum_id']) ? ' WHERE left_id > ' . $root_data['left_id'] . ' AND left_id < ' . $root_data['right_id'] : '';
@@ -29,7 +29,8 @@ function display_forums($root_data=array(), $display_moderators=TRUE)
$result = $db->sql_query($sql);
$branch_root_id = $root_data['forum_id'];
$forum_rows = $subforums = $forum_ids = $forum_moderators = array();
$forum_rows = $subforums = $forum_moderators = array();
$forum_ids = array($root_data['forum_id']);
while ($row = $db->sql_fetchrow($result))
{
@@ -60,26 +61,19 @@ function display_forums($root_data=array(), $display_moderators=TRUE)
// Direct child
$forum_rows[] = $row;
$parent_id = $row['forum_id'];
$forum_ids[] = $row['forum_id'];
if (!$row['forum_postable'])
{
$branch_root_id = $row['forum_id'];
}
else
{
$forum_ids[] = $row['forum_id'];
}
}
elseif ($row['parent_id'] == $branch_root_id)
{
// Forum directly under a category
$forum_rows[] = $row;
$parent_id = $row['forum_id'];
if ($row['forum_postable'])
{
$forum_ids[] = $row['forum_id'];
}
$forum_ids[] = $row['forum_id'];
}
elseif ($row['forum_postable'])
{