Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Admin users have a link in /forumthread to show the hash of all artifacts associated with that thread. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | trunk |
Files: | files | file ages | folders |
SHA3-256: |
83928d8a02d86bca9dc433cea9e87489 |
User & Date: | drh 2023-06-01 18:02:19 |
Context
2023-06-01
| ||
18:02 | Admin users have a link in /forumthread to show the hash of all artifacts associated with that thread. ... (Leaf check-in: 83928d8a user: drh tags: trunk) | |
17:18 | Increase the version number to 2.23 in order to start the next development cycle. ... (check-in: 9f857c2d user: drh tags: trunk) | |
Changes
Changes to src/forum.c.
︙ | ︙ | |||
316 317 318 319 320 321 322 323 324 325 326 327 328 329 | fossil_print("%d->%d\n", p->fpid, p->pEditTail->fpid); }else{ fossil_print("%d\n", p->fpid); } } forumthread_delete(pThread); } /* ** Render a forum post for display */ void forum_render( const char *zTitle, /* The title. Might be NULL for no title */ const char *zMimetype, /* Mimetype of the message */ | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | fossil_print("%d->%d\n", p->fpid, p->pEditTail->fpid); }else{ fossil_print("%d\n", p->fpid); } } forumthread_delete(pThread); } /* ** WEBPAGE: forumthreadhashlist ** ** Usage: /forumthreadhashlist/HASH-OF-ROOT ** ** This page (accessibly only to admins) shows a list of all artifacts ** associated with a single forum thread. An admin might copy/paste this ** list into the /shun page in order to shun an entire thread. */ void forumthreadhashlist(void){ int fpid; int froot; const char *zName = P("name"); ForumThread *pThread; ForumPost *p; char *fuuid; login_check_credentials(); if( !g.perm.Admin ){ return; } if( zName==0 ){ webpage_error("Missing \"name=\" query parameter"); } fpid = symbolic_name_to_rid(zName, "f"); if( fpid<=0 ){ if( fpid==0 ){ webpage_notfound_error("Unknown forum id: \"%s\"", zName); }else{ ambiguous_page(); } return; } froot = db_int(0, "SELECT froot FROM forumpost WHERE fpid=%d", fpid); if( froot==0 ){ webpage_notfound_error("Not a forum post: \"%s\"", zName); } fuuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", froot); style_set_current_feature("forum"); style_header("Artifacts Of Forum Thread"); @ <h2> @ Artifacts associated with the forum thread @ <a href="%R/forumthread/%S(fuuid)">%S(fuuid)</a>:</h2> @ <pre> pThread = forumthread_create(froot, 1); for(p=pThread->pFirst; p; p=p->pNext){ @ %h(p->zUuid) } forumthread_delete(pThread); @ </pre> style_finish_page(); } /* ** Render a forum post for display */ void forum_render( const char *zTitle, /* The title. Might be NULL for no title */ const char *zMimetype, /* Mimetype of the message */ |
︙ | ︙ | |||
912 913 914 915 916 917 918 919 920 921 922 923 924 925 | } if( mode!=FD_HIER ){ style_submenu_element("Hierarchical", "%R/%s/%s?t=h%s%s", g.zPath, zName, bUnf ? "&unf" : "", bHist ? "&hist" : ""); } style_submenu_checkbox("unf", "Unformatted", 0, 0); style_submenu_checkbox("hist", "History", 0, 0); /* Display the thread. */ if( fossil_strcmp(g.zPath,"forumthread")==0 ) fpid = 0; forum_display_thread(froot, fpid, mode, autoMode, bUnf, bHist); /* Emit Forum Javascript. */ builtin_request_js("forum.js"); | > > > | 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 | } if( mode!=FD_HIER ){ style_submenu_element("Hierarchical", "%R/%s/%s?t=h%s%s", g.zPath, zName, bUnf ? "&unf" : "", bHist ? "&hist" : ""); } style_submenu_checkbox("unf", "Unformatted", 0, 0); style_submenu_checkbox("hist", "History", 0, 0); if( g.perm.Admin ){ style_submenu_element("Artifacts", "%R/forumthreadhashlist/%t", zName); } /* Display the thread. */ if( fossil_strcmp(g.zPath,"forumthread")==0 ) fpid = 0; forum_display_thread(froot, fpid, mode, autoMode, bUnf, bHist); /* Emit Forum Javascript. */ builtin_request_js("forum.js"); |
︙ | ︙ |