Fossil SCM
Add a note about an open design question re. where /attachadd should redirect for a forum post attachment.
Commit
55b2a108449461af723f436573356fb2830817e3621c0aad3d795de6d8da3360
Parent
782b8b8e81abc83…
1 file changed
+2
-1
+2
-1
| --- src/attach.c | ||
| +++ src/attach.c | ||
| @@ -434,11 +434,12 @@ | ||
| 434 | 434 | } |
| 435 | 435 | zTarget = zExtraFree = rid_to_uuid(fpid); |
| 436 | 436 | zTargetType = mprintf("Forum post <a href=\"%R/forumpost/%S\">%h</a>", |
| 437 | 437 | zTarget, zForumPost); |
| 438 | 438 | zTo = mprintf("%R/attachview?forumpost=%T&file=%T", |
| 439 | - zTarget, zName); | |
| 439 | + zTarget, zName) | |
| 440 | + /* Or we could return directly to the forum post. */; | |
| 440 | 441 | }else if( zPage ){ |
| 441 | 442 | if( g.perm.ApndWiki==0 || g.perm.Attach==0 ){ |
| 442 | 443 | login_needed(g.anon.ApndWiki && g.anon.Attach); |
| 443 | 444 | return; |
| 444 | 445 | } |
| 445 | 446 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -434,11 +434,12 @@ | |
| 434 | } |
| 435 | zTarget = zExtraFree = rid_to_uuid(fpid); |
| 436 | zTargetType = mprintf("Forum post <a href=\"%R/forumpost/%S\">%h</a>", |
| 437 | zTarget, zForumPost); |
| 438 | zTo = mprintf("%R/attachview?forumpost=%T&file=%T", |
| 439 | zTarget, zName); |
| 440 | }else if( zPage ){ |
| 441 | if( g.perm.ApndWiki==0 || g.perm.Attach==0 ){ |
| 442 | login_needed(g.anon.ApndWiki && g.anon.Attach); |
| 443 | return; |
| 444 | } |
| 445 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -434,11 +434,12 @@ | |
| 434 | } |
| 435 | zTarget = zExtraFree = rid_to_uuid(fpid); |
| 436 | zTargetType = mprintf("Forum post <a href=\"%R/forumpost/%S\">%h</a>", |
| 437 | zTarget, zForumPost); |
| 438 | zTo = mprintf("%R/attachview?forumpost=%T&file=%T", |
| 439 | zTarget, zName) |
| 440 | /* Or we could return directly to the forum post. */; |
| 441 | }else if( zPage ){ |
| 442 | if( g.perm.ApndWiki==0 || g.perm.Attach==0 ){ |
| 443 | login_needed(g.anon.ApndWiki && g.anon.Attach); |
| 444 | return; |
| 445 | } |
| 446 |