From cfb12fe5bb415c2472326b4d152a14842f2b710b Mon Sep 17 00:00:00 2001 From: JT Smith Date: Sat, 1 Jun 2002 18:09:44 +0000 Subject: [PATCH] Fixed a bug where flat view of discussions in USS only showed one message. --- lib/WebGUI/Discussion.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/WebGUI/Discussion.pm b/lib/WebGUI/Discussion.pm index 1d5bb6aa6..7945c9402 100644 --- a/lib/WebGUI/Discussion.pm +++ b/lib/WebGUI/Discussion.pm @@ -347,13 +347,10 @@ sub showReplyTree { sub showThreads { my ($sth, %data, $html, $sql); $sql = "select * from discussion where wobjectId=$session{form}{wid}"; - if ($session{form}{sid}) { - $sql .= " and subId=$session{form}{sid}"; - } - $sql .= " and pid=0"; + $sql .= " and subId=$session{form}{sid}" if ($session{form}{sid}); $html .= ''; if ($session{user}{discussionLayout} eq "threaded") { - $sql .= " order by dateOfPost desc"; + $sql .= " and pid=0 order by dateOfPost desc"; $sth = WebGUI::SQL->read($sql); $html .= '
'.WebGUI::International::get(229).' '.WebGUI::International::get(244).'