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].
Commit
0e78f746554e07180d2612567a06f984834daed2a6642ca889356234523e6406
Parent
19f11a8dec591f4…
1 file changed
+9
-2
+9
-2
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -467,12 +467,19 @@ | ||
| 467 | 467 | sameUser = notAnon && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 468 | 468 | @ </h3> |
| 469 | 469 | if( isPrivate && !g.perm.ModForum && !sameUser ){ |
| 470 | 470 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 471 | 471 | }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); | |
| 474 | 481 | } |
| 475 | 482 | if( g.perm.WrForum && p->pLeaf==0 ){ |
| 476 | 483 | int sameUser = login_is_individual() |
| 477 | 484 | && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 478 | 485 | @ <p><form action="%R/forumedit" method="POST"> |
| 479 | 486 |
| --- 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 |