Get showreport working
authorRobert Sesek <rsesek@bluestatic.org>
Thu, 26 Jun 2008 16:19:54 +0000 (12:19 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Thu, 26 Jun 2008 16:19:54 +0000 (12:19 -0400)
* showreport.php
* templates/showreport.tpl

showreport.php
templates/showreport.tpl

index 5f3a410b7292128a419d6d428f6df9f253b9c3b2..38734960c979573f650a14c8722ef356050a217b 100644 (file)
@@ -324,7 +324,9 @@ foreach ($comments_fetch as $comment)
                }
        }
        
-       eval('$comments .= "' . $template->fetch('showreport_comment') . '";');
+       $tpl = new BSTemplate('showreport_comment');
+       $tpl->vars = array('comment' => $comment);
+       $comments .= $tpl->evaluate()->getTemplate();
 }
 
 $show['newreply'] = (can_perform('canpostcomments', $bug['productid']) ? true : false);
@@ -340,7 +342,12 @@ if (is_array($hilight) AND !$show['edit'])
        }
 }
 
-eval('$template->flush("' . $template->fetch('showreport') . '");');
+$tpl = new BSTemplate('showreport');
+$tpl->vars = array(
+       'bug'           => $bug,
+       'comments'      => $comments
+);
+$tpl->evaluate()->flush();
 
 /*=====================================================================*\
 || ###################################################################
index 24a9e65dc0097b99d37783a11c6ac392053d5798..361a69bff0a855d99e1031d6ce2d6d9787412978 100644 (file)
@@ -10,7 +10,7 @@
 
 <body>
 
-$header
+<%- $header %>
 
 <form name="bugreport" action="editreport.php" method="post" class="form">
 <input type="hidden" name="do" value="update" />
@@ -128,7 +128,7 @@ $header
                        <legend><%-T("Assignment")%> $help[assignedto]</legend>
                        <div class="field">
                                <% if ($show['assign']): %>
-                                       <select name="assignedto"><option value="0"<if condition="!$bug['assignedto']"> selected="selected"<% endif %>><%-T("No Assignment")%></option><%- $select['dev'] %></select>
+                                       <select name="assignedto"><option value="0"<% if (!$bug['assignedto']): %> selected="selected"<% endif %>><%-T("No Assignment")%></option><%- $select['dev'] %></select>
                                <% else: %>
                                        <% if ($bug['assigninfo']): %><%- $bug['assigninfo'] %><% else: %>{@"- none -"}<% endif %>
                                <% endif %>
@@ -192,7 +192,7 @@ $header
 
                <textarea name="comment" cols="50" rows="10" class="textarea"></textarea>
 
-               <div><input type="checkbox" name="parselinks" value="1"<if condition="$bugsys->in['parselinks']"> checked="checked"<% endif %> /> <%-T("Parse Links in the Comment")%></div>
+               <div><input type="checkbox" name="parselinks" value="1"<% if ($bugsys->in['parselinks']): %>> checked="checked"<% endif %> /> <%-T("Parse Links in the Comment")%></div>
        </fieldset>
 </div>
 <!-- / new reply -->
@@ -225,7 +225,7 @@ $header
        <% endif %>
 
        <!-- show votes -->
-       <div id="votes<% if ($show['attachments']): %><if condition="!$show['vote']">fifty<% endif %><% else: %><if condition="!$show['vote']">hundred<% endif %><% endif %>">
+       <div id="votes<% if ($show['attachments']): %><% if (!$show['vote']): %>fifty<% endif %><% else: %><% if (!$show['vote']): %>hundred<% endif %><% endif %>">
        <fieldset>
                <legend><%-T("Votes")%></legend>