From 984fe99a931963a9c5d453de02f7d1c2eb96d698 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 13 Jan 2009 18:56:12 -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 Cherry-pick 2f104a10293dfff888240fe14e0758a8892005c0 --- 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 977beb5..563139b 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -8,6 +8,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 56df31e..8d0c9ba 100644 --- a/showreport.php +++ b/showreport.php @@ -319,6 +319,7 @@ $comments_fetch = $db->query(" AND !hidden" : '') . " ORDER BY comment.dateline ASC" ); +$description = null; foreach ($comments_fetch as $comment) { $comment['posttime'] = $datef->format(bugdar::$options['dateformat'], $comment['dateline']); @@ -341,7 +342,15 @@ foreach ($comments_fetch as $comment) $tpl = new BSTemplate('showreport_comment'); $tpl->vars = array('comment' => $comment); - $comments .= $tpl->evaluate()->getTemplate(); + $temp = $tpl->evaluate()->getTemplate(); + 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 33a7eac..fcb4387 100644 --- a/templates/showreport.tpl +++ b/templates/showreport.tpl @@ -261,6 +261,8 @@
+<%- $description %> + <%- $comments %> <%- $footer %> \ No newline at end of file -- 2.43.5