Fossil SCM

For the chronological display of forum posts, show edited or deleted posts using text/plain. Item 4 in [https://fossil-scm.org/forum/forumpost/04e5ea0d88|forum post 04e5ea0d88].

drh 2020-04-22 12:08 trunk
Commit 0e78f746554e07180d2612567a06f984834daed2a6642ca889356234523e6406
1 file changed +9 -2
+9 -2
--- src/forum.c
+++ src/forum.c
@@ -467,12 +467,19 @@
467467
sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
468468
@ </h3>
469469
if( isPrivate && !g.perm.ModForum && !sameUser ){
470470
@ <p><span class="modpending">Awaiting Moderator Approval</span></p>
471471
}else{
472
- forum_render(0, bRawMode?"text/plain":pPost->zMimetype, pPost->zWiki,
473
- 0, 1);
472
+ const char *zMimetype;
473
+ if( bRawMode ){
474
+ zMimetype = "text/plain";
475
+ }else if( p->pLeaf!=0 ){
476
+ zMimetype = "text/plain";
477
+ }else{
478
+ zMimetype = pPost->zMimetype;
479
+ }
480
+ forum_render(0, zMimetype, pPost->zWiki, 0, 1);
474481
}
475482
if( g.perm.WrForum && p->pLeaf==0 ){
476483
int sameUser = login_is_individual()
477484
&& fossil_strcmp(pPost->zUser, g.zLogin)==0;
478485
@ <p><form action="%R/forumedit" method="POST">
479486
--- src/forum.c
+++ src/forum.c
@@ -467,12 +467,19 @@
467 sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
468 @ </h3>
469 if( isPrivate && !g.perm.ModForum && !sameUser ){
470 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
471 }else{
472 forum_render(0, bRawMode?"text/plain":pPost->zMimetype, pPost->zWiki,
473 0, 1);
 
 
 
 
 
 
 
474 }
475 if( g.perm.WrForum && p->pLeaf==0 ){
476 int sameUser = login_is_individual()
477 && fossil_strcmp(pPost->zUser, g.zLogin)==0;
478 @ <p><form action="%R/forumedit" method="POST">
479
--- src/forum.c
+++ src/forum.c
@@ -467,12 +467,19 @@
467 sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0;
468 @ </h3>
469 if( isPrivate && !g.perm.ModForum && !sameUser ){
470 @ <p><span class="modpending">Awaiting Moderator Approval</span></p>
471 }else{
472 const char *zMimetype;
473 if( bRawMode ){
474 zMimetype = "text/plain";
475 }else if( p->pLeaf!=0 ){
476 zMimetype = "text/plain";
477 }else{
478 zMimetype = pPost->zMimetype;
479 }
480 forum_render(0, zMimetype, pPost->zWiki, 0, 1);
481 }
482 if( g.perm.WrForum && p->pLeaf==0 ){
483 int sameUser = login_is_individual()
484 && fossil_strcmp(pPost->zUser, g.zLogin)==0;
485 @ <p><form action="%R/forumedit" method="POST">
486

Keyboard Shortcuts

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