Fossil SCM

Fix moderation approval in the forum broken by recent refactoring.

stephan 2026-06-11 07:51 UTC forum-editor-2026
Commit 888383791dfc6dfdb824da73b14c1fe0e8994d9bdfdb420a53ba7bb759bf4a1d
1 file changed +4 -6
+4 -6
--- src/forum.c
+++ src/forum.c
@@ -2115,15 +2115,10 @@
21152115
int bSameUser; /* True if author is also the reader */
21162116
int bPreview; /* True in preview mode. */
21172117
int bPrivate; /* True if post is private (not yet moderated) */
21182118
int bReply; /* True if replying to a post */
21192119
2120
- if( !bNoJs ){
2121
- forumedit_page_v2();
2122
- return;
2123
- }
2124
-
21252120
login_check_credentials();
21262121
if( !g.perm.WrForum ){
21272122
login_needed(g.anon.WrForum);
21282123
return;
21292124
}
@@ -2178,10 +2173,14 @@
21782173
}else{
21792174
cgi_redirectf("%R/forum");
21802175
}
21812176
return;
21822177
}
2178
+ }
2179
+ if( !bNoJs ){
2180
+ forumedit_page_v2();
2181
+ return;
21832182
}
21842183
style_set_current_feature("forum");
21852184
isDelete = P("nullout")!=0;
21862185
if( P("submit")
21872186
&& isCsrfSafe
@@ -2310,11 +2309,10 @@
23102309
return;
23112310
}
23122311
style_set_current_feature("forum");
23132312
style_header("Edit Forum Post");
23142313
(void)zFpid;
2315
- @ Much to do here.
23162314
@ <div hidden id='forumedit-placeholder'>
23172315
#if 0
23182316
@ <input type='hidden' name='title' value='%h(zTitle)'>
23192317
#endif
23202318
login_insert_csrf_secret();
23212319
--- 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

Keyboard Shortcuts

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