Store and display comment posted date/time.

This commit is contained in:
uriel 2009-02-01 20:02:22 +01:00
parent 560e3767da
commit 7d3c5446da

View File

@ -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 '<div>'
sed 's!.+!<b>By: <i>&</i></b><br />!' < $c/user
ifs=() { echo '<div class="comment"><h5>By: <i>'`{cat $c/user}'</i></b> ('`{cat $c/posted}')</h5>'}
cat $c/body | escape_html | sed 's,$,<br />,'
echo '<hr /></div>'
}