Fossil SCM
Do not show the text forum messages that are pending moderation in the timeline view.
Commit
bf410211c7324eff7da752b462c03feb69a1d29cc0ba4d27eb8a18aec8f6802d
Parent
bc7c27cb85a3cba…
1 file changed
+10
-4
+10
-4
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -791,14 +791,20 @@ | ||
| 791 | 791 | |
| 792 | 792 | /* Show the complete text of forum messages */ |
| 793 | 793 | if( (tmFlags & (TIMELINE_FORUMTXT))!=0 |
| 794 | 794 | && zType[0]=='f' && g.perm.Hyperlink |
| 795 | 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); | |
| 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 | + } | |
| 800 | 806 | } |
| 801 | 807 | } |
| 802 | 808 | } |
| 803 | 809 | if( suppressCnt ){ |
| 804 | 810 | @ <span class="timelineDisabled">... %d(suppressCnt) similar |
| 805 | 811 |
| --- 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 |