Fossil SCM
Minor doc and style tweaks.
Commit
766755a3f910b39e8b1ac597ce0a4feb269dd44d170f2f67036ebf39c5c45ac1
Parent
05865c2310b5d48…
2 files changed
+1
-1
+8
-5
+1
-1
| --- skins/darkmode/css.txt | ||
| +++ skins/darkmode/css.txt | ||
| @@ -132,11 +132,11 @@ | ||
| 132 | 132 | outline: 0 |
| 133 | 133 | } |
| 134 | 134 | button:disabled, |
| 135 | 135 | input[type=submit]:disabled { |
| 136 | 136 | color: #363636; |
| 137 | - background-color: #707070; | |
| 137 | + background-color: #a0a0a0; | |
| 138 | 138 | } |
| 139 | 139 | .button:focus, |
| 140 | 140 | button:focus, |
| 141 | 141 | input[type=button]:focus, |
| 142 | 142 | input[type=reset]:focus, |
| 143 | 143 |
| --- skins/darkmode/css.txt | |
| +++ skins/darkmode/css.txt | |
| @@ -132,11 +132,11 @@ | |
| 132 | outline: 0 |
| 133 | } |
| 134 | button:disabled, |
| 135 | input[type=submit]:disabled { |
| 136 | color: #363636; |
| 137 | background-color: #707070; |
| 138 | } |
| 139 | .button:focus, |
| 140 | button:focus, |
| 141 | input[type=button]:focus, |
| 142 | input[type=reset]:focus, |
| 143 |
| --- skins/darkmode/css.txt | |
| +++ skins/darkmode/css.txt | |
| @@ -132,11 +132,11 @@ | |
| 132 | outline: 0 |
| 133 | } |
| 134 | button:disabled, |
| 135 | input[type=submit]:disabled { |
| 136 | color: #363636; |
| 137 | background-color: #a0a0a0; |
| 138 | } |
| 139 | .button:focus, |
| 140 | button:focus, |
| 141 | input[type=button]:focus, |
| 142 | input[type=reset]:focus, |
| 143 |
+8
-5
| --- src/attach.c | ||
| +++ src/attach.c | ||
| @@ -57,23 +57,24 @@ | ||
| 57 | 57 | db_reset(&q); |
| 58 | 58 | return rc; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /* |
| 62 | -** For a given aritfact ID and type, returns true if the current user | |
| 63 | -** could hypothetically attach something to it, else returns 0. | |
| 62 | +** For a given aritfact ID and type (from the CFTYPE_xyz enum), | |
| 63 | +** returns true if the current user could hypothetically attach | |
| 64 | +** something to it, else returns 0. | |
| 64 | 65 | ** |
| 65 | -** The rid is currently only relevant when iArtifactType is | |
| 66 | +** The rid is currently only relevant when eArtifactType is | |
| 66 | 67 | ** CFTYPE_FORUM. For forum posts, it checks precisely the rid given, |
| 67 | 68 | ** not the head RID, to keep non-admins from attaching files to |
| 68 | 69 | ** threads which have since been taken over by another user (this |
| 69 | 70 | ** happens when an admin edits another user's post). |
| 70 | 71 | */ |
| 71 | -int attach_user_may(int rid, int iArtifactType){ | |
| 72 | +int attach_user_may(int rid, int eArtifactType){ | |
| 72 | 73 | if( g.perm.Admin ) return 1; |
| 73 | 74 | if( !login_is_individual() ) return 0; |
| 74 | - switch(iArtifactType){ | |
| 75 | + switch(eArtifactType){ | |
| 75 | 76 | case CFTYPE_FORUM: |
| 76 | 77 | return forumpost_is_owner(rid, 0); |
| 77 | 78 | case CFTYPE_WIKI: |
| 78 | 79 | return g.perm.ApndWiki && g.perm.Attach; |
| 79 | 80 | case CFTYPE_TICKET: |
| @@ -88,10 +89,12 @@ | ||
| 88 | 89 | /* |
| 89 | 90 | ** Emits a single-button FORM which invokes |
| 90 | 91 | ** /attachadd?target=$zTarget. |
| 91 | 92 | */ |
| 92 | 93 | void attach_render_attachadd_button(const char *zTarget){ |
| 94 | + /* This could be changed from POST to GET, and arguably should so | |
| 95 | + ** that the target=X part becomes part of the resulting URL. */ | |
| 93 | 96 | @ <form method="post" action="%R/attachadd">\ |
| 94 | 97 | @ <input type="hidden" name="target" value="%T(zTarget)">\ |
| 95 | 98 | @ <input type="submit" value="Attach..."> |
| 96 | 99 | @ </form>\ |
| 97 | 100 | } |
| 98 | 101 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -57,23 +57,24 @@ | |
| 57 | db_reset(&q); |
| 58 | return rc; |
| 59 | } |
| 60 | |
| 61 | /* |
| 62 | ** For a given aritfact ID and type, returns true if the current user |
| 63 | ** could hypothetically attach something to it, else returns 0. |
| 64 | ** |
| 65 | ** The rid is currently only relevant when iArtifactType is |
| 66 | ** CFTYPE_FORUM. For forum posts, it checks precisely the rid given, |
| 67 | ** not the head RID, to keep non-admins from attaching files to |
| 68 | ** threads which have since been taken over by another user (this |
| 69 | ** happens when an admin edits another user's post). |
| 70 | */ |
| 71 | int attach_user_may(int rid, int iArtifactType){ |
| 72 | if( g.perm.Admin ) return 1; |
| 73 | if( !login_is_individual() ) return 0; |
| 74 | switch(iArtifactType){ |
| 75 | case CFTYPE_FORUM: |
| 76 | return forumpost_is_owner(rid, 0); |
| 77 | case CFTYPE_WIKI: |
| 78 | return g.perm.ApndWiki && g.perm.Attach; |
| 79 | case CFTYPE_TICKET: |
| @@ -88,10 +89,12 @@ | |
| 88 | /* |
| 89 | ** Emits a single-button FORM which invokes |
| 90 | ** /attachadd?target=$zTarget. |
| 91 | */ |
| 92 | void attach_render_attachadd_button(const char *zTarget){ |
| 93 | @ <form method="post" action="%R/attachadd">\ |
| 94 | @ <input type="hidden" name="target" value="%T(zTarget)">\ |
| 95 | @ <input type="submit" value="Attach..."> |
| 96 | @ </form>\ |
| 97 | } |
| 98 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -57,23 +57,24 @@ | |
| 57 | db_reset(&q); |
| 58 | return rc; |
| 59 | } |
| 60 | |
| 61 | /* |
| 62 | ** For a given aritfact ID and type (from the CFTYPE_xyz enum), |
| 63 | ** returns true if the current user could hypothetically attach |
| 64 | ** something to it, else returns 0. |
| 65 | ** |
| 66 | ** The rid is currently only relevant when eArtifactType is |
| 67 | ** CFTYPE_FORUM. For forum posts, it checks precisely the rid given, |
| 68 | ** not the head RID, to keep non-admins from attaching files to |
| 69 | ** threads which have since been taken over by another user (this |
| 70 | ** happens when an admin edits another user's post). |
| 71 | */ |
| 72 | int attach_user_may(int rid, int eArtifactType){ |
| 73 | if( g.perm.Admin ) return 1; |
| 74 | if( !login_is_individual() ) return 0; |
| 75 | switch(eArtifactType){ |
| 76 | case CFTYPE_FORUM: |
| 77 | return forumpost_is_owner(rid, 0); |
| 78 | case CFTYPE_WIKI: |
| 79 | return g.perm.ApndWiki && g.perm.Attach; |
| 80 | case CFTYPE_TICKET: |
| @@ -88,10 +89,12 @@ | |
| 89 | /* |
| 90 | ** Emits a single-button FORM which invokes |
| 91 | ** /attachadd?target=$zTarget. |
| 92 | */ |
| 93 | void attach_render_attachadd_button(const char *zTarget){ |
| 94 | /* This could be changed from POST to GET, and arguably should so |
| 95 | ** that the target=X part becomes part of the resulting URL. */ |
| 96 | @ <form method="post" action="%R/attachadd">\ |
| 97 | @ <input type="hidden" name="target" value="%T(zTarget)">\ |
| 98 | @ <input type="submit" value="Attach..."> |
| 99 | @ </form>\ |
| 100 | } |
| 101 |