Fossil SCM

Do not show the text forum messages that are pending moderation in the timeline view.

drh 2020-03-18 00:42 trunk
Commit bf410211c7324eff7da752b462c03feb69a1d29cc0ba4d27eb8a18aec8f6802d
1 file changed +10 -4
+10 -4
--- src/timeline.c
+++ src/timeline.c
@@ -791,14 +791,20 @@
791791
792792
/* Show the complete text of forum messages */
793793
if( (tmFlags & (TIMELINE_FORUMTXT))!=0
794794
&& zType[0]=='f' && g.perm.Hyperlink
795795
){
796
- Manifest *pPost = manifest_get(rid, CFTYPE_FORUM, 0);
797
- if( pPost ){
798
- forum_render(0, pPost->zMimetype, pPost->zWiki, "forumTimeline");
799
- manifest_destroy(pPost);
796
+ if( content_is_private(rid)
797
+ && !g.perm.ModForum
798
+ ){
799
+ @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
800
+ }else{
801
+ Manifest *pPost = manifest_get(rid, CFTYPE_FORUM, 0);
802
+ if( pPost ){
803
+ forum_render(0, pPost->zMimetype, pPost->zWiki, "forumTimeline");
804
+ manifest_destroy(pPost);
805
+ }
800806
}
801807
}
802808
}
803809
if( suppressCnt ){
804810
@ <span class="timelineDisabled">... %d(suppressCnt) similar
805811
--- src/timeline.c
+++ src/timeline.c
@@ -791,14 +791,20 @@
791
792 /* Show the complete text of forum messages */
793 if( (tmFlags & (TIMELINE_FORUMTXT))!=0
794 && zType[0]=='f' && g.perm.Hyperlink
795 ){
796 Manifest *pPost = manifest_get(rid, CFTYPE_FORUM, 0);
797 if( pPost ){
798 forum_render(0, pPost->zMimetype, pPost->zWiki, "forumTimeline");
799 manifest_destroy(pPost);
 
 
 
 
 
 
800 }
801 }
802 }
803 if( suppressCnt ){
804 @ <span class="timelineDisabled">... %d(suppressCnt) similar
805
--- src/timeline.c
+++ src/timeline.c
@@ -791,14 +791,20 @@
791
792 /* Show the complete text of forum messages */
793 if( (tmFlags & (TIMELINE_FORUMTXT))!=0
794 && zType[0]=='f' && g.perm.Hyperlink
795 ){
796 if( content_is_private(rid)
797 && !g.perm.ModForum
798 ){
799 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
800 }else{
801 Manifest *pPost = manifest_get(rid, CFTYPE_FORUM, 0);
802 if( pPost ){
803 forum_render(0, pPost->zMimetype, pPost->zWiki, "forumTimeline");
804 manifest_destroy(pPost);
805 }
806 }
807 }
808 }
809 if( suppressCnt ){
810 @ <span class="timelineDisabled">... %d(suppressCnt) similar
811

Keyboard Shortcuts

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