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

Cherry-pick 2f104a10293dfff888240fe14e0758a8892005c0

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

index 977beb5e91b4b1498a70ef441be8b3070fbb13d6..563139b3a404139ef43a0387d0a00fd9305bc34f 100644 (file)
@@ -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
 ===============================
index 56df31e5523ccfd89103b6d51708ddd9d964d37e..8d0c9ba8d66cf3885a4a4754b1f4ff307f957e07 100644 (file)
@@ -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);
index 33a7eacb7f4f2937371202c4735ebe100243d9ca..fcb4387bdce334a1488248a7c4911466c4e5a8be 100644 (file)
 
 <br />
 
+<%- $description %>
+
 <%- $comments %>
 
 <%- $footer %>
\ No newline at end of file