projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
60c5958
)
number of comments
author
Art Cancro
<ajc@citadel.org>
Wed, 13 Oct 2010 16:21:15 +0000
(12:21 -0400)
committer
Art Cancro
<ajc@citadel.org>
Wed, 13 Oct 2010 16:21:15 +0000
(12:21 -0400)
webcit/blogview_renderer.c
patch
|
blob
|
history
diff --git
a/webcit/blogview_renderer.c
b/webcit/blogview_renderer.c
index cd2a52efd3d63719959ad4fd0eb18c192afc68d6..b56b549a530ecdf77dcd2fc79887e5d96d36c032 100644
(file)
--- 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 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) {
/* 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);
BLOG->msgs[i].refs
);
read_message(WC->WBuf, HKEY("view_message"), BLOG->msgs[i].msgnum, NULL, &Mime);
+ num_comments = 0;
for (j=0; (j<BLOG->num_msgs); ++j) {
if (BLOG->msgs[j].refs == BLOG->msgs[i].id) {
for (j=0; (j<BLOG->num_msgs); ++j) {
if (BLOG->msgs[j].refs == BLOG->msgs[i].id) {
-
wc_printf(" * comment %d<br>\n", j)
;
+
++num_comments
;
}
}
}
}
+ wc_printf("<i>%d comments</i>\n", num_comments);
wc_printf("<hr>\n");
}
}
wc_printf("<hr>\n");
}
}