Fossil SCM

Skip private forum posts in both CLI and web RSS feeds.

vor0nwe 2026-03-08 11:53 rss-content
Commit 647c424f405f14f975bb549163acf2b98ff02cf82fe532cd5348fb5209afb697
1 file changed +17 -9
+17 -9
--- src/rss.c
+++ src/rss.c
@@ -220,20 +220,19 @@
220220
Blob *pOut,
221221
char **pzAltLink,
222222
int rid,
223223
const char *zEType,
224224
const char *zBase,
225
- const char *zTop,
226
- int bFilterPrivate
225
+ const char *zTop
227226
){
228227
Manifest *pPost = 0;
229228
int rc = 0;
230229
Blob normalized = BLOB_INITIALIZER;
231230
if( pzAltLink ) *pzAltLink = 0;
232231
if( pOut==0 || zEType==0 ) return 0;
233232
if( zEType[0]=='f' ){
234
- if( bFilterPrivate && content_is_private(rid) ) return -1;
233
+ if( content_is_private(rid) ) return -1;
235234
pPost = manifest_get(rid, CFTYPE_FORUM, 0);
236235
if( pPost ){
237236
forum_render_to_html(pOut, pPost->zMimetype, pPost->zWiki);
238237
}
239238
}else if( zEType[0]=='e' ){
@@ -480,16 +479,18 @@
480479
if( zTagList ){
481480
zSuffix = mprintf(" (tags: %s)", zTagList);
482481
}
483482
484483
bHasContent = rss_render_item_html(&contentHtml, &zTechnoteId, rid, zEType,
485
- blob_str(&base), blob_str(&top),
486
- !g.perm.ModForum);
484
+ blob_str(&base), blob_str(&top));
487485
if( bHasContent<0 ){
488
- free(zDate);
489
- free(zSuffix);
490
- continue;
486
+ if( zEType[0]=='f' && !g.perm.ModForum ){
487
+ free(zDate);
488
+ free(zSuffix);
489
+ continue;
490
+ }
491
+ bHasContent = 0;
491492
}
492493
@ <item>
493494
@ <title>%s(zPrefix)%h(zCom)%h(zSuffix)</title>
494495
if( zTechnoteId!=0 ){
495496
@ <link>%s(g.zBaseURL)/info/%s(zTechnoteId)</link>
@@ -723,11 +724,18 @@
723724
if( zTagList ){
724725
zSuffix = mprintf(" (tags: %s)", zTagList);
725726
}
726727
727728
bHasContent = rss_render_item_html(&contentHtml, &zTechnoteId, rid, zEType,
728
- blob_str(&base), blob_str(&top), 0);
729
+ blob_str(&base), blob_str(&top));
730
+ if( bHasContent<0 ){
731
+ free(zTechnoteId);
732
+ blob_reset(&contentHtml);
733
+ free(zDate);
734
+ free(zSuffix);
735
+ continue;
736
+ }
729737
fossil_print("<item>");
730738
fossil_print("<title>%s%h%h</title>\n", zPrefix, zCom, zSuffix);
731739
if( zTechnoteId!=0 ){
732740
fossil_print("<link>%s/info/%s</link>\n", zBaseURL, zTechnoteId);
733741
}else{
734742
--- src/rss.c
+++ src/rss.c
@@ -220,20 +220,19 @@
220 Blob *pOut,
221 char **pzAltLink,
222 int rid,
223 const char *zEType,
224 const char *zBase,
225 const char *zTop,
226 int bFilterPrivate
227 ){
228 Manifest *pPost = 0;
229 int rc = 0;
230 Blob normalized = BLOB_INITIALIZER;
231 if( pzAltLink ) *pzAltLink = 0;
232 if( pOut==0 || zEType==0 ) return 0;
233 if( zEType[0]=='f' ){
234 if( bFilterPrivate && content_is_private(rid) ) return -1;
235 pPost = manifest_get(rid, CFTYPE_FORUM, 0);
236 if( pPost ){
237 forum_render_to_html(pOut, pPost->zMimetype, pPost->zWiki);
238 }
239 }else if( zEType[0]=='e' ){
@@ -480,16 +479,18 @@
480 if( zTagList ){
481 zSuffix = mprintf(" (tags: %s)", zTagList);
482 }
483
484 bHasContent = rss_render_item_html(&contentHtml, &zTechnoteId, rid, zEType,
485 blob_str(&base), blob_str(&top),
486 !g.perm.ModForum);
487 if( bHasContent<0 ){
488 free(zDate);
489 free(zSuffix);
490 continue;
 
 
 
491 }
492 @ <item>
493 @ <title>%s(zPrefix)%h(zCom)%h(zSuffix)</title>
494 if( zTechnoteId!=0 ){
495 @ <link>%s(g.zBaseURL)/info/%s(zTechnoteId)</link>
@@ -723,11 +724,18 @@
723 if( zTagList ){
724 zSuffix = mprintf(" (tags: %s)", zTagList);
725 }
726
727 bHasContent = rss_render_item_html(&contentHtml, &zTechnoteId, rid, zEType,
728 blob_str(&base), blob_str(&top), 0);
 
 
 
 
 
 
 
729 fossil_print("<item>");
730 fossil_print("<title>%s%h%h</title>\n", zPrefix, zCom, zSuffix);
731 if( zTechnoteId!=0 ){
732 fossil_print("<link>%s/info/%s</link>\n", zBaseURL, zTechnoteId);
733 }else{
734
--- src/rss.c
+++ src/rss.c
@@ -220,20 +220,19 @@
220 Blob *pOut,
221 char **pzAltLink,
222 int rid,
223 const char *zEType,
224 const char *zBase,
225 const char *zTop
 
226 ){
227 Manifest *pPost = 0;
228 int rc = 0;
229 Blob normalized = BLOB_INITIALIZER;
230 if( pzAltLink ) *pzAltLink = 0;
231 if( pOut==0 || zEType==0 ) return 0;
232 if( zEType[0]=='f' ){
233 if( content_is_private(rid) ) return -1;
234 pPost = manifest_get(rid, CFTYPE_FORUM, 0);
235 if( pPost ){
236 forum_render_to_html(pOut, pPost->zMimetype, pPost->zWiki);
237 }
238 }else if( zEType[0]=='e' ){
@@ -480,16 +479,18 @@
479 if( zTagList ){
480 zSuffix = mprintf(" (tags: %s)", zTagList);
481 }
482
483 bHasContent = rss_render_item_html(&contentHtml, &zTechnoteId, rid, zEType,
484 blob_str(&base), blob_str(&top));
 
485 if( bHasContent<0 ){
486 if( zEType[0]=='f' && !g.perm.ModForum ){
487 free(zDate);
488 free(zSuffix);
489 continue;
490 }
491 bHasContent = 0;
492 }
493 @ <item>
494 @ <title>%s(zPrefix)%h(zCom)%h(zSuffix)</title>
495 if( zTechnoteId!=0 ){
496 @ <link>%s(g.zBaseURL)/info/%s(zTechnoteId)</link>
@@ -723,11 +724,18 @@
724 if( zTagList ){
725 zSuffix = mprintf(" (tags: %s)", zTagList);
726 }
727
728 bHasContent = rss_render_item_html(&contentHtml, &zTechnoteId, rid, zEType,
729 blob_str(&base), blob_str(&top));
730 if( bHasContent<0 ){
731 free(zTechnoteId);
732 blob_reset(&contentHtml);
733 free(zDate);
734 free(zSuffix);
735 continue;
736 }
737 fossil_print("<item>");
738 fossil_print("<title>%s%h%h</title>\n", zPrefix, zCom, zSuffix);
739 if( zTechnoteId!=0 ){
740 fossil_print("<link>%s/info/%s</link>\n", zBaseURL, zTechnoteId);
741 }else{
742

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button