Separate out the first comment into a variable called $description so that it can...
authorRobert Sesek <rsesek@bluestatic.org>
Tue, 13 Jan 2009 22:30:18 +0000 (17:30 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Tue, 13 Jan 2009 22:30:18 +0000 (17:30 -0500)
* showreport.php
* templates/showreport.tpl

docs/changes.txt
showreport.php
templates/showreport.tpl

index 86a01c144c893758a0e0d5fbe37408711af6dbba..f9e668e4f80f509e1cc4a79e1949ecf7f67aad87 100644 (file)
@@ -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
 ===============================
index 7119bad73d9555c2e4f960d6b12f504ef59ffb8a..dd6a62893c172b606f005e68edacb1ff84f773b9 100644 (file)
@@ -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);
index 967e4eb7cffd09554a99a8c5cf1061fa9447cea5..a8f2540928db00e4e7ef89ab59fe493726ab69f7 100644 (file)
@@ -261,6 +261,8 @@ $header
 
 <br />
 
+$description
+
 $comments
 
 $footer
\ No newline at end of file