Switch the 'modify' code of admin/field.php to use templates
[bugdar.git] / showreport.php
index 266438c38c3f276743ffed9a913f94a5467de801..8d0c9ba8d66cf3885a4a4754b1f4ff307f957e07 100644 (file)
@@ -2,7 +2,7 @@
 /*=====================================================================*\
 || ###################################################################
 || # Bugdar
-|| # Copyright ©2002-2007 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
@@ -27,7 +27,6 @@ $fetchtemplates = array(
        'bugfield_static_text'
 );
 
-define('SVN', '$Id$');
 
 $focus['showreport'] = 'focus';
 
@@ -320,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']);
@@ -342,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);
@@ -371,10 +379,4 @@ $tpl->vars = array(
 );
 $tpl->evaluate()->flush();
 
-/*=====================================================================*\
-|| ###################################################################
-|| # $HeadURL$
-|| # $Id$
-|| ###################################################################
-\*=====================================================================*/
 ?>
\ No newline at end of file