From 7d3c5446da378800d610cd013faf6421643b2230 Mon Sep 17 00:00:00 2001 From: uriel Date: Sun, 1 Feb 2009 20:02:22 +0100 Subject: [PATCH] Store and display comment posted date/time. --- apps/bridge/app.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/bridge/app.rc b/apps/bridge/app.rc index 00ce96b..b196d99 100644 --- a/apps/bridge/app.rc +++ b/apps/bridge/app.rc @@ -73,6 +73,7 @@ fn mk_new_comment { dir=$dir'/'`{date -n} # FIXME Obvious race mkdir -m 775 -p $dir && echo $u > $dir/user && + echo $current_date_time > $dir/posted && echo $post_arg_comment_text > $dir/body _s=$status if(! ~ $"_s '') { @@ -89,8 +90,7 @@ fn display_comments { for(c in `{ls $*/}) { if(test -s $c/body) { - echo '
' - sed 's!.+!By: &
!' < $c/user + ifs=() { echo '
By: '`{cat $c/user}' ('`{cat $c/posted}')
'} cat $c/body | escape_html | sed 's,$,
,' echo '
' }