Fossil SCM
Preserve moderator access to private forum posts in RSS feeds.
Commit
4fbde38d59da3859985d31beed830191663d23af660089203f75197b668e11aa
Parent
647c424f405f14f…
1 file changed
+6
-7
+6
-7
| --- src/rss.c | ||
| +++ src/rss.c | ||
| @@ -228,11 +228,11 @@ | ||
| 228 | 228 | int rc = 0; |
| 229 | 229 | Blob normalized = BLOB_INITIALIZER; |
| 230 | 230 | if( pzAltLink ) *pzAltLink = 0; |
| 231 | 231 | if( pOut==0 || zEType==0 ) return 0; |
| 232 | 232 | if( zEType[0]=='f' ){ |
| 233 | - if( content_is_private(rid) ) return -1; | |
| 233 | + if( content_is_private(rid) && !g.perm.ModForum ) return -1; | |
| 234 | 234 | pPost = manifest_get(rid, CFTYPE_FORUM, 0); |
| 235 | 235 | if( pPost ){ |
| 236 | 236 | forum_render_to_html(pOut, pPost->zMimetype, pPost->zWiki); |
| 237 | 237 | } |
| 238 | 238 | }else if( zEType[0]=='e' ){ |
| @@ -481,16 +481,15 @@ | ||
| 481 | 481 | } |
| 482 | 482 | |
| 483 | 483 | bHasContent = rss_render_item_html(&contentHtml, &zTechnoteId, rid, zEType, |
| 484 | 484 | blob_str(&base), blob_str(&top)); |
| 485 | 485 | if( bHasContent<0 ){ |
| 486 | - if( zEType[0]=='f' && !g.perm.ModForum ){ | |
| 487 | - free(zDate); | |
| 488 | - free(zSuffix); | |
| 489 | - continue; | |
| 490 | - } | |
| 491 | - bHasContent = 0; | |
| 486 | + free(zTechnoteId); | |
| 487 | + blob_reset(&contentHtml); | |
| 488 | + free(zDate); | |
| 489 | + free(zSuffix); | |
| 490 | + continue; | |
| 492 | 491 | } |
| 493 | 492 | @ <item> |
| 494 | 493 | @ <title>%s(zPrefix)%h(zCom)%h(zSuffix)</title> |
| 495 | 494 | if( zTechnoteId!=0 ){ |
| 496 | 495 | @ <link>%s(g.zBaseURL)/info/%s(zTechnoteId)</link> |
| 497 | 496 |
| --- src/rss.c | |
| +++ src/rss.c | |
| @@ -228,11 +228,11 @@ | |
| 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' ){ |
| @@ -481,16 +481,15 @@ | |
| 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> |
| 497 |
| --- src/rss.c | |
| +++ src/rss.c | |
| @@ -228,11 +228,11 @@ | |
| 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) && !g.perm.ModForum ) 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' ){ |
| @@ -481,16 +481,15 @@ | |
| 481 | } |
| 482 | |
| 483 | bHasContent = rss_render_item_html(&contentHtml, &zTechnoteId, rid, zEType, |
| 484 | blob_str(&base), blob_str(&top)); |
| 485 | if( bHasContent<0 ){ |
| 486 | free(zTechnoteId); |
| 487 | blob_reset(&contentHtml); |
| 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> |
| 496 |