Fossil SCM
Allow disapproving Forum posts that are pending moderation, even if the post is not well-formed.
Commit
54ae84e1585cebab3e595b2fe121463f518c9e828ed5d88089c6b5fbc7e51901
Parent
dd8beced5a14913…
1 file changed
+3
-1
+3
-1
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -2094,11 +2094,13 @@ | ||
| 2094 | 2094 | fpid = symbolic_name_to_rid(zFpid, "f"); |
| 2095 | 2095 | if( fpid<=0 || (pPost = manifest_get(fpid, CFTYPE_FORUM, 0))==0 ){ |
| 2096 | 2096 | webpage_error("Missing or invalid fpid query parameter"); |
| 2097 | 2097 | } |
| 2098 | 2098 | froot = db_int(0, "SELECT froot FROM forumpost WHERE fpid=%d", fpid); |
| 2099 | - if( froot==0 || (pRootPost = manifest_get(froot, CFTYPE_FORUM, 0))==0 ){ | |
| 2099 | + if( (froot==0 || (pRootPost = manifest_get(froot, CFTYPE_FORUM, 0))==0) | |
| 2100 | + && P("reject")==0 | |
| 2101 | + ){ | |
| 2100 | 2102 | webpage_error("fpid does not appear to be a forum post: \"%d\"", fpid); |
| 2101 | 2103 | } |
| 2102 | 2104 | if( P("cancel") ){ |
| 2103 | 2105 | cgi_redirectf("%R/forumpost/%S",zFpid); |
| 2104 | 2106 | return; |
| 2105 | 2107 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -2094,11 +2094,13 @@ | |
| 2094 | fpid = symbolic_name_to_rid(zFpid, "f"); |
| 2095 | if( fpid<=0 || (pPost = manifest_get(fpid, CFTYPE_FORUM, 0))==0 ){ |
| 2096 | webpage_error("Missing or invalid fpid query parameter"); |
| 2097 | } |
| 2098 | froot = db_int(0, "SELECT froot FROM forumpost WHERE fpid=%d", fpid); |
| 2099 | if( froot==0 || (pRootPost = manifest_get(froot, CFTYPE_FORUM, 0))==0 ){ |
| 2100 | webpage_error("fpid does not appear to be a forum post: \"%d\"", fpid); |
| 2101 | } |
| 2102 | if( P("cancel") ){ |
| 2103 | cgi_redirectf("%R/forumpost/%S",zFpid); |
| 2104 | return; |
| 2105 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -2094,11 +2094,13 @@ | |
| 2094 | fpid = symbolic_name_to_rid(zFpid, "f"); |
| 2095 | if( fpid<=0 || (pPost = manifest_get(fpid, CFTYPE_FORUM, 0))==0 ){ |
| 2096 | webpage_error("Missing or invalid fpid query parameter"); |
| 2097 | } |
| 2098 | froot = db_int(0, "SELECT froot FROM forumpost WHERE fpid=%d", fpid); |
| 2099 | if( (froot==0 || (pRootPost = manifest_get(froot, CFTYPE_FORUM, 0))==0) |
| 2100 | && P("reject")==0 |
| 2101 | ){ |
| 2102 | webpage_error("fpid does not appear to be a forum post: \"%d\"", fpid); |
| 2103 | } |
| 2104 | if( P("cancel") ){ |
| 2105 | cgi_redirectf("%R/forumpost/%S",zFpid); |
| 2106 | return; |
| 2107 |