Fossil

Check-in [c626d1c0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix minor issues with Forum editing.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | forum-brainstorm-1
Files: files | file ages | folders
SHA3-256: c626d1c06cfd05d56ddca359b74e5b6a5414efdf38ee62d14cd59f72ea07d953
User & Date: drh 2018-06-16 15:08:51.844
Context
2018-06-20
01:35
Fix the mimetype selector. Improved styling of the forum display. ... (Closed-Leaf check-in: 837b1cb5 user: drh tags: forum-brainstorm-1)
2018-06-16
15:08
Fix minor issues with Forum editing. ... (check-in: c626d1c0 user: drh tags: forum-brainstorm-1)
13:36
Progress toward getting the forum to actually work. This is an incremental check-in. ... (check-in: 4814c41a user: drh tags: forum-brainstorm-1)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/forum.c.
272
273
274
275
276
277
278














279
280
281
282
283
284
285
  }
  if( P("x")!=0 && cgi_csrf_safe(1) ){
    itemId = forum_post(itemId,parentId,&zErr);
    if( itemId ){
      cgi_redirectf("%R/forum?item=%d",itemId);
      return;
    }














  }
  zMime = wiki_filter_mimetypes(P("m"));
  if( itemId>0 ){
    style_header("Edit Forum Post");
  }else if( parentId>0 ){
    style_header("Comment On Forum Post");
  }else{







>
>
>
>
>
>
>
>
>
>
>
>
>
>







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
  }
  if( P("x")!=0 && cgi_csrf_safe(1) ){
    itemId = forum_post(itemId,parentId,&zErr);
    if( itemId ){
      cgi_redirectf("%R/forum?item=%d",itemId);
      return;
    }
  }
  if( itemId && (P("m")==0 || P("b")==0) ){
    Stmt q;
    db_prepare(&q, "SELECT mimetype, mbody FROM forumpost"
                   " WHERE mpostid=%d", itemId);
    if( db_step(&q)==SQLITE_ROW ){
      if( P("m")==0 ){
        cgi_set_query_parameter("m", db_column_text(&q, 0));
      }
      if( P("b")==0 ){
        cgi_set_query_parameter("b", db_column_text(&q, 1));
      }
    }
    db_finalize(&q);
  }
  zMime = wiki_filter_mimetypes(P("m"));
  if( itemId>0 ){
    style_header("Edit Forum Post");
  }else if( parentId>0 ){
    style_header("Comment On Forum Post");
  }else{