aboutsummaryrefslogtreecommitdiff
path: root/t/post.tc
diff options
context:
space:
mode:
Diffstat (limited to 't/post.tc')
-rw-r--r--t/post.tc18
1 files changed, 14 insertions, 4 deletions
diff --git a/t/post.tc b/t/post.tc
index 2f81de0..732f0a7 100644
--- a/t/post.tc
+++ b/t/post.tc
@@ -3,13 +3,23 @@ printf("%d", id);
printf(": ");
printf("%s", post->subject );
printf("</h1>\n<p>From: ");
-printf("%s", user->full );
-printf("\n&lt;<a href=\"?user=");
+printf("%s", user->full? user->full: "" );
+printf(" ");
+if(user->full) printf("&lt;");
+
+printf("<a href=\"?user=");
printf("%d", user->id);
printf("\">");
printf("%s", user->name );
-printf("</a>&gt;\n<br>Date: ");
-PFREE(date(post->created));
+printf("</a>");
+if(user->full) printf("&gt;");
+printf("\n<br>Date: ");
+printdate(post->created);
+printf("\n");
+if(post->edited){
+ printf("<br>Edited: ");
+ printdate(post->edited);
+}
printf("\n<pre>\n");
printf("%s", post->text );
printf("\n</pre>");