aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/front.t10
-rw-r--r--t/post.t16
2 files changed, 7 insertions, 19 deletions
diff --git a/t/front.t b/t/front.t
index 5c88166..fcdecdb 100644
--- a/t/front.t
+++ b/t/front.t
@@ -2,17 +2,13 @@
<h1><%= site.name %></h1>
<h3>Latest posts</h3>
<table border="1">
- <%
- while(post = getpost(stmt, 0)){
- user = getuser(byid("users", post->user), 1);
- %>
+ <% while(post = getpost(stmt, 0)){
+ user = getuser(byid("users", post->user), 1); %>
<tr>
<td><a href="?post=<% printf("%d", post->id); %>"><%= post->subject %></a></td>
<td><a href="?user=<% printf("%d", post->user); %>"><%= user->name %></a></td>
<td><% printdate(post->created); %></td>
</tr>
- <%
- }
- %>
+ <% } %>
</table>
<% #include "foot.tc" %> \ No newline at end of file
diff --git a/t/post.t b/t/post.t
index deeb285..549b4ec 100644
--- a/t/post.t
+++ b/t/post.t
@@ -13,24 +13,16 @@
<pre>
<%= post->text %>
</pre>
-<%
-if(attachment = getattachment(stmt, 0)){
-%>
+<% if(attachment = getattachment(stmt, 0)){ %>
<h3>Attachments</h3>
<table border="1">
- <%
- do{
- %>
+ <% do{ %>
<tr>
<td><a href="?attachment=<% printf("%d", attachment->id); %>"><%= attachment->name %></a></td>
<td><%= attachment->mime %></td>
<td><%= attachment->description %></td>
</tr>
- <%
- }while(attachment = getattachment(stmt, 0));
- %>
+ <% }while(attachment = getattachment(stmt, 0)); %>
</table>
-<%
-}
-%>
+<% } %>
<% #include "foot.tc" %> \ No newline at end of file