From f9e5aa52ccad84784d8e134129f531751ccd34b2 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 13 Jan 2001 09:41:44 +0000 Subject: - fixed "return to parent" glitch when a thread has more then 1 child --- discussion.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'discussion.php') diff --git a/discussion.php b/discussion.php index 1b5192da3..5cf44e685 100644 --- a/discussion.php +++ b/discussion.php @@ -96,9 +96,9 @@ function discussion_display($sid, $pid, $cid, $level = 0) { // Pre-process variables: $pid = (empty($pid)) ? 0 : $pid; $cid = (empty($cid)) ? 0 : $cid; - $mode = ($user->id) ? $user->mode : "threaded"; + $mode = ($user->id) ? $user->mode : "threaded"; $order = ($user->id) ? $user->sort : "1"; - $threshold = ($user->id) ? $user->threshold : "0"; + $threshold = ($user->id) ? $user->threshold : "0"; // Compose story-query: $result = db_query("SELECT s.*, u.userid FROM stories s LEFT JOIN users u ON s.author = u.id WHERE s.status != 0 AND s.id = $sid"); @@ -122,7 +122,7 @@ function discussion_display($sid, $pid, $cid, $level = 0) { // Display the comments: while ($comment = db_fetch_object($result)) { // Dynamically compose the `reply'-link: - if ($pid != 0) { + if ($comment->pid != 0) { list($pid) = db_fetch_row(db_query("SELECT pid FROM comments WHERE cid = $comment->pid")); $link = "sid&pid=$pid#$pid\">hlcolor2\">return to parent | sid&pid=$comment->cid\">hlcolor2\">reply to this comment"; } @@ -180,13 +180,15 @@ function discussion_reply($pid, $sid) { $output .= "
\n"; $output .= " Allowed HTML tags: ". htmlspecialchars($allowed_html) .".\n"; $output .= "

\n"; - - // Hidden fields: - $output .= "\n"; - $output .= "\n"; - // Preview button: - $output .= " (You must preview at least once before you can submit.)\n"; + // Preview button: + $output .= "

\n"; + $output .= " You must preview at least once before you can submit:
\n"; + $output .= " \n"; + $output .= " \n"; + $output .= "
\n"; + $output .= "

\n"; + $output .= "\n"; $theme->box("Reply", $output); -- cgit v1.2.3