Only allow comments for .md files, this avoids silly things like comments for
loggin form pages, but will need to be improved to become more general. Simplify some code a bit and cosmetic improvements.
This commit is contained in:
parent
55d12e5dac
commit
219ec79f69
2 changed files with 4 additions and 9 deletions
|
|
@ -1,9 +1,7 @@
|
|||
fn bridge_init {
|
||||
# XXX: Should avoid running for 404s, dir lists, etc.
|
||||
if(! ~ $#enable_comments 0) {
|
||||
ll_add handlers_body_foot bridge_body_foot
|
||||
if(! ~ $#enable_comments 0 && test -f $local_path.md) {
|
||||
ll_add handlers_body_foot template apps/bridge/foot.tpl
|
||||
if(get_post_args comment_text) {
|
||||
dprint POST COMMNET $"comment_text
|
||||
d=`{date -n} # FIXME Obvious race
|
||||
d=$local_path^'_werc/comments/'^$d/
|
||||
|
||||
|
|
@ -29,7 +27,3 @@ fn bridge_init {
|
|||
|
||||
}
|
||||
|
||||
fn bridge_body_foot {
|
||||
template apps/bridge/foot.tpl
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue