From: Art Cancro Date: Wed, 13 Oct 2010 16:21:15 +0000 (-0400) Subject: number of comments X-Git-Tag: v8.01~665 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=da702a7313cb147206630bea66a348cb1dc94fd9 number of comments --- diff --git a/webcit/blogview_renderer.c b/webcit/blogview_renderer.c index cd2a52efd..b56b549a5 100644 --- a/webcit/blogview_renderer.c +++ b/webcit/blogview_renderer.c @@ -149,7 +149,7 @@ void blogview_learn_thread_references(struct blogpost *bp) int blogview_render(SharedMessageStatus *Stat, void **ViewSpecific, long oper) { struct blogview *BLOG = (struct blogview *) *ViewSpecific; - int i, j; + int i, j, num_comments; /* Pass #1 - sort */ if (Stat->nummsgs > 0) { @@ -199,11 +199,13 @@ int blogview_render(SharedMessageStatus *Stat, void **ViewSpecific, long oper) BLOG->msgs[i].refs ); read_message(WC->WBuf, HKEY("view_message"), BLOG->msgs[i].msgnum, NULL, &Mime); + num_comments = 0; for (j=0; (jnum_msgs); ++j) { if (BLOG->msgs[j].refs == BLOG->msgs[i].id) { - wc_printf(" * comment %d
\n", j); + ++num_comments; } } + wc_printf("%d comments\n", num_comments); wc_printf("
\n"); } }