Store and display comment posted date/time.
This commit is contained in:
parent
7069e2af93
commit
64311bb30b
1 changed files with 2 additions and 2 deletions
|
|
@ -73,6 +73,7 @@ fn mk_new_comment {
|
||||||
dir=$dir'/'`{date -n} # FIXME Obvious race
|
dir=$dir'/'`{date -n} # FIXME Obvious race
|
||||||
mkdir -m 775 -p $dir &&
|
mkdir -m 775 -p $dir &&
|
||||||
echo $u > $dir/user &&
|
echo $u > $dir/user &&
|
||||||
|
echo $current_date_time > $dir/posted &&
|
||||||
echo $post_arg_comment_text > $dir/body
|
echo $post_arg_comment_text > $dir/body
|
||||||
_s=$status
|
_s=$status
|
||||||
if(! ~ $"_s '') {
|
if(! ~ $"_s '') {
|
||||||
|
|
@ -89,8 +90,7 @@ fn display_comments {
|
||||||
|
|
||||||
for(c in `{ls $*/}) {
|
for(c in `{ls $*/}) {
|
||||||
if(test -s $c/body) {
|
if(test -s $c/body) {
|
||||||
echo '<div>'
|
ifs=() { echo '<div class="comment"><h5>By: <i>'`{cat $c/user}'</i></b> ('`{cat $c/posted}')</h5>'}
|
||||||
sed 's!.+!<b>By: <i>&</i></b><br />!' < $c/user
|
|
||||||
cat $c/body | escape_html | sed 's,$,<br />,'
|
cat $c/body | escape_html | sed 's,$,<br />,'
|
||||||
echo '<hr /></div>'
|
echo '<hr /></div>'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue