Switch the 'modify' code of admin/field.php to use templates
[bugdar.git] / showreport.php
index fec4c42a4abb97481127f0dffc0b3784cbc1066d..8d0c9ba8d66cf3885a4a4754b1f4ff307f957e07 100644 (file)
@@ -2,7 +2,7 @@
 /*=====================================================================*\
 || ###################################################################
 || # Bugdar
-|| # Copyright (c)2004-2008 Blue Static
+|| # Copyright (c)2004-2009 Blue Static
 || #
 || # This program is free software; you can redistribute it and/or modify
 || # it under the terms of the GNU General Public License as published by
@@ -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);