Fossil SCM
Fix the second /attachadd impl to handle the WrTForum case.
Commit
67416609c278b570e4311b9c6e0deb48c39303daf7d2336903cc8c99ec45386c
Parent
a73f05baa817de4…
1 file changed
+1
-1
+1
-1
| --- src/attach.c | ||
| +++ src/attach.c | ||
| @@ -1022,11 +1022,11 @@ | ||
| 1022 | 1022 | case 0: |
| 1023 | 1023 | webpage_error("Cannot resolve target=%h.", zTarget); |
| 1024 | 1024 | break; |
| 1025 | 1025 | case CFTYPE_FORUM:{ |
| 1026 | 1026 | int fpid; |
| 1027 | - if( g.perm.AttachForum==0 ){ | |
| 1027 | + if( 0==g.perm.AttachForum && 0==g.perm.WrTForum ){ | |
| 1028 | 1028 | login_needed(g.anon.AttachForum); |
| 1029 | 1029 | return; |
| 1030 | 1030 | } |
| 1031 | 1031 | fpid = forumpost_head_rid2(zTarget); |
| 1032 | 1032 | if( fpid<=0 ){ |
| 1033 | 1033 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -1022,11 +1022,11 @@ | |
| 1022 | case 0: |
| 1023 | webpage_error("Cannot resolve target=%h.", zTarget); |
| 1024 | break; |
| 1025 | case CFTYPE_FORUM:{ |
| 1026 | int fpid; |
| 1027 | if( g.perm.AttachForum==0 ){ |
| 1028 | login_needed(g.anon.AttachForum); |
| 1029 | return; |
| 1030 | } |
| 1031 | fpid = forumpost_head_rid2(zTarget); |
| 1032 | if( fpid<=0 ){ |
| 1033 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -1022,11 +1022,11 @@ | |
| 1022 | case 0: |
| 1023 | webpage_error("Cannot resolve target=%h.", zTarget); |
| 1024 | break; |
| 1025 | case CFTYPE_FORUM:{ |
| 1026 | int fpid; |
| 1027 | if( 0==g.perm.AttachForum && 0==g.perm.WrTForum ){ |
| 1028 | login_needed(g.anon.AttachForum); |
| 1029 | return; |
| 1030 | } |
| 1031 | fpid = forumpost_head_rid2(zTarget); |
| 1032 | if( fpid<=0 ){ |
| 1033 |