From f5af1b5fe80c70104ae1795bedcb982417457d5b Mon Sep 17 00:00:00 2001 From: Uriel Date: Mon, 26 Jan 2009 06:12:45 +0100 Subject: [PATCH] Be smarter about when to enable comments, and make it configurable. --- apps/bridge/app.rc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/bridge/app.rc b/apps/bridge/app.rc index a8b19ef..da1be48 100644 --- a/apps/bridge/app.rc +++ b/apps/bridge/app.rc @@ -1,5 +1,6 @@ +comment_file_types=(md html) fn bridge_init { - if(! ~ $#enable_comments 0 && test -f $local_path.md) { + if(! ~ $#enable_comments 0 && ! ~ `{ls $local_path.$comment_file_types >[2]/dev/null|wc -l} 0) { ll_add handlers_body_foot template apps/bridge/foot.tpl if(get_post_args comment_text) { d=`{date -n} # FIXME Obvious race