Switch the 'modify' code of admin/field.php to use templates
[bugdar.git] / showreport.php
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);