Fossil SCM
Do not show the Close Post button for private/pending-moderation posts to avoid tagging what will turn into a phantom if it's rejected.
Commit
f1c281dd466b4bcd072b0355ddd4f40bc3e5b0891ec46bbfaaac1f2bbbc19052
Parent
449bb3bc6ed37f3…
1 file changed
+1
-1
+1
-1
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -1260,11 +1260,11 @@ | ||
| 1260 | 1260 | login_insert_csrf_secret(); |
| 1261 | 1261 | @ </form> |
| 1262 | 1262 | |
| 1263 | 1263 | if( bSelect ){ |
| 1264 | 1264 | const ForumPost *pHead = p->pEditHead ? p->pEditHead : p; |
| 1265 | - if( forumpost_may_close() && iClosed>=0 ){ | |
| 1265 | + if( !bPrivate && forumpost_may_close() && iClosed>=0 ){ | |
| 1266 | 1266 | @ <form method="post" \ |
| 1267 | 1267 | @ action='%R/forumpost_%s(iClosed > 0 ? "reopen" : "close")'> |
| 1268 | 1268 | login_insert_csrf_secret(); |
| 1269 | 1269 | @ <input type="hidden" name="fpid" value="%s(p->zUuid)" /> |
| 1270 | 1270 | if( moderation_pending(p->fpid)==0 ){ |
| 1271 | 1271 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -1260,11 +1260,11 @@ | |
| 1260 | login_insert_csrf_secret(); |
| 1261 | @ </form> |
| 1262 | |
| 1263 | if( bSelect ){ |
| 1264 | const ForumPost *pHead = p->pEditHead ? p->pEditHead : p; |
| 1265 | if( forumpost_may_close() && iClosed>=0 ){ |
| 1266 | @ <form method="post" \ |
| 1267 | @ action='%R/forumpost_%s(iClosed > 0 ? "reopen" : "close")'> |
| 1268 | login_insert_csrf_secret(); |
| 1269 | @ <input type="hidden" name="fpid" value="%s(p->zUuid)" /> |
| 1270 | if( moderation_pending(p->fpid)==0 ){ |
| 1271 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -1260,11 +1260,11 @@ | |
| 1260 | login_insert_csrf_secret(); |
| 1261 | @ </form> |
| 1262 | |
| 1263 | if( bSelect ){ |
| 1264 | const ForumPost *pHead = p->pEditHead ? p->pEditHead : p; |
| 1265 | if( !bPrivate && forumpost_may_close() && iClosed>=0 ){ |
| 1266 | @ <form method="post" \ |
| 1267 | @ action='%R/forumpost_%s(iClosed > 0 ? "reopen" : "close")'> |
| 1268 | login_insert_csrf_secret(); |
| 1269 | @ <input type="hidden" name="fpid" value="%s(p->zUuid)" /> |
| 1270 | if( moderation_pending(p->fpid)==0 ){ |
| 1271 |