aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_display.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-04-26 16:24:58 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-04-26 16:24:58 +0000
commit09a97199821f9bcfaeca5f1ea00ae79fc41eca3c (patch)
tree5d7ed8047ddc3223c33ac483e64e725c6fb8661e /phpBB/includes/functions_display.php
parent8df413cafc499721917d732874450066810ac95c (diff)
downloadforums-09a97199821f9bcfaeca5f1ea00ae79fc41eca3c.tar
forums-09a97199821f9bcfaeca5f1ea00ae79fc41eca3c.tar.gz
forums-09a97199821f9bcfaeca5f1ea00ae79fc41eca3c.tar.bz2
forums-09a97199821f9bcfaeca5f1ea00ae79fc41eca3c.tar.xz
forums-09a97199821f9bcfaeca5f1ea00ae79fc41eca3c.zip
Fixed error in handling sub-forum data when displaying "categories"
git-svn-id: file:///svn/phpbb/trunk@3955 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r--phpBB/includes/functions_display.php31
1 files changed, 16 insertions, 15 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 563728f7b6..d3ff8e6b30 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -107,6 +107,20 @@ function display_forums($root_data = '', $display_moderators = TRUE)
{
$branch_root_id = $forum_id;
}
+
+ // Show most recent last post info on parent if we're a subforum
+ if (isset($forum_rows[$parent_id]) && $row['forum_last_post_time'] > $forum_rows[$parent_id]['forum_last_post_time'])
+ {
+ $forum_rows[$parent_id]['forum_last_post_id'] = $row['forum_last_post_id'];
+ $forum_rows[$parent_id]['forum_last_post_time'] = $row['forum_last_post_time'];
+ $forum_rows[$parent_id]['forum_last_poster_id'] = $row['forum_last_poster_id'];
+ $forum_rows[$parent_id]['forum_last_poster_name'] = $row['forum_last_poster_name'];
+ $forum_rows[$parent_id]['forum_id_last_post'] = $row['forum_id'];
+ }
+ else
+ {
+ $forum_rows[$forum_id]['forum_id_last_post'] = $row['forum_id'];
+ }
}
elseif ($row['forum_postable'])
{
@@ -132,21 +146,6 @@ function display_forums($root_data = '', $display_moderators = TRUE)
{
$forum_unread[$parent_id] = true;
}
-
-
- // Show most recent last post info on parent if we're a subforum
- if (isset($forum_rows[$parent_id]) && $row['forum_last_post_time'] > $forum_rows[$parent_id]['forum_last_post_time'])
- {
- $forum_rows[$parent_id]['forum_last_post_id'] = $row['forum_last_post_id'];
- $forum_rows[$parent_id]['forum_last_post_time'] = $row['forum_last_post_time'];
- $forum_rows[$parent_id]['forum_last_poster_id'] = $row['forum_last_poster_id'];
- $forum_rows[$parent_id]['forum_last_poster_name'] = $row['forum_last_poster_name'];
- $forum_rows[$parent_id]['forum_id_last_post'] = $row['forum_id'];
- }
- else
- {
- $forum_rows[$forum_id]['forum_id_last_post'] = $row['forum_id'];
- }
}
$db->sql_freeresult();
@@ -176,12 +175,14 @@ function display_forums($root_data = '', $display_moderators = TRUE)
}
*/
+ // Grab moderators ... if necessary
if ($display_moderators)
{
get_moderators($forum_moderators, $forum_ids);
}
+ // Loop through the forums
$root_id = $root_data['forum_id'];
foreach ($forum_rows as $row)
{