From 2f104a10293dfff888240fe14e0758a8892005c0 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 13 Jan 2009 17:30:18 -0500 Subject: [PATCH] Separate out the first comment into a variable called $description so that it can be moved around independently from the discussion * showreport.php * templates/showreport.tpl --- docs/changes.txt | 1 + showreport.php | 11 ++++++++++- templates/showreport.tpl | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index 86a01c1..f9e668e 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -4,6 +4,7 @@ - Fixed: Improved XHTML compliance in various templates - Fixed: #134: Column headers (defined in includes/definitions.php) were not marked with T() for translation - Change: Required custom select fields will no longer show the empty option (these fields could not be saved as empty, though, because they wouldn't validate -- this is purely an interface change) +- Change: The description (first comment) is now stored in a separate variable from the rest of the comments, allowing for one to move its placement in templates/showreport.tpl 1.2.2 =============================== diff --git a/showreport.php b/showreport.php index 7119bad..dd6a628 100644 --- a/showreport.php +++ b/showreport.php @@ -304,6 +304,7 @@ $comments_fetch = $db->query(" AND !hidden" : '') . " ORDER BY comment.dateline ASC" ); +$description = null; while ($comment = $db->fetch_array($comments_fetch)) { $comment['posttime'] = $datef->format($bugsys->options['dateformat'], $comment['dateline']); @@ -324,7 +325,15 @@ while ($comment = $db->fetch_array($comments_fetch)) } } - eval('$comments .= "' . $template->fetch('showreport_comment') . '";'); + eval('$temp = "' . $template->fetch('showreport_comment') . '";'); + if ($description == null) + { + $description = $temp; + } + else + { + $comments .= $temp; + } } $show['newreply'] = (can_perform('canpostcomments', $bug['productid']) ? true : false); diff --git a/templates/showreport.tpl b/templates/showreport.tpl index 967e4eb..a8f2540 100644 --- a/templates/showreport.tpl +++ b/templates/showreport.tpl @@ -261,6 +261,8 @@ $header
+$description + $comments $footer \ No newline at end of file -- 2.22.5