Fossil SCM
Fix moderation approval in the forum broken by recent refactoring.
Commit
888383791dfc6dfdb824da73b14c1fe0e8994d9bdfdb420a53ba7bb759bf4a1d
Parent
ee59442ab35080e…
1 file changed
+4
-6
+4
-6
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -2115,15 +2115,10 @@ | ||
| 2115 | 2115 | int bSameUser; /* True if author is also the reader */ |
| 2116 | 2116 | int bPreview; /* True in preview mode. */ |
| 2117 | 2117 | int bPrivate; /* True if post is private (not yet moderated) */ |
| 2118 | 2118 | int bReply; /* True if replying to a post */ |
| 2119 | 2119 | |
| 2120 | - if( !bNoJs ){ | |
| 2121 | - forumedit_page_v2(); | |
| 2122 | - return; | |
| 2123 | - } | |
| 2124 | - | |
| 2125 | 2120 | login_check_credentials(); |
| 2126 | 2121 | if( !g.perm.WrForum ){ |
| 2127 | 2122 | login_needed(g.anon.WrForum); |
| 2128 | 2123 | return; |
| 2129 | 2124 | } |
| @@ -2178,10 +2173,14 @@ | ||
| 2178 | 2173 | }else{ |
| 2179 | 2174 | cgi_redirectf("%R/forum"); |
| 2180 | 2175 | } |
| 2181 | 2176 | return; |
| 2182 | 2177 | } |
| 2178 | + } | |
| 2179 | + if( !bNoJs ){ | |
| 2180 | + forumedit_page_v2(); | |
| 2181 | + return; | |
| 2183 | 2182 | } |
| 2184 | 2183 | style_set_current_feature("forum"); |
| 2185 | 2184 | isDelete = P("nullout")!=0; |
| 2186 | 2185 | if( P("submit") |
| 2187 | 2186 | && isCsrfSafe |
| @@ -2310,11 +2309,10 @@ | ||
| 2310 | 2309 | return; |
| 2311 | 2310 | } |
| 2312 | 2311 | style_set_current_feature("forum"); |
| 2313 | 2312 | style_header("Edit Forum Post"); |
| 2314 | 2313 | (void)zFpid; |
| 2315 | - @ Much to do here. | |
| 2316 | 2314 | @ <div hidden id='forumedit-placeholder'> |
| 2317 | 2315 | #if 0 |
| 2318 | 2316 | @ <input type='hidden' name='title' value='%h(zTitle)'> |
| 2319 | 2317 | #endif |
| 2320 | 2318 | login_insert_csrf_secret(); |
| 2321 | 2319 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -2115,15 +2115,10 @@ | |
| 2115 | int bSameUser; /* True if author is also the reader */ |
| 2116 | int bPreview; /* True in preview mode. */ |
| 2117 | int bPrivate; /* True if post is private (not yet moderated) */ |
| 2118 | int bReply; /* True if replying to a post */ |
| 2119 | |
| 2120 | if( !bNoJs ){ |
| 2121 | forumedit_page_v2(); |
| 2122 | return; |
| 2123 | } |
| 2124 | |
| 2125 | login_check_credentials(); |
| 2126 | if( !g.perm.WrForum ){ |
| 2127 | login_needed(g.anon.WrForum); |
| 2128 | return; |
| 2129 | } |
| @@ -2178,10 +2173,14 @@ | |
| 2178 | }else{ |
| 2179 | cgi_redirectf("%R/forum"); |
| 2180 | } |
| 2181 | return; |
| 2182 | } |
| 2183 | } |
| 2184 | style_set_current_feature("forum"); |
| 2185 | isDelete = P("nullout")!=0; |
| 2186 | if( P("submit") |
| 2187 | && isCsrfSafe |
| @@ -2310,11 +2309,10 @@ | |
| 2310 | return; |
| 2311 | } |
| 2312 | style_set_current_feature("forum"); |
| 2313 | style_header("Edit Forum Post"); |
| 2314 | (void)zFpid; |
| 2315 | @ Much to do here. |
| 2316 | @ <div hidden id='forumedit-placeholder'> |
| 2317 | #if 0 |
| 2318 | @ <input type='hidden' name='title' value='%h(zTitle)'> |
| 2319 | #endif |
| 2320 | login_insert_csrf_secret(); |
| 2321 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -2115,15 +2115,10 @@ | |
| 2115 | int bSameUser; /* True if author is also the reader */ |
| 2116 | int bPreview; /* True in preview mode. */ |
| 2117 | int bPrivate; /* True if post is private (not yet moderated) */ |
| 2118 | int bReply; /* True if replying to a post */ |
| 2119 | |
| 2120 | login_check_credentials(); |
| 2121 | if( !g.perm.WrForum ){ |
| 2122 | login_needed(g.anon.WrForum); |
| 2123 | return; |
| 2124 | } |
| @@ -2178,10 +2173,14 @@ | |
| 2173 | }else{ |
| 2174 | cgi_redirectf("%R/forum"); |
| 2175 | } |
| 2176 | return; |
| 2177 | } |
| 2178 | } |
| 2179 | if( !bNoJs ){ |
| 2180 | forumedit_page_v2(); |
| 2181 | return; |
| 2182 | } |
| 2183 | style_set_current_feature("forum"); |
| 2184 | isDelete = P("nullout")!=0; |
| 2185 | if( P("submit") |
| 2186 | && isCsrfSafe |
| @@ -2310,11 +2309,10 @@ | |
| 2309 | return; |
| 2310 | } |
| 2311 | style_set_current_feature("forum"); |
| 2312 | style_header("Edit Forum Post"); |
| 2313 | (void)zFpid; |
| 2314 | @ <div hidden id='forumedit-placeholder'> |
| 2315 | #if 0 |
| 2316 | @ <input type='hidden' name='title' value='%h(zTitle)'> |
| 2317 | #endif |
| 2318 | login_insert_csrf_secret(); |
| 2319 |