Fossil SCM
Merge all changes from the wolfgangFormat2CSS_2 branch into the trunk.
Commit
5a48a9b27bcf0bc3f1f2f9198dc84d7194fa7e2d
Parent
1a0086249bbc7cc…
20 files changed
+1
-3
+22
-22
+13
-5
+3
+28
-11
+32
-12
+2
-2
+44
-24
+4
-4
+126
-27
+25
-25
+6
-6
+6
-6
+1
-1
+89
-9
+2
-2
+1
-1
+1
-1
+6
-6
+81
+1
-3
| --- src/add.c | ||
| +++ src/add.c | ||
| @@ -36,20 +36,18 @@ | ||
| 36 | 36 | Blob pathname; |
| 37 | 37 | const char *zPath; |
| 38 | 38 | |
| 39 | 39 | file_tree_name(zName, &pathname, 1); |
| 40 | 40 | zPath = blob_str(&pathname); |
| 41 | - if( strcmp(zPath, "manifest")==0 | |
| 42 | - || strcmp(zPath, "_FOSSIL_")==0 | |
| 41 | + if( strcmp(zPath, "_FOSSIL_")==0 | |
| 43 | 42 | || strcmp(zPath, "_FOSSIL_-journal")==0 |
| 44 | 43 | || strcmp(zPath, "_FOSSIL_-wal")==0 |
| 45 | 44 | || strcmp(zPath, "_FOSSIL_-shm")==0 |
| 46 | 45 | || strcmp(zPath, ".fos")==0 |
| 47 | 46 | || strcmp(zPath, ".fos-journal")==0 |
| 48 | 47 | || strcmp(zPath, ".fos-wal")==0 |
| 49 | 48 | || strcmp(zPath, ".fos-shm")==0 |
| 50 | - || strcmp(zPath, "manifest.uuid")==0 | |
| 51 | 49 | || blob_compare(&pathname, pOmit)==0 |
| 52 | 50 | ){ |
| 53 | 51 | fossil_warning("cannot add %s", zPath); |
| 54 | 52 | }else{ |
| 55 | 53 | if( !file_is_simple_pathname(zPath) ){ |
| 56 | 54 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -36,20 +36,18 @@ | |
| 36 | Blob pathname; |
| 37 | const char *zPath; |
| 38 | |
| 39 | file_tree_name(zName, &pathname, 1); |
| 40 | zPath = blob_str(&pathname); |
| 41 | if( strcmp(zPath, "manifest")==0 |
| 42 | || strcmp(zPath, "_FOSSIL_")==0 |
| 43 | || strcmp(zPath, "_FOSSIL_-journal")==0 |
| 44 | || strcmp(zPath, "_FOSSIL_-wal")==0 |
| 45 | || strcmp(zPath, "_FOSSIL_-shm")==0 |
| 46 | || strcmp(zPath, ".fos")==0 |
| 47 | || strcmp(zPath, ".fos-journal")==0 |
| 48 | || strcmp(zPath, ".fos-wal")==0 |
| 49 | || strcmp(zPath, ".fos-shm")==0 |
| 50 | || strcmp(zPath, "manifest.uuid")==0 |
| 51 | || blob_compare(&pathname, pOmit)==0 |
| 52 | ){ |
| 53 | fossil_warning("cannot add %s", zPath); |
| 54 | }else{ |
| 55 | if( !file_is_simple_pathname(zPath) ){ |
| 56 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -36,20 +36,18 @@ | |
| 36 | Blob pathname; |
| 37 | const char *zPath; |
| 38 | |
| 39 | file_tree_name(zName, &pathname, 1); |
| 40 | zPath = blob_str(&pathname); |
| 41 | if( strcmp(zPath, "_FOSSIL_")==0 |
| 42 | || strcmp(zPath, "_FOSSIL_-journal")==0 |
| 43 | || strcmp(zPath, "_FOSSIL_-wal")==0 |
| 44 | || strcmp(zPath, "_FOSSIL_-shm")==0 |
| 45 | || strcmp(zPath, ".fos")==0 |
| 46 | || strcmp(zPath, ".fos-journal")==0 |
| 47 | || strcmp(zPath, ".fos-wal")==0 |
| 48 | || strcmp(zPath, ".fos-shm")==0 |
| 49 | || blob_compare(&pathname, pOmit)==0 |
| 50 | ){ |
| 51 | fossil_warning("cannot add %s", zPath); |
| 52 | }else{ |
| 53 | if( !file_is_simple_pathname(zPath) ){ |
| 54 |
+22
-22
| --- src/attach.c | ||
| +++ src/attach.c | ||
| @@ -270,25 +270,25 @@ | ||
| 270 | 270 | db_end_transaction(0); |
| 271 | 271 | cgi_redirect(zFrom); |
| 272 | 272 | } |
| 273 | 273 | style_header("Add Attachment"); |
| 274 | 274 | @ <h2>Add Attachment To %s(zTargetType)</h2> |
| 275 | - @ <form action="%s(g.zBaseURL)/attachadd" method="POST" | |
| 276 | - @ enctype="multipart/form-data"> | |
| 275 | + @ <form action="%s(g.zBaseURL)/attachadd" method="post" | |
| 276 | + @ enctype="multipart/form-data"><div> | |
| 277 | 277 | @ File to Attach: |
| 278 | - @ <input type="file" name="f" size="60"><br /> | |
| 278 | + @ <input type="file" name="f" size="60" /><br /> | |
| 279 | 279 | @ Description:<br /> |
| 280 | - @ <textarea name="comment" cols=80 rows=5 wrap="virtual"></textarea><br /> | |
| 280 | + @ <textarea name="comment" cols="80" rows="5" wrap="virtual"></textarea><br /> | |
| 281 | 281 | if( zTkt ){ |
| 282 | - @ <input type="hidden" name="tkt" value="%h(zTkt)"> | |
| 283 | - }else{ | |
| 284 | - @ <input type="hidden" name="page" value="%h(zPage)"> | |
| 285 | - } | |
| 286 | - @ <input type="hidden" name="from" value="%h(zFrom)"> | |
| 287 | - @ <input type="submit" name="ok" value="Add Attachment"> | |
| 288 | - @ <input type="submit" name="cancel" value="Cancel"> | |
| 289 | - @ </form> | |
| 282 | + @ <input type="hidden" name="tkt" value="%h(zTkt)" /> | |
| 283 | + }else{ | |
| 284 | + @ <input type="hidden" name="page" value="%h(zPage)" /> | |
| 285 | + } | |
| 286 | + @ <input type="hidden" name="from" value="%h(zFrom)" /> | |
| 287 | + @ <input type="submit" name="ok" value="Add Attachment" /> | |
| 288 | + @ <input type="submit" name="cancel" value="Cancel" /> | |
| 289 | + @ </div></form> | |
| 290 | 290 | style_footer(); |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | |
| 294 | 294 | /* |
| @@ -349,21 +349,21 @@ | ||
| 349 | 349 | manifest_crosslink(rid, &manifest); |
| 350 | 350 | db_end_transaction(0); |
| 351 | 351 | cgi_redirect(zFrom); |
| 352 | 352 | } |
| 353 | 353 | style_header("Delete Attachment"); |
| 354 | - @ <form action="%s(g.zBaseURL)/attachdelete" method="POST"> | |
| 354 | + @ <form action="%s(g.zBaseURL)/attachdelete" method="post"><div> | |
| 355 | 355 | @ <p>Confirm that you want to delete the attachment named |
| 356 | 356 | @ "%h(zFile)" on %s(zTkt?"ticket":"wiki page") %h(zTarget):<br /> |
| 357 | 357 | if( zTkt ){ |
| 358 | - @ <input type="hidden" name="tkt" value="%h(zTkt)"> | |
| 359 | - }else{ | |
| 360 | - @ <input type="hidden" name="page" value="%h(zPage)"> | |
| 361 | - } | |
| 362 | - @ <input type="hidden" name="file" value="%h(zFile)"> | |
| 363 | - @ <input type="hidden" name="from" value="%h(zFrom)"> | |
| 364 | - @ <input type="submit" name="confirm" value="Delete"> | |
| 365 | - @ <input type="submit" name="cancel" value="Cancel"> | |
| 366 | - @ </form> | |
| 358 | + @ <input type="hidden" name="tkt" value="%h(zTkt)" /> | |
| 359 | + }else{ | |
| 360 | + @ <input type="hidden" name="page" value="%h(zPage)" /> | |
| 361 | + } | |
| 362 | + @ <input type="hidden" name="file" value="%h(zFile)" /> | |
| 363 | + @ <input type="hidden" name="from" value="%h(zFrom)" /> | |
| 364 | + @ <input type="submit" name="confirm" value="Delete" /> | |
| 365 | + @ <input type="submit" name="cancel" value="Cancel" /> | |
| 366 | + @ </div></form> | |
| 367 | 367 | style_footer(); |
| 368 | 368 | |
| 369 | 369 | } |
| 370 | 370 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -270,25 +270,25 @@ | |
| 270 | db_end_transaction(0); |
| 271 | cgi_redirect(zFrom); |
| 272 | } |
| 273 | style_header("Add Attachment"); |
| 274 | @ <h2>Add Attachment To %s(zTargetType)</h2> |
| 275 | @ <form action="%s(g.zBaseURL)/attachadd" method="POST" |
| 276 | @ enctype="multipart/form-data"> |
| 277 | @ File to Attach: |
| 278 | @ <input type="file" name="f" size="60"><br /> |
| 279 | @ Description:<br /> |
| 280 | @ <textarea name="comment" cols=80 rows=5 wrap="virtual"></textarea><br /> |
| 281 | if( zTkt ){ |
| 282 | @ <input type="hidden" name="tkt" value="%h(zTkt)"> |
| 283 | }else{ |
| 284 | @ <input type="hidden" name="page" value="%h(zPage)"> |
| 285 | } |
| 286 | @ <input type="hidden" name="from" value="%h(zFrom)"> |
| 287 | @ <input type="submit" name="ok" value="Add Attachment"> |
| 288 | @ <input type="submit" name="cancel" value="Cancel"> |
| 289 | @ </form> |
| 290 | style_footer(); |
| 291 | } |
| 292 | |
| 293 | |
| 294 | /* |
| @@ -349,21 +349,21 @@ | |
| 349 | manifest_crosslink(rid, &manifest); |
| 350 | db_end_transaction(0); |
| 351 | cgi_redirect(zFrom); |
| 352 | } |
| 353 | style_header("Delete Attachment"); |
| 354 | @ <form action="%s(g.zBaseURL)/attachdelete" method="POST"> |
| 355 | @ <p>Confirm that you want to delete the attachment named |
| 356 | @ "%h(zFile)" on %s(zTkt?"ticket":"wiki page") %h(zTarget):<br /> |
| 357 | if( zTkt ){ |
| 358 | @ <input type="hidden" name="tkt" value="%h(zTkt)"> |
| 359 | }else{ |
| 360 | @ <input type="hidden" name="page" value="%h(zPage)"> |
| 361 | } |
| 362 | @ <input type="hidden" name="file" value="%h(zFile)"> |
| 363 | @ <input type="hidden" name="from" value="%h(zFrom)"> |
| 364 | @ <input type="submit" name="confirm" value="Delete"> |
| 365 | @ <input type="submit" name="cancel" value="Cancel"> |
| 366 | @ </form> |
| 367 | style_footer(); |
| 368 | |
| 369 | } |
| 370 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -270,25 +270,25 @@ | |
| 270 | db_end_transaction(0); |
| 271 | cgi_redirect(zFrom); |
| 272 | } |
| 273 | style_header("Add Attachment"); |
| 274 | @ <h2>Add Attachment To %s(zTargetType)</h2> |
| 275 | @ <form action="%s(g.zBaseURL)/attachadd" method="post" |
| 276 | @ enctype="multipart/form-data"><div> |
| 277 | @ File to Attach: |
| 278 | @ <input type="file" name="f" size="60" /><br /> |
| 279 | @ Description:<br /> |
| 280 | @ <textarea name="comment" cols="80" rows="5" wrap="virtual"></textarea><br /> |
| 281 | if( zTkt ){ |
| 282 | @ <input type="hidden" name="tkt" value="%h(zTkt)" /> |
| 283 | }else{ |
| 284 | @ <input type="hidden" name="page" value="%h(zPage)" /> |
| 285 | } |
| 286 | @ <input type="hidden" name="from" value="%h(zFrom)" /> |
| 287 | @ <input type="submit" name="ok" value="Add Attachment" /> |
| 288 | @ <input type="submit" name="cancel" value="Cancel" /> |
| 289 | @ </div></form> |
| 290 | style_footer(); |
| 291 | } |
| 292 | |
| 293 | |
| 294 | /* |
| @@ -349,21 +349,21 @@ | |
| 349 | manifest_crosslink(rid, &manifest); |
| 350 | db_end_transaction(0); |
| 351 | cgi_redirect(zFrom); |
| 352 | } |
| 353 | style_header("Delete Attachment"); |
| 354 | @ <form action="%s(g.zBaseURL)/attachdelete" method="post"><div> |
| 355 | @ <p>Confirm that you want to delete the attachment named |
| 356 | @ "%h(zFile)" on %s(zTkt?"ticket":"wiki page") %h(zTarget):<br /> |
| 357 | if( zTkt ){ |
| 358 | @ <input type="hidden" name="tkt" value="%h(zTkt)" /> |
| 359 | }else{ |
| 360 | @ <input type="hidden" name="page" value="%h(zPage)" /> |
| 361 | } |
| 362 | @ <input type="hidden" name="file" value="%h(zFile)" /> |
| 363 | @ <input type="hidden" name="from" value="%h(zFrom)" /> |
| 364 | @ <input type="submit" name="confirm" value="Delete" /> |
| 365 | @ <input type="submit" name="cancel" value="Cancel" /> |
| 366 | @ </div></form> |
| 367 | style_footer(); |
| 368 | |
| 369 | } |
| 370 |
+13
-5
| --- src/browse.c | ||
| +++ src/browse.c | ||
| @@ -106,10 +106,11 @@ | ||
| 106 | 106 | int cnt, i; |
| 107 | 107 | char *zPrefix; |
| 108 | 108 | Stmt q; |
| 109 | 109 | const char *zCI = P("ci"); |
| 110 | 110 | int rid = 0; |
| 111 | + char *zUuid = 0; | |
| 111 | 112 | Blob content; |
| 112 | 113 | Blob dirname; |
| 113 | 114 | Manifest m; |
| 114 | 115 | const char *zSubdirLink; |
| 115 | 116 | |
| @@ -120,16 +121,24 @@ | ||
| 120 | 121 | pathelementFunc, 0, 0); |
| 121 | 122 | |
| 122 | 123 | /* If the name= parameter is an empty string, make it a NULL pointer */ |
| 123 | 124 | if( zD && strlen(zD)==0 ){ zD = 0; } |
| 124 | 125 | |
| 125 | - /* If a specific check-in is requested, fetch and parse it. */ | |
| 126 | - if( zCI && (rid = name_to_rid(zCI))!=0 && content_get(rid, &content) ){ | |
| 127 | - if( !manifest_parse(&m, &content) || m.type!=CFTYPE_MANIFEST ){ | |
| 128 | - zCI = 0; | |
| 126 | + /* If a specific check-in is requested, fetch and parse it. If the | |
| 127 | + ** specific check-in does not exist, clear zCI. zCI==0 will cause all | |
| 128 | + ** files from all check-ins to be displayed. | |
| 129 | + */ | |
| 130 | + if( zCI ){ | |
| 131 | + if( (rid = name_to_rid(zCI))==0 || content_get(rid, &content)==0 ){ | |
| 132 | + zCI = 0; /* No artifact named zCI exists */ | |
| 133 | + }else if( !manifest_parse(&m, &content) || m.type!=CFTYPE_MANIFEST ){ | |
| 134 | + zCI = 0; /* The artifact exists but is not a manifest */ | |
| 135 | + }else{ | |
| 136 | + zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); | |
| 129 | 137 | } |
| 130 | 138 | } |
| 139 | + | |
| 131 | 140 | |
| 132 | 141 | /* Compute the title of the page */ |
| 133 | 142 | blob_zero(&dirname); |
| 134 | 143 | if( zD ){ |
| 135 | 144 | blob_append(&dirname, "in directory ", -1); |
| @@ -138,11 +147,10 @@ | ||
| 138 | 147 | }else{ |
| 139 | 148 | blob_append(&dirname, "in the top-level directory", -1); |
| 140 | 149 | zPrefix = ""; |
| 141 | 150 | } |
| 142 | 151 | if( zCI ){ |
| 143 | - char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); | |
| 144 | 152 | char zShort[20]; |
| 145 | 153 | memcpy(zShort, zUuid, 10); |
| 146 | 154 | zShort[10] = 0; |
| 147 | 155 | @ <h2>Files of check-in [<a href="vinfo?name=%T(zUuid)">%s(zShort)</a>] |
| 148 | 156 | @ %s(blob_str(&dirname))</h2> |
| 149 | 157 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -106,10 +106,11 @@ | |
| 106 | int cnt, i; |
| 107 | char *zPrefix; |
| 108 | Stmt q; |
| 109 | const char *zCI = P("ci"); |
| 110 | int rid = 0; |
| 111 | Blob content; |
| 112 | Blob dirname; |
| 113 | Manifest m; |
| 114 | const char *zSubdirLink; |
| 115 | |
| @@ -120,16 +121,24 @@ | |
| 120 | pathelementFunc, 0, 0); |
| 121 | |
| 122 | /* If the name= parameter is an empty string, make it a NULL pointer */ |
| 123 | if( zD && strlen(zD)==0 ){ zD = 0; } |
| 124 | |
| 125 | /* If a specific check-in is requested, fetch and parse it. */ |
| 126 | if( zCI && (rid = name_to_rid(zCI))!=0 && content_get(rid, &content) ){ |
| 127 | if( !manifest_parse(&m, &content) || m.type!=CFTYPE_MANIFEST ){ |
| 128 | zCI = 0; |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | /* Compute the title of the page */ |
| 133 | blob_zero(&dirname); |
| 134 | if( zD ){ |
| 135 | blob_append(&dirname, "in directory ", -1); |
| @@ -138,11 +147,10 @@ | |
| 138 | }else{ |
| 139 | blob_append(&dirname, "in the top-level directory", -1); |
| 140 | zPrefix = ""; |
| 141 | } |
| 142 | if( zCI ){ |
| 143 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 144 | char zShort[20]; |
| 145 | memcpy(zShort, zUuid, 10); |
| 146 | zShort[10] = 0; |
| 147 | @ <h2>Files of check-in [<a href="vinfo?name=%T(zUuid)">%s(zShort)</a>] |
| 148 | @ %s(blob_str(&dirname))</h2> |
| 149 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -106,10 +106,11 @@ | |
| 106 | int cnt, i; |
| 107 | char *zPrefix; |
| 108 | Stmt q; |
| 109 | const char *zCI = P("ci"); |
| 110 | int rid = 0; |
| 111 | char *zUuid = 0; |
| 112 | Blob content; |
| 113 | Blob dirname; |
| 114 | Manifest m; |
| 115 | const char *zSubdirLink; |
| 116 | |
| @@ -120,16 +121,24 @@ | |
| 121 | pathelementFunc, 0, 0); |
| 122 | |
| 123 | /* If the name= parameter is an empty string, make it a NULL pointer */ |
| 124 | if( zD && strlen(zD)==0 ){ zD = 0; } |
| 125 | |
| 126 | /* If a specific check-in is requested, fetch and parse it. If the |
| 127 | ** specific check-in does not exist, clear zCI. zCI==0 will cause all |
| 128 | ** files from all check-ins to be displayed. |
| 129 | */ |
| 130 | if( zCI ){ |
| 131 | if( (rid = name_to_rid(zCI))==0 || content_get(rid, &content)==0 ){ |
| 132 | zCI = 0; /* No artifact named zCI exists */ |
| 133 | }else if( !manifest_parse(&m, &content) || m.type!=CFTYPE_MANIFEST ){ |
| 134 | zCI = 0; /* The artifact exists but is not a manifest */ |
| 135 | }else{ |
| 136 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | |
| 141 | /* Compute the title of the page */ |
| 142 | blob_zero(&dirname); |
| 143 | if( zD ){ |
| 144 | blob_append(&dirname, "in directory ", -1); |
| @@ -138,11 +147,10 @@ | |
| 147 | }else{ |
| 148 | blob_append(&dirname, "in the top-level directory", -1); |
| 149 | zPrefix = ""; |
| 150 | } |
| 151 | if( zCI ){ |
| 152 | char zShort[20]; |
| 153 | memcpy(zShort, zUuid, 10); |
| 154 | zShort[10] = 0; |
| 155 | @ <h2>Files of check-in [<a href="vinfo?name=%T(zUuid)">%s(zShort)</a>] |
| 156 | @ %s(blob_str(&dirname))</h2> |
| 157 |
+3
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -42,10 +42,13 @@ | ||
| 42 | 42 | #endif |
| 43 | 43 | #include <time.h> |
| 44 | 44 | #include <stdio.h> |
| 45 | 45 | #include <stdlib.h> |
| 46 | 46 | #include <unistd.h> |
| 47 | +#if defined (__POCC__) | |
| 48 | +# undef INTERFACE | |
| 49 | +#endif | |
| 47 | 50 | #include "cgi.h" |
| 48 | 51 | |
| 49 | 52 | #if INTERFACE |
| 50 | 53 | /* |
| 51 | 54 | ** Shortcuts for cgi_parameter. P("x") returns the value of query parameter |
| 52 | 55 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -42,10 +42,13 @@ | |
| 42 | #endif |
| 43 | #include <time.h> |
| 44 | #include <stdio.h> |
| 45 | #include <stdlib.h> |
| 46 | #include <unistd.h> |
| 47 | #include "cgi.h" |
| 48 | |
| 49 | #if INTERFACE |
| 50 | /* |
| 51 | ** Shortcuts for cgi_parameter. P("x") returns the value of query parameter |
| 52 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -42,10 +42,13 @@ | |
| 42 | #endif |
| 43 | #include <time.h> |
| 44 | #include <stdio.h> |
| 45 | #include <stdlib.h> |
| 46 | #include <unistd.h> |
| 47 | #if defined (__POCC__) |
| 48 | # undef INTERFACE |
| 49 | #endif |
| 50 | #include "cgi.h" |
| 51 | |
| 52 | #if INTERFACE |
| 53 | /* |
| 54 | ** Shortcuts for cgi_parameter. P("x") returns the value of query parameter |
| 55 |
+28
-11
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -535,10 +535,23 @@ | ||
| 535 | 535 | assert( strlen(zDate)==19 ); |
| 536 | 536 | assert( zDate[10]==' ' ); |
| 537 | 537 | zDate[10] = 'T'; |
| 538 | 538 | return zDate; |
| 539 | 539 | } |
| 540 | + | |
| 541 | +/* | |
| 542 | +** Return TRUE (non-zero) if a file named "zFilename" exists in | |
| 543 | +** the checkout identified by vid. | |
| 544 | +** | |
| 545 | +** The original purpose of this routine was to check for the presence of | |
| 546 | +** a "checked-in" file named "manifest" or "manifest.uuid" so as to avoid | |
| 547 | +** overwriting that file with automatically generated files. | |
| 548 | +*/ | |
| 549 | +int file_exists_in_checkout(int vid, const char *zFilename){ | |
| 550 | + return db_exists("SELECT 1 FROM vfile WHERE vid=%d AND pathname=%Q", | |
| 551 | + vid, zFilename); | |
| 552 | +} | |
| 540 | 553 | |
| 541 | 554 | /* |
| 542 | 555 | ** COMMAND: ci |
| 543 | 556 | ** COMMAND: commit |
| 544 | 557 | ** |
| @@ -844,38 +857,42 @@ | ||
| 844 | 857 | db_finalize(&q); |
| 845 | 858 | } |
| 846 | 859 | blob_appendf(&manifest, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin); |
| 847 | 860 | md5sum_blob(&manifest, &mcksum); |
| 848 | 861 | blob_appendf(&manifest, "Z %b\n", &mcksum); |
| 849 | - zManifestFile = mprintf("%smanifest", g.zLocalRoot); | |
| 850 | 862 | if( !noSign && !g.markPrivate && clearsign(&manifest, &manifest) ){ |
| 851 | 863 | Blob ans; |
| 852 | 864 | blob_zero(&ans); |
| 853 | 865 | prompt_user("unable to sign manifest. continue (y/N)? ", &ans); |
| 854 | 866 | if( blob_str(&ans)[0]!='y' ){ |
| 855 | 867 | fossil_exit(1); |
| 856 | 868 | } |
| 857 | 869 | } |
| 858 | - blob_write_to_file(&manifest, zManifestFile); | |
| 859 | - blob_reset(&manifest); | |
| 860 | - blob_read_from_file(&manifest, zManifestFile); | |
| 861 | - free(zManifestFile); | |
| 870 | + if( !file_exists_in_checkout(vid, "manifest") ){ | |
| 871 | + zManifestFile = mprintf("%smanifest", g.zLocalRoot); | |
| 872 | + blob_write_to_file(&manifest, zManifestFile); | |
| 873 | + blob_reset(&manifest); | |
| 874 | + blob_read_from_file(&manifest, zManifestFile); | |
| 875 | + free(zManifestFile); | |
| 876 | + } | |
| 862 | 877 | nvid = content_put(&manifest, 0, 0); |
| 863 | 878 | if( nvid==0 ){ |
| 864 | 879 | fossil_panic("trouble committing manifest: %s", g.zErrMsg); |
| 865 | 880 | } |
| 866 | 881 | db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid); |
| 867 | 882 | manifest_crosslink(nvid, &manifest); |
| 868 | 883 | content_deltify(vid, nvid, 0); |
| 869 | 884 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid); |
| 870 | 885 | printf("New_Version: %s\n", zUuid); |
| 871 | - zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot); | |
| 872 | - blob_zero(&muuid); | |
| 873 | - blob_appendf(&muuid, "%s\n", zUuid); | |
| 874 | - blob_write_to_file(&muuid, zManifestFile); | |
| 875 | - free(zManifestFile); | |
| 876 | - blob_reset(&muuid); | |
| 886 | + if( !file_exists_in_checkout(vid, "manifest.uuid") ){ | |
| 887 | + zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot); | |
| 888 | + blob_zero(&muuid); | |
| 889 | + blob_appendf(&muuid, "%s\n", zUuid); | |
| 890 | + blob_write_to_file(&muuid, zManifestFile); | |
| 891 | + free(zManifestFile); | |
| 892 | + blob_reset(&muuid); | |
| 893 | + } | |
| 877 | 894 | |
| 878 | 895 | |
| 879 | 896 | /* Update the vfile and vmerge tables */ |
| 880 | 897 | db_multi_exec( |
| 881 | 898 | "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);" |
| 882 | 899 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -535,10 +535,23 @@ | |
| 535 | assert( strlen(zDate)==19 ); |
| 536 | assert( zDate[10]==' ' ); |
| 537 | zDate[10] = 'T'; |
| 538 | return zDate; |
| 539 | } |
| 540 | |
| 541 | /* |
| 542 | ** COMMAND: ci |
| 543 | ** COMMAND: commit |
| 544 | ** |
| @@ -844,38 +857,42 @@ | |
| 844 | db_finalize(&q); |
| 845 | } |
| 846 | blob_appendf(&manifest, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin); |
| 847 | md5sum_blob(&manifest, &mcksum); |
| 848 | blob_appendf(&manifest, "Z %b\n", &mcksum); |
| 849 | zManifestFile = mprintf("%smanifest", g.zLocalRoot); |
| 850 | if( !noSign && !g.markPrivate && clearsign(&manifest, &manifest) ){ |
| 851 | Blob ans; |
| 852 | blob_zero(&ans); |
| 853 | prompt_user("unable to sign manifest. continue (y/N)? ", &ans); |
| 854 | if( blob_str(&ans)[0]!='y' ){ |
| 855 | fossil_exit(1); |
| 856 | } |
| 857 | } |
| 858 | blob_write_to_file(&manifest, zManifestFile); |
| 859 | blob_reset(&manifest); |
| 860 | blob_read_from_file(&manifest, zManifestFile); |
| 861 | free(zManifestFile); |
| 862 | nvid = content_put(&manifest, 0, 0); |
| 863 | if( nvid==0 ){ |
| 864 | fossil_panic("trouble committing manifest: %s", g.zErrMsg); |
| 865 | } |
| 866 | db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid); |
| 867 | manifest_crosslink(nvid, &manifest); |
| 868 | content_deltify(vid, nvid, 0); |
| 869 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid); |
| 870 | printf("New_Version: %s\n", zUuid); |
| 871 | zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot); |
| 872 | blob_zero(&muuid); |
| 873 | blob_appendf(&muuid, "%s\n", zUuid); |
| 874 | blob_write_to_file(&muuid, zManifestFile); |
| 875 | free(zManifestFile); |
| 876 | blob_reset(&muuid); |
| 877 | |
| 878 | |
| 879 | /* Update the vfile and vmerge tables */ |
| 880 | db_multi_exec( |
| 881 | "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);" |
| 882 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -535,10 +535,23 @@ | |
| 535 | assert( strlen(zDate)==19 ); |
| 536 | assert( zDate[10]==' ' ); |
| 537 | zDate[10] = 'T'; |
| 538 | return zDate; |
| 539 | } |
| 540 | |
| 541 | /* |
| 542 | ** Return TRUE (non-zero) if a file named "zFilename" exists in |
| 543 | ** the checkout identified by vid. |
| 544 | ** |
| 545 | ** The original purpose of this routine was to check for the presence of |
| 546 | ** a "checked-in" file named "manifest" or "manifest.uuid" so as to avoid |
| 547 | ** overwriting that file with automatically generated files. |
| 548 | */ |
| 549 | int file_exists_in_checkout(int vid, const char *zFilename){ |
| 550 | return db_exists("SELECT 1 FROM vfile WHERE vid=%d AND pathname=%Q", |
| 551 | vid, zFilename); |
| 552 | } |
| 553 | |
| 554 | /* |
| 555 | ** COMMAND: ci |
| 556 | ** COMMAND: commit |
| 557 | ** |
| @@ -844,38 +857,42 @@ | |
| 857 | db_finalize(&q); |
| 858 | } |
| 859 | blob_appendf(&manifest, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin); |
| 860 | md5sum_blob(&manifest, &mcksum); |
| 861 | blob_appendf(&manifest, "Z %b\n", &mcksum); |
| 862 | if( !noSign && !g.markPrivate && clearsign(&manifest, &manifest) ){ |
| 863 | Blob ans; |
| 864 | blob_zero(&ans); |
| 865 | prompt_user("unable to sign manifest. continue (y/N)? ", &ans); |
| 866 | if( blob_str(&ans)[0]!='y' ){ |
| 867 | fossil_exit(1); |
| 868 | } |
| 869 | } |
| 870 | if( !file_exists_in_checkout(vid, "manifest") ){ |
| 871 | zManifestFile = mprintf("%smanifest", g.zLocalRoot); |
| 872 | blob_write_to_file(&manifest, zManifestFile); |
| 873 | blob_reset(&manifest); |
| 874 | blob_read_from_file(&manifest, zManifestFile); |
| 875 | free(zManifestFile); |
| 876 | } |
| 877 | nvid = content_put(&manifest, 0, 0); |
| 878 | if( nvid==0 ){ |
| 879 | fossil_panic("trouble committing manifest: %s", g.zErrMsg); |
| 880 | } |
| 881 | db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid); |
| 882 | manifest_crosslink(nvid, &manifest); |
| 883 | content_deltify(vid, nvid, 0); |
| 884 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid); |
| 885 | printf("New_Version: %s\n", zUuid); |
| 886 | if( !file_exists_in_checkout(vid, "manifest.uuid") ){ |
| 887 | zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot); |
| 888 | blob_zero(&muuid); |
| 889 | blob_appendf(&muuid, "%s\n", zUuid); |
| 890 | blob_write_to_file(&muuid, zManifestFile); |
| 891 | free(zManifestFile); |
| 892 | blob_reset(&muuid); |
| 893 | } |
| 894 | |
| 895 | |
| 896 | /* Update the vfile and vmerge tables */ |
| 897 | db_multi_exec( |
| 898 | "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND file_is_selected(id);" |
| 899 |
+32
-12
| --- src/checkout.c | ||
| +++ src/checkout.c | ||
| @@ -97,34 +97,33 @@ | ||
| 97 | 97 | db_multi_exec("UPDATE vfile SET isexe=%d WHERE vid=%d and pathname=%Q", |
| 98 | 98 | onoff, vid, zFilename); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /* |
| 102 | -** Read the manifest file given by vid out of the repository | |
| 103 | -** and store it in the root of the local check-out. | |
| 102 | +** Set or clear the execute permission bit (as appropriate) for all | |
| 103 | +** files in the current check-out. | |
| 104 | +** | |
| 105 | +** If the checkout does not have explicit files named "manifest" and | |
| 106 | +** "manifest.uuid" then automatically generate files with those names | |
| 107 | +** containing, respectively, the text of the manifest and the artifact | |
| 108 | +** ID of the manifest. | |
| 104 | 109 | */ |
| 105 | 110 | void manifest_to_disk(int vid){ |
| 106 | 111 | char *zManFile; |
| 107 | 112 | Blob manifest; |
| 108 | 113 | Blob hash; |
| 109 | 114 | Blob filename; |
| 110 | 115 | int baseLen; |
| 111 | 116 | int i; |
| 117 | + int seenManifest = 0; | |
| 118 | + int seenManifestUuid = 0; | |
| 112 | 119 | Manifest m; |
| 113 | 120 | |
| 121 | + /* Check the EXE permission status of all files | |
| 122 | + */ | |
| 114 | 123 | blob_zero(&manifest); |
| 115 | - zManFile = mprintf("%smanifest", g.zLocalRoot); | |
| 116 | 124 | content_get(vid, &manifest); |
| 117 | - blob_write_to_file(&manifest, zManFile); | |
| 118 | - free(zManFile); | |
| 119 | - blob_zero(&hash); | |
| 120 | - sha1sum_blob(&manifest, &hash); | |
| 121 | - zManFile = mprintf("%smanifest.uuid", g.zLocalRoot); | |
| 122 | - blob_append(&hash, "\n", 1); | |
| 123 | - blob_write_to_file(&hash, zManFile); | |
| 124 | - free(zManFile); | |
| 125 | - blob_reset(&hash); | |
| 126 | 125 | manifest_parse(&m, &manifest); |
| 127 | 126 | blob_zero(&filename); |
| 128 | 127 | blob_appendf(&filename, "%s/", g.zLocalRoot); |
| 129 | 128 | baseLen = blob_size(&filename); |
| 130 | 129 | for(i=0; i<m.nFile; i++){ |
| @@ -132,13 +131,34 @@ | ||
| 132 | 131 | blob_append(&filename, m.aFile[i].zName, -1); |
| 133 | 132 | isExe = m.aFile[i].zPerm && strstr(m.aFile[i].zPerm, "x"); |
| 134 | 133 | file_setexe(blob_str(&filename), isExe); |
| 135 | 134 | set_or_clear_isexe(m.aFile[i].zName, vid, isExe); |
| 136 | 135 | blob_resize(&filename, baseLen); |
| 136 | + if( memcmp(m.aFile[i].zName, "manifest", 8)==0 ){ | |
| 137 | + if( m.aFile[i].zName[8]==0 ) seenManifest = 1; | |
| 138 | + if( strcmp(&m.aFile[i].zName[8], ".uuid")==0 ) seenManifestUuid = 1; | |
| 139 | + } | |
| 137 | 140 | } |
| 138 | 141 | blob_reset(&filename); |
| 139 | 142 | manifest_clear(&m); |
| 143 | + | |
| 144 | + blob_zero(&manifest); | |
| 145 | + content_get(vid, &manifest); | |
| 146 | + if( !seenManifest ){ | |
| 147 | + zManFile = mprintf("%smanifest", g.zLocalRoot); | |
| 148 | + blob_write_to_file(&manifest, zManFile); | |
| 149 | + free(zManFile); | |
| 150 | + } | |
| 151 | + if( !seenManifestUuid ){ | |
| 152 | + blob_zero(&hash); | |
| 153 | + sha1sum_blob(&manifest, &hash); | |
| 154 | + zManFile = mprintf("%smanifest.uuid", g.zLocalRoot); | |
| 155 | + blob_append(&hash, "\n", 1); | |
| 156 | + blob_write_to_file(&hash, zManFile); | |
| 157 | + free(zManFile); | |
| 158 | + blob_reset(&hash); | |
| 159 | + } | |
| 140 | 160 | } |
| 141 | 161 | |
| 142 | 162 | /* |
| 143 | 163 | ** COMMAND: checkout |
| 144 | 164 | ** COMMAND: co |
| 145 | 165 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -97,34 +97,33 @@ | |
| 97 | db_multi_exec("UPDATE vfile SET isexe=%d WHERE vid=%d and pathname=%Q", |
| 98 | onoff, vid, zFilename); |
| 99 | } |
| 100 | |
| 101 | /* |
| 102 | ** Read the manifest file given by vid out of the repository |
| 103 | ** and store it in the root of the local check-out. |
| 104 | */ |
| 105 | void manifest_to_disk(int vid){ |
| 106 | char *zManFile; |
| 107 | Blob manifest; |
| 108 | Blob hash; |
| 109 | Blob filename; |
| 110 | int baseLen; |
| 111 | int i; |
| 112 | Manifest m; |
| 113 | |
| 114 | blob_zero(&manifest); |
| 115 | zManFile = mprintf("%smanifest", g.zLocalRoot); |
| 116 | content_get(vid, &manifest); |
| 117 | blob_write_to_file(&manifest, zManFile); |
| 118 | free(zManFile); |
| 119 | blob_zero(&hash); |
| 120 | sha1sum_blob(&manifest, &hash); |
| 121 | zManFile = mprintf("%smanifest.uuid", g.zLocalRoot); |
| 122 | blob_append(&hash, "\n", 1); |
| 123 | blob_write_to_file(&hash, zManFile); |
| 124 | free(zManFile); |
| 125 | blob_reset(&hash); |
| 126 | manifest_parse(&m, &manifest); |
| 127 | blob_zero(&filename); |
| 128 | blob_appendf(&filename, "%s/", g.zLocalRoot); |
| 129 | baseLen = blob_size(&filename); |
| 130 | for(i=0; i<m.nFile; i++){ |
| @@ -132,13 +131,34 @@ | |
| 132 | blob_append(&filename, m.aFile[i].zName, -1); |
| 133 | isExe = m.aFile[i].zPerm && strstr(m.aFile[i].zPerm, "x"); |
| 134 | file_setexe(blob_str(&filename), isExe); |
| 135 | set_or_clear_isexe(m.aFile[i].zName, vid, isExe); |
| 136 | blob_resize(&filename, baseLen); |
| 137 | } |
| 138 | blob_reset(&filename); |
| 139 | manifest_clear(&m); |
| 140 | } |
| 141 | |
| 142 | /* |
| 143 | ** COMMAND: checkout |
| 144 | ** COMMAND: co |
| 145 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -97,34 +97,33 @@ | |
| 97 | db_multi_exec("UPDATE vfile SET isexe=%d WHERE vid=%d and pathname=%Q", |
| 98 | onoff, vid, zFilename); |
| 99 | } |
| 100 | |
| 101 | /* |
| 102 | ** Set or clear the execute permission bit (as appropriate) for all |
| 103 | ** files in the current check-out. |
| 104 | ** |
| 105 | ** If the checkout does not have explicit files named "manifest" and |
| 106 | ** "manifest.uuid" then automatically generate files with those names |
| 107 | ** containing, respectively, the text of the manifest and the artifact |
| 108 | ** ID of the manifest. |
| 109 | */ |
| 110 | void manifest_to_disk(int vid){ |
| 111 | char *zManFile; |
| 112 | Blob manifest; |
| 113 | Blob hash; |
| 114 | Blob filename; |
| 115 | int baseLen; |
| 116 | int i; |
| 117 | int seenManifest = 0; |
| 118 | int seenManifestUuid = 0; |
| 119 | Manifest m; |
| 120 | |
| 121 | /* Check the EXE permission status of all files |
| 122 | */ |
| 123 | blob_zero(&manifest); |
| 124 | content_get(vid, &manifest); |
| 125 | manifest_parse(&m, &manifest); |
| 126 | blob_zero(&filename); |
| 127 | blob_appendf(&filename, "%s/", g.zLocalRoot); |
| 128 | baseLen = blob_size(&filename); |
| 129 | for(i=0; i<m.nFile; i++){ |
| @@ -132,13 +131,34 @@ | |
| 131 | blob_append(&filename, m.aFile[i].zName, -1); |
| 132 | isExe = m.aFile[i].zPerm && strstr(m.aFile[i].zPerm, "x"); |
| 133 | file_setexe(blob_str(&filename), isExe); |
| 134 | set_or_clear_isexe(m.aFile[i].zName, vid, isExe); |
| 135 | blob_resize(&filename, baseLen); |
| 136 | if( memcmp(m.aFile[i].zName, "manifest", 8)==0 ){ |
| 137 | if( m.aFile[i].zName[8]==0 ) seenManifest = 1; |
| 138 | if( strcmp(&m.aFile[i].zName[8], ".uuid")==0 ) seenManifestUuid = 1; |
| 139 | } |
| 140 | } |
| 141 | blob_reset(&filename); |
| 142 | manifest_clear(&m); |
| 143 | |
| 144 | blob_zero(&manifest); |
| 145 | content_get(vid, &manifest); |
| 146 | if( !seenManifest ){ |
| 147 | zManFile = mprintf("%smanifest", g.zLocalRoot); |
| 148 | blob_write_to_file(&manifest, zManFile); |
| 149 | free(zManFile); |
| 150 | } |
| 151 | if( !seenManifestUuid ){ |
| 152 | blob_zero(&hash); |
| 153 | sha1sum_blob(&manifest, &hash); |
| 154 | zManFile = mprintf("%smanifest.uuid", g.zLocalRoot); |
| 155 | blob_append(&hash, "\n", 1); |
| 156 | blob_write_to_file(&hash, zManFile); |
| 157 | free(zManFile); |
| 158 | blob_reset(&hash); |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | /* |
| 163 | ** COMMAND: checkout |
| 164 | ** COMMAND: co |
| 165 |
+2
-2
| --- src/config.h | ||
| +++ src/config.h | ||
| @@ -36,12 +36,12 @@ | ||
| 36 | 36 | #include <stdlib.h> |
| 37 | 37 | #include <ctype.h> |
| 38 | 38 | #include <string.h> |
| 39 | 39 | #include <stdarg.h> |
| 40 | 40 | #include <assert.h> |
| 41 | -#if defined( __MINGW32__) || defined(__DMC__) || defined(_MSC_VER) | |
| 42 | -# if defined(__DMC__) || defined(_MSC_VER) | |
| 41 | +#if defined( __MINGW32__) || defined(__DMC__) || defined(_MSC_VER) || defined(__POCC__) | |
| 42 | +# if defined(__DMC__) || defined(_MSC_VER) || defined(__POCC__) | |
| 43 | 43 | typedef int socklen_t; |
| 44 | 44 | # endif |
| 45 | 45 | # ifndef _WIN32 |
| 46 | 46 | # define _WIN32 |
| 47 | 47 | # endif |
| 48 | 48 |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -36,12 +36,12 @@ | |
| 36 | #include <stdlib.h> |
| 37 | #include <ctype.h> |
| 38 | #include <string.h> |
| 39 | #include <stdarg.h> |
| 40 | #include <assert.h> |
| 41 | #if defined( __MINGW32__) || defined(__DMC__) || defined(_MSC_VER) |
| 42 | # if defined(__DMC__) || defined(_MSC_VER) |
| 43 | typedef int socklen_t; |
| 44 | # endif |
| 45 | # ifndef _WIN32 |
| 46 | # define _WIN32 |
| 47 | # endif |
| 48 |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -36,12 +36,12 @@ | |
| 36 | #include <stdlib.h> |
| 37 | #include <ctype.h> |
| 38 | #include <string.h> |
| 39 | #include <stdarg.h> |
| 40 | #include <assert.h> |
| 41 | #if defined( __MINGW32__) || defined(__DMC__) || defined(_MSC_VER) || defined(__POCC__) |
| 42 | # if defined(__DMC__) || defined(_MSC_VER) || defined(__POCC__) |
| 43 | typedef int socklen_t; |
| 44 | # endif |
| 45 | # ifndef _WIN32 |
| 46 | # define _WIN32 |
| 47 | # endif |
| 48 |
+44
-24
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1306,12 +1306,14 @@ | ||
| 1306 | 1306 | { "#d0c0ff", "#d0c0ff" }, |
| 1307 | 1307 | { "#ffc0ff", "#ffc0ff" }, |
| 1308 | 1308 | { "#ffc0d0", "#ffc0d0" }, |
| 1309 | 1309 | { "#fff0c0", "#fff0c0" }, |
| 1310 | 1310 | { "#c0c0c0", "#c0c0c0" }, |
| 1311 | + { "custom", "##" }, | |
| 1311 | 1312 | }; |
| 1312 | - int nColor = sizeof(aColor)/sizeof(aColor[0]); | |
| 1313 | + int nColor = sizeof(aColor)/sizeof(aColor[0])-1; | |
| 1314 | + int stdClrFound; | |
| 1313 | 1315 | int i; |
| 1314 | 1316 | |
| 1315 | 1317 | login_check_credentials(); |
| 1316 | 1318 | if( !g.okWrite ){ login_needed(); return; } |
| 1317 | 1319 | rid = name_to_rid(P("r")); |
| @@ -1332,10 +1334,13 @@ | ||
| 1332 | 1334 | if( zDate==0 ) fossil_redirect_home(); |
| 1333 | 1335 | zNewDate = PD("dt",zDate); |
| 1334 | 1336 | zColor = db_text("", "SELECT bgcolor" |
| 1335 | 1337 | " FROM event WHERE objid=%d", rid); |
| 1336 | 1338 | zNewColor = PD("clr",zColor); |
| 1339 | + if( strcmp(zNewColor,aColor[nColor].zColor)==0 ){ | |
| 1340 | + zNewColor = P("clrcust"); | |
| 1341 | + } | |
| 1337 | 1342 | fPropagateColor = P("pclr")!=0; |
| 1338 | 1343 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| 1339 | 1344 | zNewTag = PD("tagname",""); |
| 1340 | 1345 | zNewBrFlag = P("newbr") ? " checked" : ""; |
| 1341 | 1346 | zNewBranch = PD("brname",""); |
| @@ -1474,66 +1479,81 @@ | ||
| 1474 | 1479 | @ <hr /> |
| 1475 | 1480 | blob_reset(&suffix); |
| 1476 | 1481 | } |
| 1477 | 1482 | @ <p>Make changes to attributes of check-in |
| 1478 | 1483 | @ [<a href="ci?name=%s(zUuid)">%s(zUuid)</a>]:</p> |
| 1479 | - @ <form action="%s(g.zBaseURL)/ci_edit" method="POST"> | |
| 1484 | + @ <form action="%s(g.zBaseURL)/ci_edit" method="post"><div> | |
| 1480 | 1485 | login_insert_csrf_secret(); |
| 1481 | - @ <input type="hidden" name="r" value="%S(zUuid)"> | |
| 1486 | + @ <input type="hidden" name="r" value="%S(zUuid)" /> | |
| 1482 | 1487 | @ <table border="0" cellspacing="10"> |
| 1483 | 1488 | |
| 1484 | 1489 | @ <tr><td align="right" valign="top"><b>User:</b></td> |
| 1485 | 1490 | @ <td valign="top"> |
| 1486 | - @ <input type="text" name="u" size="20" value="%h(zNewUser)"> | |
| 1491 | + @ <input type="text" name="u" size="20" value="%h(zNewUser)" /> | |
| 1487 | 1492 | @ </td></tr> |
| 1488 | 1493 | |
| 1489 | 1494 | @ <tr><td align="right" valign="top"><b>Comment:</b></td> |
| 1490 | 1495 | @ <td valign="top"> |
| 1491 | 1496 | @ <textarea name="c" rows="10" cols="80">%h(zNewComment)</textarea> |
| 1492 | 1497 | @ </td></tr> |
| 1493 | 1498 | |
| 1494 | 1499 | @ <tr><td align="right" valign="top"><b>Check-in Time:</b></td> |
| 1495 | 1500 | @ <td valign="top"> |
| 1496 | - @ <input type="text" name="dt" size="20" value="%h(zNewDate)"> | |
| 1501 | + @ <input type="text" name="dt" size="20" value="%h(zNewDate)" /> | |
| 1497 | 1502 | @ </td></tr> |
| 1498 | 1503 | |
| 1499 | 1504 | @ <tr><td align="right" valign="top"><b>Background Color:</b></td> |
| 1500 | 1505 | @ <td valign="top"> |
| 1501 | - @ <table border=0 cellpadding=0 cellspacing=1> | |
| 1506 | + @ <table border="0" cellpadding="0" cellspacing="1"> | |
| 1502 | 1507 | @ <tr><td colspan="6" align="left"> |
| 1503 | 1508 | if( fPropagateColor ){ |
| 1504 | - @ <input type="checkbox" name="pclr" checked> | |
| 1509 | + @ <input type="checkbox" name="pclr" checked="checked" /> | |
| 1505 | 1510 | }else{ |
| 1506 | - @ <input type="checkbox" name="pclr"> | |
| 1511 | + @ <input type="checkbox" name="pclr" /> | |
| 1507 | 1512 | } |
| 1508 | - @ Propagate color to descendants</input></td></tr> | |
| 1513 | + @ Propagate color to descendants</td></tr> | |
| 1509 | 1514 | @ <tr> |
| 1510 | - for(i=0; i<nColor; i++){ | |
| 1515 | + for(i=0,stdClrFound=0; i<nColor; i++){ | |
| 1511 | 1516 | if( aColor[i].zColor[0] ){ |
| 1512 | 1517 | @ <td style="background-color: %h(aColor[i].zColor);"> |
| 1513 | 1518 | }else{ |
| 1514 | 1519 | @ <td> |
| 1515 | 1520 | } |
| 1516 | 1521 | if( strcmp(zNewColor, aColor[i].zColor)==0 ){ |
| 1517 | - @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" checked> | |
| 1522 | + @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" | |
| 1523 | + @ checked="checked" /> | |
| 1524 | + stdClrFound=1; | |
| 1518 | 1525 | }else{ |
| 1519 | - @ <input type="radio" name="clr" value="%h(aColor[i].zColor)"> | |
| 1526 | + @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" /> | |
| 1520 | 1527 | } |
| 1521 | - @ %h(aColor[i].zCName)</input></td> | |
| 1528 | + @ %h(aColor[i].zCName)</td> | |
| 1522 | 1529 | if( (i%6)==5 && i+1<nColor ){ |
| 1523 | 1530 | @ </tr><tr> |
| 1524 | 1531 | } |
| 1525 | 1532 | } |
| 1533 | + @ </tr><tr> | |
| 1534 | + if (stdClrFound){ | |
| 1535 | + @ <td colspan="6"> | |
| 1536 | + @ <input type="radio" name="clr" value="%h(aColor[nColor].zColor)" /> | |
| 1537 | + }else{ | |
| 1538 | + @ <td style="background-color: %h(zNewColor);" colspan="6"> | |
| 1539 | + @ <input type="radio" name="clr" value="%h(aColor[nColor].zColor)" | |
| 1540 | + @ checked="checked" /> | |
| 1541 | + } | |
| 1542 | + @ %h(aColor[i].zCName) | |
| 1543 | + @ <input type="text" name="clrcust" id="clrcust" class="checkinUserColor" | |
| 1544 | + @ value="%h(stdClrFound?"":zNewColor)" /> | |
| 1545 | + @ </td> | |
| 1526 | 1546 | @ </tr> |
| 1527 | 1547 | @ </table> |
| 1528 | 1548 | @ </td></tr> |
| 1529 | 1549 | |
| 1530 | 1550 | @ <tr><td align="right" valign="top"><b>Tags:</b></td> |
| 1531 | 1551 | @ <td valign="top"> |
| 1532 | - @ <input type="checkbox" name="newtag"%s(zNewTagFlag)> | |
| 1552 | + @ <input type="checkbox" name="newtag"%s(zNewTagFlag) /> | |
| 1533 | 1553 | @ Add the following new tag name to this check-in: |
| 1534 | - @ <input type="text" width="15" name="tagname" value="%h(zNewTag)"> | |
| 1554 | + @ <input type="text" style="width:15;" name="tagname" value="%h(zNewTag)" /> | |
| 1535 | 1555 | db_prepare(&q, |
| 1536 | 1556 | "SELECT tag.tagid, tagname FROM tagxref, tag" |
| 1537 | 1557 | " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid" |
| 1538 | 1558 | " ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)" |
| 1539 | 1559 | " ELSE tagname END", |
| @@ -1543,13 +1563,13 @@ | ||
| 1543 | 1563 | int tagid = db_column_int(&q, 0); |
| 1544 | 1564 | const char *zTagName = db_column_text(&q, 1); |
| 1545 | 1565 | char zLabel[30]; |
| 1546 | 1566 | sprintf(zLabel, "c%d", tagid); |
| 1547 | 1567 | if( P(zLabel) ){ |
| 1548 | - @ <br /><input type="checkbox" name="c%d(tagid)" checked> | |
| 1568 | + @ <br /><input type="checkbox" name="c%d(tagid)" checked="checked" /> | |
| 1549 | 1569 | }else{ |
| 1550 | - @ <br /><input type="checkbox" name="c%d(tagid)"> | |
| 1570 | + @ <br /><input type="checkbox" name="c%d(tagid)" /> | |
| 1551 | 1571 | } |
| 1552 | 1572 | if( strncmp(zTagName, "sym-", 4)==0 ){ |
| 1553 | 1573 | @ Cancel tag <b>%h(&zTagName[4])</b> |
| 1554 | 1574 | }else{ |
| 1555 | 1575 | @ Cancel special tag <b>%h(zTagName)</b> |
| @@ -1558,33 +1578,33 @@ | ||
| 1558 | 1578 | db_finalize(&q); |
| 1559 | 1579 | @ </td></tr> |
| 1560 | 1580 | |
| 1561 | 1581 | @ <tr><td align="right" valign="top"><b>Branching:</b></td> |
| 1562 | 1582 | @ <td valign="top"> |
| 1563 | - @ <input type="checkbox" name="newbr"%s(zNewBrFlag)> | |
| 1583 | + @ <input type="checkbox" name="newbr"%s(zNewBrFlag) /> | |
| 1564 | 1584 | @ Make this check-in the start of a new branch named: |
| 1565 | - @ <input type="text" width="15" name="brname" value="%h(zNewBranch)"> | |
| 1585 | + @ <input type="text" style="width:15;" name="brname" value="%h(zNewBranch)" /> | |
| 1566 | 1586 | @ </td></tr> |
| 1567 | 1587 | |
| 1568 | 1588 | if( is_a_leaf(rid) |
| 1569 | 1589 | && !db_exists("SELECT 1 FROM tagxref " |
| 1570 | 1590 | " WHERE tagid=%d AND rid=%d AND tagtype>0", |
| 1571 | 1591 | TAG_CLOSED, rid) |
| 1572 | 1592 | ){ |
| 1573 | 1593 | @ <tr><td align="right" valign="top"><b>Leaf Closure:</b></td> |
| 1574 | 1594 | @ <td valign="top"> |
| 1575 | - @ <input type="checkbox" name="close"%s(zCloseFlag)> | |
| 1595 | + @ <input type="checkbox" name="close"%s(zCloseFlag) /> | |
| 1576 | 1596 | @ Mark this leaf as "closed" so that it no longer appears on the |
| 1577 | 1597 | @ "leaves" page and is no longer labeled as a "<b>Leaf</b>". |
| 1578 | 1598 | @ </td></tr> |
| 1579 | 1599 | } |
| 1580 | 1600 | |
| 1581 | 1601 | |
| 1582 | 1602 | @ <tr><td colspan="2"> |
| 1583 | - @ <input type="submit" name="preview" value="Preview"> | |
| 1584 | - @ <input type="submit" name="apply" value="Apply Changes"> | |
| 1585 | - @ <input type="submit" name="cancel" value="Cancel"> | |
| 1603 | + @ <input type="submit" name="preview" value="Preview" /> | |
| 1604 | + @ <input type="submit" name="apply" value="Apply Changes" /> | |
| 1605 | + @ <input type="submit" name="cancel" value="Cancel" /> | |
| 1586 | 1606 | @ </td></tr> |
| 1587 | 1607 | @ </table> |
| 1588 | - @ </form> | |
| 1608 | + @ </div></form> | |
| 1589 | 1609 | style_footer(); |
| 1590 | 1610 | } |
| 1591 | 1611 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1306,12 +1306,14 @@ | |
| 1306 | { "#d0c0ff", "#d0c0ff" }, |
| 1307 | { "#ffc0ff", "#ffc0ff" }, |
| 1308 | { "#ffc0d0", "#ffc0d0" }, |
| 1309 | { "#fff0c0", "#fff0c0" }, |
| 1310 | { "#c0c0c0", "#c0c0c0" }, |
| 1311 | }; |
| 1312 | int nColor = sizeof(aColor)/sizeof(aColor[0]); |
| 1313 | int i; |
| 1314 | |
| 1315 | login_check_credentials(); |
| 1316 | if( !g.okWrite ){ login_needed(); return; } |
| 1317 | rid = name_to_rid(P("r")); |
| @@ -1332,10 +1334,13 @@ | |
| 1332 | if( zDate==0 ) fossil_redirect_home(); |
| 1333 | zNewDate = PD("dt",zDate); |
| 1334 | zColor = db_text("", "SELECT bgcolor" |
| 1335 | " FROM event WHERE objid=%d", rid); |
| 1336 | zNewColor = PD("clr",zColor); |
| 1337 | fPropagateColor = P("pclr")!=0; |
| 1338 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| 1339 | zNewTag = PD("tagname",""); |
| 1340 | zNewBrFlag = P("newbr") ? " checked" : ""; |
| 1341 | zNewBranch = PD("brname",""); |
| @@ -1474,66 +1479,81 @@ | |
| 1474 | @ <hr /> |
| 1475 | blob_reset(&suffix); |
| 1476 | } |
| 1477 | @ <p>Make changes to attributes of check-in |
| 1478 | @ [<a href="ci?name=%s(zUuid)">%s(zUuid)</a>]:</p> |
| 1479 | @ <form action="%s(g.zBaseURL)/ci_edit" method="POST"> |
| 1480 | login_insert_csrf_secret(); |
| 1481 | @ <input type="hidden" name="r" value="%S(zUuid)"> |
| 1482 | @ <table border="0" cellspacing="10"> |
| 1483 | |
| 1484 | @ <tr><td align="right" valign="top"><b>User:</b></td> |
| 1485 | @ <td valign="top"> |
| 1486 | @ <input type="text" name="u" size="20" value="%h(zNewUser)"> |
| 1487 | @ </td></tr> |
| 1488 | |
| 1489 | @ <tr><td align="right" valign="top"><b>Comment:</b></td> |
| 1490 | @ <td valign="top"> |
| 1491 | @ <textarea name="c" rows="10" cols="80">%h(zNewComment)</textarea> |
| 1492 | @ </td></tr> |
| 1493 | |
| 1494 | @ <tr><td align="right" valign="top"><b>Check-in Time:</b></td> |
| 1495 | @ <td valign="top"> |
| 1496 | @ <input type="text" name="dt" size="20" value="%h(zNewDate)"> |
| 1497 | @ </td></tr> |
| 1498 | |
| 1499 | @ <tr><td align="right" valign="top"><b>Background Color:</b></td> |
| 1500 | @ <td valign="top"> |
| 1501 | @ <table border=0 cellpadding=0 cellspacing=1> |
| 1502 | @ <tr><td colspan="6" align="left"> |
| 1503 | if( fPropagateColor ){ |
| 1504 | @ <input type="checkbox" name="pclr" checked> |
| 1505 | }else{ |
| 1506 | @ <input type="checkbox" name="pclr"> |
| 1507 | } |
| 1508 | @ Propagate color to descendants</input></td></tr> |
| 1509 | @ <tr> |
| 1510 | for(i=0; i<nColor; i++){ |
| 1511 | if( aColor[i].zColor[0] ){ |
| 1512 | @ <td style="background-color: %h(aColor[i].zColor);"> |
| 1513 | }else{ |
| 1514 | @ <td> |
| 1515 | } |
| 1516 | if( strcmp(zNewColor, aColor[i].zColor)==0 ){ |
| 1517 | @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" checked> |
| 1518 | }else{ |
| 1519 | @ <input type="radio" name="clr" value="%h(aColor[i].zColor)"> |
| 1520 | } |
| 1521 | @ %h(aColor[i].zCName)</input></td> |
| 1522 | if( (i%6)==5 && i+1<nColor ){ |
| 1523 | @ </tr><tr> |
| 1524 | } |
| 1525 | } |
| 1526 | @ </tr> |
| 1527 | @ </table> |
| 1528 | @ </td></tr> |
| 1529 | |
| 1530 | @ <tr><td align="right" valign="top"><b>Tags:</b></td> |
| 1531 | @ <td valign="top"> |
| 1532 | @ <input type="checkbox" name="newtag"%s(zNewTagFlag)> |
| 1533 | @ Add the following new tag name to this check-in: |
| 1534 | @ <input type="text" width="15" name="tagname" value="%h(zNewTag)"> |
| 1535 | db_prepare(&q, |
| 1536 | "SELECT tag.tagid, tagname FROM tagxref, tag" |
| 1537 | " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid" |
| 1538 | " ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)" |
| 1539 | " ELSE tagname END", |
| @@ -1543,13 +1563,13 @@ | |
| 1543 | int tagid = db_column_int(&q, 0); |
| 1544 | const char *zTagName = db_column_text(&q, 1); |
| 1545 | char zLabel[30]; |
| 1546 | sprintf(zLabel, "c%d", tagid); |
| 1547 | if( P(zLabel) ){ |
| 1548 | @ <br /><input type="checkbox" name="c%d(tagid)" checked> |
| 1549 | }else{ |
| 1550 | @ <br /><input type="checkbox" name="c%d(tagid)"> |
| 1551 | } |
| 1552 | if( strncmp(zTagName, "sym-", 4)==0 ){ |
| 1553 | @ Cancel tag <b>%h(&zTagName[4])</b> |
| 1554 | }else{ |
| 1555 | @ Cancel special tag <b>%h(zTagName)</b> |
| @@ -1558,33 +1578,33 @@ | |
| 1558 | db_finalize(&q); |
| 1559 | @ </td></tr> |
| 1560 | |
| 1561 | @ <tr><td align="right" valign="top"><b>Branching:</b></td> |
| 1562 | @ <td valign="top"> |
| 1563 | @ <input type="checkbox" name="newbr"%s(zNewBrFlag)> |
| 1564 | @ Make this check-in the start of a new branch named: |
| 1565 | @ <input type="text" width="15" name="brname" value="%h(zNewBranch)"> |
| 1566 | @ </td></tr> |
| 1567 | |
| 1568 | if( is_a_leaf(rid) |
| 1569 | && !db_exists("SELECT 1 FROM tagxref " |
| 1570 | " WHERE tagid=%d AND rid=%d AND tagtype>0", |
| 1571 | TAG_CLOSED, rid) |
| 1572 | ){ |
| 1573 | @ <tr><td align="right" valign="top"><b>Leaf Closure:</b></td> |
| 1574 | @ <td valign="top"> |
| 1575 | @ <input type="checkbox" name="close"%s(zCloseFlag)> |
| 1576 | @ Mark this leaf as "closed" so that it no longer appears on the |
| 1577 | @ "leaves" page and is no longer labeled as a "<b>Leaf</b>". |
| 1578 | @ </td></tr> |
| 1579 | } |
| 1580 | |
| 1581 | |
| 1582 | @ <tr><td colspan="2"> |
| 1583 | @ <input type="submit" name="preview" value="Preview"> |
| 1584 | @ <input type="submit" name="apply" value="Apply Changes"> |
| 1585 | @ <input type="submit" name="cancel" value="Cancel"> |
| 1586 | @ </td></tr> |
| 1587 | @ </table> |
| 1588 | @ </form> |
| 1589 | style_footer(); |
| 1590 | } |
| 1591 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1306,12 +1306,14 @@ | |
| 1306 | { "#d0c0ff", "#d0c0ff" }, |
| 1307 | { "#ffc0ff", "#ffc0ff" }, |
| 1308 | { "#ffc0d0", "#ffc0d0" }, |
| 1309 | { "#fff0c0", "#fff0c0" }, |
| 1310 | { "#c0c0c0", "#c0c0c0" }, |
| 1311 | { "custom", "##" }, |
| 1312 | }; |
| 1313 | int nColor = sizeof(aColor)/sizeof(aColor[0])-1; |
| 1314 | int stdClrFound; |
| 1315 | int i; |
| 1316 | |
| 1317 | login_check_credentials(); |
| 1318 | if( !g.okWrite ){ login_needed(); return; } |
| 1319 | rid = name_to_rid(P("r")); |
| @@ -1332,10 +1334,13 @@ | |
| 1334 | if( zDate==0 ) fossil_redirect_home(); |
| 1335 | zNewDate = PD("dt",zDate); |
| 1336 | zColor = db_text("", "SELECT bgcolor" |
| 1337 | " FROM event WHERE objid=%d", rid); |
| 1338 | zNewColor = PD("clr",zColor); |
| 1339 | if( strcmp(zNewColor,aColor[nColor].zColor)==0 ){ |
| 1340 | zNewColor = P("clrcust"); |
| 1341 | } |
| 1342 | fPropagateColor = P("pclr")!=0; |
| 1343 | zNewTagFlag = P("newtag") ? " checked" : ""; |
| 1344 | zNewTag = PD("tagname",""); |
| 1345 | zNewBrFlag = P("newbr") ? " checked" : ""; |
| 1346 | zNewBranch = PD("brname",""); |
| @@ -1474,66 +1479,81 @@ | |
| 1479 | @ <hr /> |
| 1480 | blob_reset(&suffix); |
| 1481 | } |
| 1482 | @ <p>Make changes to attributes of check-in |
| 1483 | @ [<a href="ci?name=%s(zUuid)">%s(zUuid)</a>]:</p> |
| 1484 | @ <form action="%s(g.zBaseURL)/ci_edit" method="post"><div> |
| 1485 | login_insert_csrf_secret(); |
| 1486 | @ <input type="hidden" name="r" value="%S(zUuid)" /> |
| 1487 | @ <table border="0" cellspacing="10"> |
| 1488 | |
| 1489 | @ <tr><td align="right" valign="top"><b>User:</b></td> |
| 1490 | @ <td valign="top"> |
| 1491 | @ <input type="text" name="u" size="20" value="%h(zNewUser)" /> |
| 1492 | @ </td></tr> |
| 1493 | |
| 1494 | @ <tr><td align="right" valign="top"><b>Comment:</b></td> |
| 1495 | @ <td valign="top"> |
| 1496 | @ <textarea name="c" rows="10" cols="80">%h(zNewComment)</textarea> |
| 1497 | @ </td></tr> |
| 1498 | |
| 1499 | @ <tr><td align="right" valign="top"><b>Check-in Time:</b></td> |
| 1500 | @ <td valign="top"> |
| 1501 | @ <input type="text" name="dt" size="20" value="%h(zNewDate)" /> |
| 1502 | @ </td></tr> |
| 1503 | |
| 1504 | @ <tr><td align="right" valign="top"><b>Background Color:</b></td> |
| 1505 | @ <td valign="top"> |
| 1506 | @ <table border="0" cellpadding="0" cellspacing="1"> |
| 1507 | @ <tr><td colspan="6" align="left"> |
| 1508 | if( fPropagateColor ){ |
| 1509 | @ <input type="checkbox" name="pclr" checked="checked" /> |
| 1510 | }else{ |
| 1511 | @ <input type="checkbox" name="pclr" /> |
| 1512 | } |
| 1513 | @ Propagate color to descendants</td></tr> |
| 1514 | @ <tr> |
| 1515 | for(i=0,stdClrFound=0; i<nColor; i++){ |
| 1516 | if( aColor[i].zColor[0] ){ |
| 1517 | @ <td style="background-color: %h(aColor[i].zColor);"> |
| 1518 | }else{ |
| 1519 | @ <td> |
| 1520 | } |
| 1521 | if( strcmp(zNewColor, aColor[i].zColor)==0 ){ |
| 1522 | @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" |
| 1523 | @ checked="checked" /> |
| 1524 | stdClrFound=1; |
| 1525 | }else{ |
| 1526 | @ <input type="radio" name="clr" value="%h(aColor[i].zColor)" /> |
| 1527 | } |
| 1528 | @ %h(aColor[i].zCName)</td> |
| 1529 | if( (i%6)==5 && i+1<nColor ){ |
| 1530 | @ </tr><tr> |
| 1531 | } |
| 1532 | } |
| 1533 | @ </tr><tr> |
| 1534 | if (stdClrFound){ |
| 1535 | @ <td colspan="6"> |
| 1536 | @ <input type="radio" name="clr" value="%h(aColor[nColor].zColor)" /> |
| 1537 | }else{ |
| 1538 | @ <td style="background-color: %h(zNewColor);" colspan="6"> |
| 1539 | @ <input type="radio" name="clr" value="%h(aColor[nColor].zColor)" |
| 1540 | @ checked="checked" /> |
| 1541 | } |
| 1542 | @ %h(aColor[i].zCName) |
| 1543 | @ <input type="text" name="clrcust" id="clrcust" class="checkinUserColor" |
| 1544 | @ value="%h(stdClrFound?"":zNewColor)" /> |
| 1545 | @ </td> |
| 1546 | @ </tr> |
| 1547 | @ </table> |
| 1548 | @ </td></tr> |
| 1549 | |
| 1550 | @ <tr><td align="right" valign="top"><b>Tags:</b></td> |
| 1551 | @ <td valign="top"> |
| 1552 | @ <input type="checkbox" name="newtag"%s(zNewTagFlag) /> |
| 1553 | @ Add the following new tag name to this check-in: |
| 1554 | @ <input type="text" style="width:15;" name="tagname" value="%h(zNewTag)" /> |
| 1555 | db_prepare(&q, |
| 1556 | "SELECT tag.tagid, tagname FROM tagxref, tag" |
| 1557 | " WHERE tagxref.rid=%d AND tagtype>0 AND tagxref.tagid=tag.tagid" |
| 1558 | " ORDER BY CASE WHEN tagname GLOB 'sym-*' THEN substr(tagname,5)" |
| 1559 | " ELSE tagname END", |
| @@ -1543,13 +1563,13 @@ | |
| 1563 | int tagid = db_column_int(&q, 0); |
| 1564 | const char *zTagName = db_column_text(&q, 1); |
| 1565 | char zLabel[30]; |
| 1566 | sprintf(zLabel, "c%d", tagid); |
| 1567 | if( P(zLabel) ){ |
| 1568 | @ <br /><input type="checkbox" name="c%d(tagid)" checked="checked" /> |
| 1569 | }else{ |
| 1570 | @ <br /><input type="checkbox" name="c%d(tagid)" /> |
| 1571 | } |
| 1572 | if( strncmp(zTagName, "sym-", 4)==0 ){ |
| 1573 | @ Cancel tag <b>%h(&zTagName[4])</b> |
| 1574 | }else{ |
| 1575 | @ Cancel special tag <b>%h(zTagName)</b> |
| @@ -1558,33 +1578,33 @@ | |
| 1578 | db_finalize(&q); |
| 1579 | @ </td></tr> |
| 1580 | |
| 1581 | @ <tr><td align="right" valign="top"><b>Branching:</b></td> |
| 1582 | @ <td valign="top"> |
| 1583 | @ <input type="checkbox" name="newbr"%s(zNewBrFlag) /> |
| 1584 | @ Make this check-in the start of a new branch named: |
| 1585 | @ <input type="text" style="width:15;" name="brname" value="%h(zNewBranch)" /> |
| 1586 | @ </td></tr> |
| 1587 | |
| 1588 | if( is_a_leaf(rid) |
| 1589 | && !db_exists("SELECT 1 FROM tagxref " |
| 1590 | " WHERE tagid=%d AND rid=%d AND tagtype>0", |
| 1591 | TAG_CLOSED, rid) |
| 1592 | ){ |
| 1593 | @ <tr><td align="right" valign="top"><b>Leaf Closure:</b></td> |
| 1594 | @ <td valign="top"> |
| 1595 | @ <input type="checkbox" name="close"%s(zCloseFlag) /> |
| 1596 | @ Mark this leaf as "closed" so that it no longer appears on the |
| 1597 | @ "leaves" page and is no longer labeled as a "<b>Leaf</b>". |
| 1598 | @ </td></tr> |
| 1599 | } |
| 1600 | |
| 1601 | |
| 1602 | @ <tr><td colspan="2"> |
| 1603 | @ <input type="submit" name="preview" value="Preview" /> |
| 1604 | @ <input type="submit" name="apply" value="Apply Changes" /> |
| 1605 | @ <input type="submit" name="cancel" value="Cancel" /> |
| 1606 | @ </td></tr> |
| 1607 | @ </table> |
| 1608 | @ </div></form> |
| 1609 | style_footer(); |
| 1610 | } |
| 1611 |
+4
-4
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -290,11 +290,11 @@ | ||
| 290 | 290 | va_start(ap, zFormat); |
| 291 | 291 | z = vmprintf(zFormat, ap); |
| 292 | 292 | va_end(ap); |
| 293 | 293 | if( g.cgiOutput && once ){ |
| 294 | 294 | once = 0; |
| 295 | - cgi_printf("<p><font color=\"red\">%h</font></p>", z); | |
| 295 | + cgi_printf("<p class=\"generalError\">%h</p>", z); | |
| 296 | 296 | cgi_reply(); |
| 297 | 297 | }else{ |
| 298 | 298 | fprintf(stderr, "%s: %s\n", g.argv[0], z); |
| 299 | 299 | } |
| 300 | 300 | db_force_rollback(); |
| @@ -307,11 +307,11 @@ | ||
| 307 | 307 | va_start(ap, zFormat); |
| 308 | 308 | z = vmprintf(zFormat, ap); |
| 309 | 309 | va_end(ap); |
| 310 | 310 | if( g.cgiOutput ){ |
| 311 | 311 | g.cgiOutput = 0; |
| 312 | - cgi_printf("<p><font color=\"red\">%h</font></p>", z); | |
| 312 | + cgi_printf("<p class=\"generalError\">%h</p>", z); | |
| 313 | 313 | cgi_reply(); |
| 314 | 314 | }else{ |
| 315 | 315 | fprintf(stderr, "%s: %s\n", g.argv[0], z); |
| 316 | 316 | } |
| 317 | 317 | db_force_rollback(); |
| @@ -335,11 +335,11 @@ | ||
| 335 | 335 | va_start(ap, zFormat); |
| 336 | 336 | z = vmprintf(zFormat, ap); |
| 337 | 337 | va_end(ap); |
| 338 | 338 | if( g.cgiOutput ){ |
| 339 | 339 | g.cgiOutput = 0; |
| 340 | - cgi_printf("<p><font color=\"red\">%h</font></p>", z); | |
| 340 | + cgi_printf("<p class=\"generalError\">%h</p>", z); | |
| 341 | 341 | cgi_reply(); |
| 342 | 342 | }else{ |
| 343 | 343 | fprintf(stderr, "%s: %s\n", g.argv[0], z); |
| 344 | 344 | } |
| 345 | 345 | db_force_rollback(); |
| @@ -353,11 +353,11 @@ | ||
| 353 | 353 | va_list ap; |
| 354 | 354 | va_start(ap, zFormat); |
| 355 | 355 | z = vmprintf(zFormat, ap); |
| 356 | 356 | va_end(ap); |
| 357 | 357 | if( g.cgiOutput ){ |
| 358 | - cgi_printf("<p><font color=\"red\">%h</font></p>", z); | |
| 358 | + cgi_printf("<p class=\"generalError\">%h</p>", z); | |
| 359 | 359 | }else{ |
| 360 | 360 | fprintf(stderr, "%s: %s\n", g.argv[0], z); |
| 361 | 361 | } |
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -290,11 +290,11 @@ | |
| 290 | va_start(ap, zFormat); |
| 291 | z = vmprintf(zFormat, ap); |
| 292 | va_end(ap); |
| 293 | if( g.cgiOutput && once ){ |
| 294 | once = 0; |
| 295 | cgi_printf("<p><font color=\"red\">%h</font></p>", z); |
| 296 | cgi_reply(); |
| 297 | }else{ |
| 298 | fprintf(stderr, "%s: %s\n", g.argv[0], z); |
| 299 | } |
| 300 | db_force_rollback(); |
| @@ -307,11 +307,11 @@ | |
| 307 | va_start(ap, zFormat); |
| 308 | z = vmprintf(zFormat, ap); |
| 309 | va_end(ap); |
| 310 | if( g.cgiOutput ){ |
| 311 | g.cgiOutput = 0; |
| 312 | cgi_printf("<p><font color=\"red\">%h</font></p>", z); |
| 313 | cgi_reply(); |
| 314 | }else{ |
| 315 | fprintf(stderr, "%s: %s\n", g.argv[0], z); |
| 316 | } |
| 317 | db_force_rollback(); |
| @@ -335,11 +335,11 @@ | |
| 335 | va_start(ap, zFormat); |
| 336 | z = vmprintf(zFormat, ap); |
| 337 | va_end(ap); |
| 338 | if( g.cgiOutput ){ |
| 339 | g.cgiOutput = 0; |
| 340 | cgi_printf("<p><font color=\"red\">%h</font></p>", z); |
| 341 | cgi_reply(); |
| 342 | }else{ |
| 343 | fprintf(stderr, "%s: %s\n", g.argv[0], z); |
| 344 | } |
| 345 | db_force_rollback(); |
| @@ -353,11 +353,11 @@ | |
| 353 | va_list ap; |
| 354 | va_start(ap, zFormat); |
| 355 | z = vmprintf(zFormat, ap); |
| 356 | va_end(ap); |
| 357 | if( g.cgiOutput ){ |
| 358 | cgi_printf("<p><font color=\"red\">%h</font></p>", z); |
| 359 | }else{ |
| 360 | fprintf(stderr, "%s: %s\n", g.argv[0], z); |
| 361 | } |
| 362 | } |
| 363 | |
| 364 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -290,11 +290,11 @@ | |
| 290 | va_start(ap, zFormat); |
| 291 | z = vmprintf(zFormat, ap); |
| 292 | va_end(ap); |
| 293 | if( g.cgiOutput && once ){ |
| 294 | once = 0; |
| 295 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 296 | cgi_reply(); |
| 297 | }else{ |
| 298 | fprintf(stderr, "%s: %s\n", g.argv[0], z); |
| 299 | } |
| 300 | db_force_rollback(); |
| @@ -307,11 +307,11 @@ | |
| 307 | va_start(ap, zFormat); |
| 308 | z = vmprintf(zFormat, ap); |
| 309 | va_end(ap); |
| 310 | if( g.cgiOutput ){ |
| 311 | g.cgiOutput = 0; |
| 312 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 313 | cgi_reply(); |
| 314 | }else{ |
| 315 | fprintf(stderr, "%s: %s\n", g.argv[0], z); |
| 316 | } |
| 317 | db_force_rollback(); |
| @@ -335,11 +335,11 @@ | |
| 335 | va_start(ap, zFormat); |
| 336 | z = vmprintf(zFormat, ap); |
| 337 | va_end(ap); |
| 338 | if( g.cgiOutput ){ |
| 339 | g.cgiOutput = 0; |
| 340 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 341 | cgi_reply(); |
| 342 | }else{ |
| 343 | fprintf(stderr, "%s: %s\n", g.argv[0], z); |
| 344 | } |
| 345 | db_force_rollback(); |
| @@ -353,11 +353,11 @@ | |
| 353 | va_list ap; |
| 354 | va_start(ap, zFormat); |
| 355 | z = vmprintf(zFormat, ap); |
| 356 | va_end(ap); |
| 357 | if( g.cgiOutput ){ |
| 358 | cgi_printf("<p class=\"generalError\">%h</p>", z); |
| 359 | }else{ |
| 360 | fprintf(stderr, "%s: %s\n", g.argv[0], z); |
| 361 | } |
| 362 | } |
| 363 | |
| 364 |
+126
-27
| --- src/rebuild.c | ||
| +++ src/rebuild.c | ||
| @@ -401,26 +401,63 @@ | ||
| 401 | 401 | }else{ |
| 402 | 402 | rebuild_db(0, 1); |
| 403 | 403 | db_end_transaction(0); |
| 404 | 404 | } |
| 405 | 405 | } |
| 406 | + | |
| 407 | +/* | |
| 408 | +** help function for reconstruct for recursiv directory | |
| 409 | +** reading. | |
| 410 | +*/ | |
| 411 | +void recon_read_dir(char * zPath){ | |
| 412 | + DIR *d; | |
| 413 | + struct dirent *pEntry; | |
| 414 | + Blob aContent; /* content of the just read artifact */ | |
| 415 | + | |
| 416 | + d = opendir(zPath); | |
| 417 | + if( d ){ | |
| 418 | + while( (pEntry=readdir(d))!=0 ){ | |
| 419 | + Blob path; | |
| 420 | + char *zSubpath; | |
| 421 | + | |
| 422 | + if( pEntry->d_name[0]=='.' ){ | |
| 423 | + continue; | |
| 424 | + } | |
| 425 | + zSubpath = mprintf("%s/%s",zPath,pEntry->d_name); | |
| 426 | + if( file_isdir(zSubpath)==1 ){ | |
| 427 | + recon_read_dir(zSubpath); | |
| 428 | + } | |
| 429 | + blob_init(&path, 0, 0); | |
| 430 | + blob_appendf(&path, "%s", zSubpath); | |
| 431 | + if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){ | |
| 432 | + fossil_panic("some unknown error occurred while reading \"%s\"", | |
| 433 | + blob_str(&path)); | |
| 434 | + } | |
| 435 | + content_put(&aContent, 0, 0); | |
| 436 | + blob_reset(&path); | |
| 437 | + blob_reset(&aContent); | |
| 438 | + free(zSubpath); | |
| 439 | + } | |
| 440 | + }else { | |
| 441 | + fossil_panic("encountered error %d while trying to open \"%s\".", | |
| 442 | + errno, g.argv[3]); | |
| 443 | + } | |
| 444 | +} | |
| 406 | 445 | |
| 407 | 446 | /* |
| 408 | 447 | ** COMMAND: reconstruct |
| 409 | 448 | ** |
| 410 | 449 | ** Usage: %fossil reconstruct FILENAME DIRECTORY |
| 411 | 450 | ** |
| 412 | 451 | ** This command studies the artifacts (files) in DIRECTORY and |
| 413 | 452 | ** reconstructs the fossil record from them. It places the new |
| 414 | -** fossil repository in FILENAME | |
| 453 | +** fossil repository in FILENAME. Subdirectories are read, files | |
| 454 | +** with leading '.' in the filename are ignored. | |
| 415 | 455 | ** |
| 416 | 456 | */ |
| 417 | 457 | void reconstruct_cmd(void) { |
| 418 | 458 | char *zPassword; |
| 419 | - DIR *d; | |
| 420 | - struct dirent *pEntry; | |
| 421 | - Blob aContent; /* content of the just read artifact */ | |
| 422 | 459 | if( g.argc!=4 ){ |
| 423 | 460 | usage("FILENAME DIRECTORY"); |
| 424 | 461 | } |
| 425 | 462 | if( file_isdir(g.argv[3])!=1 ){ |
| 426 | 463 | printf("\"%s\" is not a directory\n\n", g.argv[3]); |
| @@ -430,37 +467,99 @@ | ||
| 430 | 467 | db_open_repository(g.argv[2]); |
| 431 | 468 | db_open_config(0); |
| 432 | 469 | db_begin_transaction(); |
| 433 | 470 | db_initial_setup(0, 0, 1); |
| 434 | 471 | |
| 435 | - d = opendir(g.argv[3]); | |
| 436 | - if( d ){ | |
| 437 | - while( (pEntry=readdir(d))!=0 ){ | |
| 438 | - Blob path; | |
| 439 | - blob_init(&path, 0, 0); | |
| 440 | - if( pEntry->d_name[0]=='.' ){ | |
| 441 | - continue; | |
| 442 | - } | |
| 443 | - if( file_isdir(pEntry->d_name)==1 ){ | |
| 444 | - continue; | |
| 445 | - } | |
| 446 | - blob_appendf(&path, "%s/%s", g.argv[3], pEntry->d_name); | |
| 447 | - if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){ | |
| 448 | - fossil_panic("Some unknown error occurred while reading \"%s\"", blob_str(&path)); | |
| 449 | - } | |
| 450 | - content_put(&aContent, 0, 0); | |
| 451 | - blob_reset(&path); | |
| 452 | - blob_reset(&aContent); | |
| 453 | - } | |
| 454 | - } | |
| 455 | - else { | |
| 456 | - fossil_panic("Encountered error %d while trying to open \"%s\".", errno, g.argv[3]); | |
| 457 | - } | |
| 472 | + recon_read_dir(g.argv[3]); | |
| 458 | 473 | |
| 459 | 474 | rebuild_db(0, 1); |
| 460 | 475 | |
| 461 | 476 | db_end_transaction(0); |
| 462 | 477 | printf("project-id: %s\n", db_get("project-code", 0)); |
| 463 | 478 | printf("server-id: %s\n", db_get("server-code", 0)); |
| 464 | 479 | zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin); |
| 465 | 480 | printf("admin-user: %s (initial password is \"%s\")\n", g.zLogin, zPassword); |
| 466 | 481 | } |
| 482 | + | |
| 483 | +/* | |
| 484 | +** COMMAND: deconstruct | |
| 485 | +** | |
| 486 | +** Usage %fossil deconstruct ?-R|--repository REPOSITORY? ?-L|--prefixlength N? DESTINATION | |
| 487 | +** | |
| 488 | +** This command exports all artifacts of o given repository and | |
| 489 | +** writes all artifacts to the file system. The DESTINATION directory | |
| 490 | +** will be populated with subdirectories AA and files AA/BBBBBBBBB.., where | |
| 491 | +** AABBBBBBBBB.. is the 40 character artifact ID, AA the first 2 characters. | |
| 492 | +** If -L|--prefixlength is given, the length (default 2) of the directory | |
| 493 | +** prefix can be set to 0,1,..,9 characters. | |
| 494 | +*/ | |
| 495 | +void deconstruct_cmd(void){ | |
| 496 | + const char *zDestDir; | |
| 497 | + const char *zPrefixOpt; | |
| 498 | + int prefixLength = 0; | |
| 499 | + char *zAFileOutFormat; | |
| 500 | + Stmt q; | |
| 501 | + | |
| 502 | + /* check number of arguments */ | |
| 503 | + if( (g.argc != 3) && (g.argc != 5) && (g.argc != 7)){ | |
| 504 | + usage ("?-R|--repository REPOSITORY? ?-L|--prefixlength N? DESTINATION"); | |
| 505 | + } | |
| 506 | + /* get and check argument destination directory */ | |
| 507 | + zDestDir = g.argv[g.argc-1]; | |
| 508 | + if( !*zDestDir || !file_isdir(zDestDir)) { | |
| 509 | + fossil_panic("DESTINATION(%s) is not a directory!",zDestDir); | |
| 510 | + } | |
| 511 | + /* get and check prefix length argument and build format string */ | |
| 512 | + zPrefixOpt=find_option("prefixlength","L",1); | |
| 513 | + if( !zPrefixOpt ){ | |
| 514 | + prefixLength = 2; | |
| 515 | + }else{ | |
| 516 | + if( zPrefixOpt[0]>='0' && zPrefixOpt[0]<='9' && !zPrefixOpt[1] ){ | |
| 517 | + prefixLength = (int)(*zPrefixOpt-'0'); | |
| 518 | + }else{ | |
| 519 | + fossil_panic("N(%s) is not a a valid prefix length!",zPrefixOpt); | |
| 520 | + } | |
| 521 | + } | |
| 522 | + if( prefixLength ){ | |
| 523 | + zAFileOutFormat = mprintf("%%s/%%.%ds/%%s",prefixLength); | |
| 524 | + }else{ | |
| 525 | + zAFileOutFormat = mprintf("%%s/%%s"); | |
| 526 | + } | |
| 527 | +#ifndef _WIN32 | |
| 528 | + if( access(zDestDir, W_OK) ){ | |
| 529 | + fossil_panic("DESTINATION(%s) is not writeable!",zDestDir); | |
| 530 | + } | |
| 531 | +#else | |
| 532 | + /* write access on windows is not checked, errors will be | |
| 533 | + ** dected on blob_write_to_file | |
| 534 | + */ | |
| 535 | +#endif | |
| 536 | + /* open repository and open query for all artifacts */ | |
| 537 | + db_find_and_open_repository(1); | |
| 538 | + db_prepare(&q, "SELECT rid,uuid FROM blob"); | |
| 539 | + /* loop over artifacts and write them to single files */ | |
| 540 | + while( db_step(&q)==SQLITE_ROW ){ | |
| 541 | + int aRid; | |
| 542 | + const char *zAUuid; | |
| 543 | + char *zAFName; | |
| 544 | + Blob zACont; | |
| 545 | + | |
| 546 | + /* get data from query */ | |
| 547 | + aRid = db_column_int (&q, 0); | |
| 548 | + zAUuid = db_column_text(&q, 1); | |
| 549 | + | |
| 550 | + /* construct output filename */ | |
| 551 | + zAFName = mprintf(zAFileOutFormat, zDestDir, zAUuid, zAUuid + prefixLength); | |
| 552 | + | |
| 553 | + /* read artifact contents from db and write to file */ | |
| 554 | + content_get(aRid,&zACont); | |
| 555 | + blob_write_to_file(&zACont,zAFName); | |
| 556 | + blob_reset(&zACont); | |
| 557 | + | |
| 558 | + /* free artifact filename string */ | |
| 559 | + free(zAFName); | |
| 560 | + } | |
| 561 | + /* close query statement */ | |
| 562 | + db_finalize(&q); | |
| 563 | + /* free filename format string */ | |
| 564 | + free(zAFileOutFormat); | |
| 565 | +} | |
| 467 | 566 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -401,26 +401,63 @@ | |
| 401 | }else{ |
| 402 | rebuild_db(0, 1); |
| 403 | db_end_transaction(0); |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | /* |
| 408 | ** COMMAND: reconstruct |
| 409 | ** |
| 410 | ** Usage: %fossil reconstruct FILENAME DIRECTORY |
| 411 | ** |
| 412 | ** This command studies the artifacts (files) in DIRECTORY and |
| 413 | ** reconstructs the fossil record from them. It places the new |
| 414 | ** fossil repository in FILENAME |
| 415 | ** |
| 416 | */ |
| 417 | void reconstruct_cmd(void) { |
| 418 | char *zPassword; |
| 419 | DIR *d; |
| 420 | struct dirent *pEntry; |
| 421 | Blob aContent; /* content of the just read artifact */ |
| 422 | if( g.argc!=4 ){ |
| 423 | usage("FILENAME DIRECTORY"); |
| 424 | } |
| 425 | if( file_isdir(g.argv[3])!=1 ){ |
| 426 | printf("\"%s\" is not a directory\n\n", g.argv[3]); |
| @@ -430,37 +467,99 @@ | |
| 430 | db_open_repository(g.argv[2]); |
| 431 | db_open_config(0); |
| 432 | db_begin_transaction(); |
| 433 | db_initial_setup(0, 0, 1); |
| 434 | |
| 435 | d = opendir(g.argv[3]); |
| 436 | if( d ){ |
| 437 | while( (pEntry=readdir(d))!=0 ){ |
| 438 | Blob path; |
| 439 | blob_init(&path, 0, 0); |
| 440 | if( pEntry->d_name[0]=='.' ){ |
| 441 | continue; |
| 442 | } |
| 443 | if( file_isdir(pEntry->d_name)==1 ){ |
| 444 | continue; |
| 445 | } |
| 446 | blob_appendf(&path, "%s/%s", g.argv[3], pEntry->d_name); |
| 447 | if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){ |
| 448 | fossil_panic("Some unknown error occurred while reading \"%s\"", blob_str(&path)); |
| 449 | } |
| 450 | content_put(&aContent, 0, 0); |
| 451 | blob_reset(&path); |
| 452 | blob_reset(&aContent); |
| 453 | } |
| 454 | } |
| 455 | else { |
| 456 | fossil_panic("Encountered error %d while trying to open \"%s\".", errno, g.argv[3]); |
| 457 | } |
| 458 | |
| 459 | rebuild_db(0, 1); |
| 460 | |
| 461 | db_end_transaction(0); |
| 462 | printf("project-id: %s\n", db_get("project-code", 0)); |
| 463 | printf("server-id: %s\n", db_get("server-code", 0)); |
| 464 | zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin); |
| 465 | printf("admin-user: %s (initial password is \"%s\")\n", g.zLogin, zPassword); |
| 466 | } |
| 467 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -401,26 +401,63 @@ | |
| 401 | }else{ |
| 402 | rebuild_db(0, 1); |
| 403 | db_end_transaction(0); |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | /* |
| 408 | ** help function for reconstruct for recursiv directory |
| 409 | ** reading. |
| 410 | */ |
| 411 | void recon_read_dir(char * zPath){ |
| 412 | DIR *d; |
| 413 | struct dirent *pEntry; |
| 414 | Blob aContent; /* content of the just read artifact */ |
| 415 | |
| 416 | d = opendir(zPath); |
| 417 | if( d ){ |
| 418 | while( (pEntry=readdir(d))!=0 ){ |
| 419 | Blob path; |
| 420 | char *zSubpath; |
| 421 | |
| 422 | if( pEntry->d_name[0]=='.' ){ |
| 423 | continue; |
| 424 | } |
| 425 | zSubpath = mprintf("%s/%s",zPath,pEntry->d_name); |
| 426 | if( file_isdir(zSubpath)==1 ){ |
| 427 | recon_read_dir(zSubpath); |
| 428 | } |
| 429 | blob_init(&path, 0, 0); |
| 430 | blob_appendf(&path, "%s", zSubpath); |
| 431 | if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){ |
| 432 | fossil_panic("some unknown error occurred while reading \"%s\"", |
| 433 | blob_str(&path)); |
| 434 | } |
| 435 | content_put(&aContent, 0, 0); |
| 436 | blob_reset(&path); |
| 437 | blob_reset(&aContent); |
| 438 | free(zSubpath); |
| 439 | } |
| 440 | }else { |
| 441 | fossil_panic("encountered error %d while trying to open \"%s\".", |
| 442 | errno, g.argv[3]); |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | /* |
| 447 | ** COMMAND: reconstruct |
| 448 | ** |
| 449 | ** Usage: %fossil reconstruct FILENAME DIRECTORY |
| 450 | ** |
| 451 | ** This command studies the artifacts (files) in DIRECTORY and |
| 452 | ** reconstructs the fossil record from them. It places the new |
| 453 | ** fossil repository in FILENAME. Subdirectories are read, files |
| 454 | ** with leading '.' in the filename are ignored. |
| 455 | ** |
| 456 | */ |
| 457 | void reconstruct_cmd(void) { |
| 458 | char *zPassword; |
| 459 | if( g.argc!=4 ){ |
| 460 | usage("FILENAME DIRECTORY"); |
| 461 | } |
| 462 | if( file_isdir(g.argv[3])!=1 ){ |
| 463 | printf("\"%s\" is not a directory\n\n", g.argv[3]); |
| @@ -430,37 +467,99 @@ | |
| 467 | db_open_repository(g.argv[2]); |
| 468 | db_open_config(0); |
| 469 | db_begin_transaction(); |
| 470 | db_initial_setup(0, 0, 1); |
| 471 | |
| 472 | recon_read_dir(g.argv[3]); |
| 473 | |
| 474 | rebuild_db(0, 1); |
| 475 | |
| 476 | db_end_transaction(0); |
| 477 | printf("project-id: %s\n", db_get("project-code", 0)); |
| 478 | printf("server-id: %s\n", db_get("server-code", 0)); |
| 479 | zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin); |
| 480 | printf("admin-user: %s (initial password is \"%s\")\n", g.zLogin, zPassword); |
| 481 | } |
| 482 | |
| 483 | /* |
| 484 | ** COMMAND: deconstruct |
| 485 | ** |
| 486 | ** Usage %fossil deconstruct ?-R|--repository REPOSITORY? ?-L|--prefixlength N? DESTINATION |
| 487 | ** |
| 488 | ** This command exports all artifacts of o given repository and |
| 489 | ** writes all artifacts to the file system. The DESTINATION directory |
| 490 | ** will be populated with subdirectories AA and files AA/BBBBBBBBB.., where |
| 491 | ** AABBBBBBBBB.. is the 40 character artifact ID, AA the first 2 characters. |
| 492 | ** If -L|--prefixlength is given, the length (default 2) of the directory |
| 493 | ** prefix can be set to 0,1,..,9 characters. |
| 494 | */ |
| 495 | void deconstruct_cmd(void){ |
| 496 | const char *zDestDir; |
| 497 | const char *zPrefixOpt; |
| 498 | int prefixLength = 0; |
| 499 | char *zAFileOutFormat; |
| 500 | Stmt q; |
| 501 | |
| 502 | /* check number of arguments */ |
| 503 | if( (g.argc != 3) && (g.argc != 5) && (g.argc != 7)){ |
| 504 | usage ("?-R|--repository REPOSITORY? ?-L|--prefixlength N? DESTINATION"); |
| 505 | } |
| 506 | /* get and check argument destination directory */ |
| 507 | zDestDir = g.argv[g.argc-1]; |
| 508 | if( !*zDestDir || !file_isdir(zDestDir)) { |
| 509 | fossil_panic("DESTINATION(%s) is not a directory!",zDestDir); |
| 510 | } |
| 511 | /* get and check prefix length argument and build format string */ |
| 512 | zPrefixOpt=find_option("prefixlength","L",1); |
| 513 | if( !zPrefixOpt ){ |
| 514 | prefixLength = 2; |
| 515 | }else{ |
| 516 | if( zPrefixOpt[0]>='0' && zPrefixOpt[0]<='9' && !zPrefixOpt[1] ){ |
| 517 | prefixLength = (int)(*zPrefixOpt-'0'); |
| 518 | }else{ |
| 519 | fossil_panic("N(%s) is not a a valid prefix length!",zPrefixOpt); |
| 520 | } |
| 521 | } |
| 522 | if( prefixLength ){ |
| 523 | zAFileOutFormat = mprintf("%%s/%%.%ds/%%s",prefixLength); |
| 524 | }else{ |
| 525 | zAFileOutFormat = mprintf("%%s/%%s"); |
| 526 | } |
| 527 | #ifndef _WIN32 |
| 528 | if( access(zDestDir, W_OK) ){ |
| 529 | fossil_panic("DESTINATION(%s) is not writeable!",zDestDir); |
| 530 | } |
| 531 | #else |
| 532 | /* write access on windows is not checked, errors will be |
| 533 | ** dected on blob_write_to_file |
| 534 | */ |
| 535 | #endif |
| 536 | /* open repository and open query for all artifacts */ |
| 537 | db_find_and_open_repository(1); |
| 538 | db_prepare(&q, "SELECT rid,uuid FROM blob"); |
| 539 | /* loop over artifacts and write them to single files */ |
| 540 | while( db_step(&q)==SQLITE_ROW ){ |
| 541 | int aRid; |
| 542 | const char *zAUuid; |
| 543 | char *zAFName; |
| 544 | Blob zACont; |
| 545 | |
| 546 | /* get data from query */ |
| 547 | aRid = db_column_int (&q, 0); |
| 548 | zAUuid = db_column_text(&q, 1); |
| 549 | |
| 550 | /* construct output filename */ |
| 551 | zAFName = mprintf(zAFileOutFormat, zDestDir, zAUuid, zAUuid + prefixLength); |
| 552 | |
| 553 | /* read artifact contents from db and write to file */ |
| 554 | content_get(aRid,&zACont); |
| 555 | blob_write_to_file(&zACont,zAFName); |
| 556 | blob_reset(&zACont); |
| 557 | |
| 558 | /* free artifact filename string */ |
| 559 | free(zAFName); |
| 560 | } |
| 561 | /* close query statement */ |
| 562 | db_finalize(&q); |
| 563 | /* free filename format string */ |
| 564 | free(zAFileOutFormat); |
| 565 | } |
| 566 |
+25
-25
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -328,11 +328,11 @@ | ||
| 328 | 328 | zTitle = db_text(0, "SELECT title FROM reportfmt " |
| 329 | 329 | "WHERE rn=%d", rn); |
| 330 | 330 | if( zTitle==0 ) cgi_redirect("reportlist"); |
| 331 | 331 | |
| 332 | 332 | style_header("Are You Sure?"); |
| 333 | - @ <form action="rptedit" method="POST"> | |
| 333 | + @ <form action="rptedit" method="post"> | |
| 334 | 334 | @ <p>You are about to delete all traces of the report |
| 335 | 335 | @ <strong>%h(zTitle)</strong> from |
| 336 | 336 | @ the database. This is an irreversible operation. All records |
| 337 | 337 | @ related to this report will be removed and cannot be recovered.</p> |
| 338 | 338 | @ |
| @@ -397,26 +397,26 @@ | ||
| 397 | 397 | if( rn>0 ){ |
| 398 | 398 | style_submenu_element("Delete", "Delete", "rptedit?rn=%d&del1=1", rn); |
| 399 | 399 | } |
| 400 | 400 | style_header(rn>0 ? "Edit Report Format":"Create New Report Format"); |
| 401 | 401 | if( zErr ){ |
| 402 | - @ <blockquote><font color="#ff0000"><b>%h(zErr)</b></font></blockquote> | |
| 402 | + @ <blockquote class="reportError">%h(zErr)</blockquote> | |
| 403 | 403 | } |
| 404 | - @ <form action="rptedit" method="POST"> | |
| 405 | - @ <input type="hidden" name="rn" value="%d(rn)"> | |
| 404 | + @ <form action="rptedit" method="post"><div> | |
| 405 | + @ <input type="hidden" name="rn" value="%d(rn)" /> | |
| 406 | 406 | @ <p>Report Title:<br /> |
| 407 | - @ <input type="text" name="t" value="%h(zTitle)" size="60"></p> | |
| 407 | + @ <input type="text" name="t" value="%h(zTitle)" size="60" /></p> | |
| 408 | 408 | @ <p>Enter a complete SQL query statement against the "TICKET" table:<br /> |
| 409 | 409 | @ <textarea name="s" rows="20" cols="80">%h(zSQL)</textarea> |
| 410 | 410 | @ </p> |
| 411 | 411 | login_insert_csrf_secret(); |
| 412 | 412 | if( g.okAdmin ){ |
| 413 | 413 | @ <p>Report owner: |
| 414 | - @ <input type="text" name="w" size="20" value="%h(zOwner)"> | |
| 414 | + @ <input type="text" name="w" size="20" value="%h(zOwner)" /> | |
| 415 | 415 | @ </p> |
| 416 | 416 | } else { |
| 417 | - @ <input type="hidden" name="w" value="%h(zOwner)"> | |
| 417 | + @ <input type="hidden" name="w" value="%h(zOwner)" /> | |
| 418 | 418 | } |
| 419 | 419 | @ <p>Enter an optional color key in the following box. (If blank, no |
| 420 | 420 | @ color key is displayed.) Each line contains the text for a single |
| 421 | 421 | @ entry in the key. The first token of each line is the background |
| 422 | 422 | @ color for that line.<br /> |
| @@ -428,15 +428,15 @@ | ||
| 428 | 428 | @ </form> |
| 429 | 429 | report_format_hints(); |
| 430 | 430 | style_footer(); |
| 431 | 431 | return; |
| 432 | 432 | } |
| 433 | - @ <input type="submit" value="Apply Changes"> | |
| 433 | + @ <input type="submit" value="Apply Changes" /> | |
| 434 | 434 | if( rn>0 ){ |
| 435 | - @ <input type="submit" value="Delete This Report" name="del1"> | |
| 435 | + @ <input type="submit" value="Delete This Report" name="del1" /> | |
| 436 | 436 | } |
| 437 | - @ </form> | |
| 437 | + @ </div></form> | |
| 438 | 438 | report_format_hints(); |
| 439 | 439 | style_footer(); |
| 440 | 440 | } |
| 441 | 441 | |
| 442 | 442 | /* |
| @@ -478,17 +478,17 @@ | ||
| 478 | 478 | @ <p>In this example, the first column in the result set is named |
| 479 | 479 | @ "bgcolor". The value of this column is not displayed. Instead, it |
| 480 | 480 | @ selects the background color of each row based on the TICKET.STATUS |
| 481 | 481 | @ field of the database. The color key at the right shows the various |
| 482 | 482 | @ color codes.</p> |
| 483 | - @ <table align="right" style="margin: 0 5px;" border=1 cellspacing=0 width=125> | |
| 484 | - @ <tr bgcolor="#f2dcdc"><td align="center">new or active</td></tr> | |
| 485 | - @ <tr bgcolor="#e8e8bd"><td align="center">review</td></tr> | |
| 486 | - @ <tr bgcolor="#cfe8bd"><td align="center">fixed</td></tr> | |
| 487 | - @ <tr bgcolor="#bde5d6"><td align="center">tested</td></tr> | |
| 488 | - @ <tr bgcolor="#cacae5"><td align="center">defer</td></tr> | |
| 489 | - @ <tr bgcolor="#c8c8c8"><td align="center">closed</td></tr> | |
| 483 | + @ <table class="rpteditex"> | |
| 484 | + @ <tr style="background-color:#f2dcdc;"><td class="rpteditex">new or active</td></tr> | |
| 485 | + @ <tr style="background-color:#e8e8bd;"><td class="rpteditex">review</td></tr> | |
| 486 | + @ <tr style="background-color:#cfe8bd;"><td class="rpteditex">fixed</td></tr> | |
| 487 | + @ <tr style="background-color:#bde5d6;"><td class="rpteditex">tested</td></tr> | |
| 488 | + @ <tr style="background-color:#cacae5;"><td class="rpteditex">defer</td></tr> | |
| 489 | + @ <tr style="background-color:#c8c8c8;"><td class="rpteditex">closed</td></tr> | |
| 490 | 490 | @ </table> |
| 491 | 491 | @ <blockquote><pre> |
| 492 | 492 | @ SELECT |
| 493 | 493 | @ CASE WHEN status IN ('new','active') THEN '#f2dcdc' |
| 494 | 494 | @ WHEN status='review' THEN '#e8e8bd' |
| @@ -510,16 +510,16 @@ | ||
| 510 | 510 | @ FROM ticket |
| 511 | 511 | @ </pre></blockquote> |
| 512 | 512 | @ <p>To base the background color on the TICKET.PRIORITY or |
| 513 | 513 | @ TICKET.SEVERITY fields, substitute the following code for the |
| 514 | 514 | @ first column of the query:</p> |
| 515 | - @ <table align="right" style="margin: 0 5px;" border=1 cellspacing=0 width=125> | |
| 516 | - @ <tr bgcolor="#f2dcdc"><td align="center">1</td></tr> | |
| 517 | - @ <tr bgcolor="#e8e8bd"><td align="center">2</td></tr> | |
| 518 | - @ <tr bgcolor="#cfe8bd"><td align="center">3</td></tr> | |
| 519 | - @ <tr bgcolor="#cacae5"><td align="center">4</td></tr> | |
| 520 | - @ <tr bgcolor="#c8c8c8"><td align="center">5</td></tr> | |
| 515 | + @ <table class="rpteditex"> | |
| 516 | + @ <tr style="background-color:#f2dcdc;"><td class="rpteditex">1</td></tr> | |
| 517 | + @ <tr style="background-color:#e8e8bd;"><td class="rpteditex">2</td></tr> | |
| 518 | + @ <tr style="background-color:#cfe8bd;"><td class="rpteditex">3</td></tr> | |
| 519 | + @ <tr style="background-color:#cacae5;"><td class="rpteditex">4</td></tr> | |
| 520 | + @ <tr style="background-color:#c8c8c8;"><td class="rpteditex">5</td></tr> | |
| 521 | 521 | @ </table> |
| 522 | 522 | @ <blockquote><pre> |
| 523 | 523 | @ SELECT |
| 524 | 524 | @ CASE priority WHEN 1 THEN '#f2dcdc' |
| 525 | 525 | @ WHEN 2 THEN '#e8e8bd' |
| @@ -930,17 +930,17 @@ | ||
| 930 | 930 | sqlite3_set_authorizer(g.db, report_query_authorizer, (void*)&zErr1); |
| 931 | 931 | sqlite3_exec(g.db, zSql, generate_html, &sState, &zErr2); |
| 932 | 932 | sqlite3_set_authorizer(g.db, 0, 0); |
| 933 | 933 | @ </table> |
| 934 | 934 | if( zErr1 ){ |
| 935 | - @ <p><font color="red"><b>Error: %h(zErr1)</b></font></p> | |
| 935 | + @ <p class="reportError">Error: %h(zErr1)</p> | |
| 936 | 936 | }else if( zErr2 ){ |
| 937 | - @ <p><font color="red"><b>Error: %h(zErr2)</b></font></p> | |
| 937 | + @ <p class="reportError">Error: %h(zErr2)</p> | |
| 938 | 938 | } |
| 939 | 939 | style_footer(); |
| 940 | 940 | }else{ |
| 941 | 941 | sqlite3_set_authorizer(g.db, report_query_authorizer, (void*)&zErr1); |
| 942 | 942 | sqlite3_exec(g.db, zSql, output_tab_separated, &count, &zErr2); |
| 943 | 943 | sqlite3_set_authorizer(g.db, 0, 0); |
| 944 | 944 | cgi_set_content_type("text/plain"); |
| 945 | 945 | } |
| 946 | 946 | } |
| 947 | 947 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -328,11 +328,11 @@ | |
| 328 | zTitle = db_text(0, "SELECT title FROM reportfmt " |
| 329 | "WHERE rn=%d", rn); |
| 330 | if( zTitle==0 ) cgi_redirect("reportlist"); |
| 331 | |
| 332 | style_header("Are You Sure?"); |
| 333 | @ <form action="rptedit" method="POST"> |
| 334 | @ <p>You are about to delete all traces of the report |
| 335 | @ <strong>%h(zTitle)</strong> from |
| 336 | @ the database. This is an irreversible operation. All records |
| 337 | @ related to this report will be removed and cannot be recovered.</p> |
| 338 | @ |
| @@ -397,26 +397,26 @@ | |
| 397 | if( rn>0 ){ |
| 398 | style_submenu_element("Delete", "Delete", "rptedit?rn=%d&del1=1", rn); |
| 399 | } |
| 400 | style_header(rn>0 ? "Edit Report Format":"Create New Report Format"); |
| 401 | if( zErr ){ |
| 402 | @ <blockquote><font color="#ff0000"><b>%h(zErr)</b></font></blockquote> |
| 403 | } |
| 404 | @ <form action="rptedit" method="POST"> |
| 405 | @ <input type="hidden" name="rn" value="%d(rn)"> |
| 406 | @ <p>Report Title:<br /> |
| 407 | @ <input type="text" name="t" value="%h(zTitle)" size="60"></p> |
| 408 | @ <p>Enter a complete SQL query statement against the "TICKET" table:<br /> |
| 409 | @ <textarea name="s" rows="20" cols="80">%h(zSQL)</textarea> |
| 410 | @ </p> |
| 411 | login_insert_csrf_secret(); |
| 412 | if( g.okAdmin ){ |
| 413 | @ <p>Report owner: |
| 414 | @ <input type="text" name="w" size="20" value="%h(zOwner)"> |
| 415 | @ </p> |
| 416 | } else { |
| 417 | @ <input type="hidden" name="w" value="%h(zOwner)"> |
| 418 | } |
| 419 | @ <p>Enter an optional color key in the following box. (If blank, no |
| 420 | @ color key is displayed.) Each line contains the text for a single |
| 421 | @ entry in the key. The first token of each line is the background |
| 422 | @ color for that line.<br /> |
| @@ -428,15 +428,15 @@ | |
| 428 | @ </form> |
| 429 | report_format_hints(); |
| 430 | style_footer(); |
| 431 | return; |
| 432 | } |
| 433 | @ <input type="submit" value="Apply Changes"> |
| 434 | if( rn>0 ){ |
| 435 | @ <input type="submit" value="Delete This Report" name="del1"> |
| 436 | } |
| 437 | @ </form> |
| 438 | report_format_hints(); |
| 439 | style_footer(); |
| 440 | } |
| 441 | |
| 442 | /* |
| @@ -478,17 +478,17 @@ | |
| 478 | @ <p>In this example, the first column in the result set is named |
| 479 | @ "bgcolor". The value of this column is not displayed. Instead, it |
| 480 | @ selects the background color of each row based on the TICKET.STATUS |
| 481 | @ field of the database. The color key at the right shows the various |
| 482 | @ color codes.</p> |
| 483 | @ <table align="right" style="margin: 0 5px;" border=1 cellspacing=0 width=125> |
| 484 | @ <tr bgcolor="#f2dcdc"><td align="center">new or active</td></tr> |
| 485 | @ <tr bgcolor="#e8e8bd"><td align="center">review</td></tr> |
| 486 | @ <tr bgcolor="#cfe8bd"><td align="center">fixed</td></tr> |
| 487 | @ <tr bgcolor="#bde5d6"><td align="center">tested</td></tr> |
| 488 | @ <tr bgcolor="#cacae5"><td align="center">defer</td></tr> |
| 489 | @ <tr bgcolor="#c8c8c8"><td align="center">closed</td></tr> |
| 490 | @ </table> |
| 491 | @ <blockquote><pre> |
| 492 | @ SELECT |
| 493 | @ CASE WHEN status IN ('new','active') THEN '#f2dcdc' |
| 494 | @ WHEN status='review' THEN '#e8e8bd' |
| @@ -510,16 +510,16 @@ | |
| 510 | @ FROM ticket |
| 511 | @ </pre></blockquote> |
| 512 | @ <p>To base the background color on the TICKET.PRIORITY or |
| 513 | @ TICKET.SEVERITY fields, substitute the following code for the |
| 514 | @ first column of the query:</p> |
| 515 | @ <table align="right" style="margin: 0 5px;" border=1 cellspacing=0 width=125> |
| 516 | @ <tr bgcolor="#f2dcdc"><td align="center">1</td></tr> |
| 517 | @ <tr bgcolor="#e8e8bd"><td align="center">2</td></tr> |
| 518 | @ <tr bgcolor="#cfe8bd"><td align="center">3</td></tr> |
| 519 | @ <tr bgcolor="#cacae5"><td align="center">4</td></tr> |
| 520 | @ <tr bgcolor="#c8c8c8"><td align="center">5</td></tr> |
| 521 | @ </table> |
| 522 | @ <blockquote><pre> |
| 523 | @ SELECT |
| 524 | @ CASE priority WHEN 1 THEN '#f2dcdc' |
| 525 | @ WHEN 2 THEN '#e8e8bd' |
| @@ -930,17 +930,17 @@ | |
| 930 | sqlite3_set_authorizer(g.db, report_query_authorizer, (void*)&zErr1); |
| 931 | sqlite3_exec(g.db, zSql, generate_html, &sState, &zErr2); |
| 932 | sqlite3_set_authorizer(g.db, 0, 0); |
| 933 | @ </table> |
| 934 | if( zErr1 ){ |
| 935 | @ <p><font color="red"><b>Error: %h(zErr1)</b></font></p> |
| 936 | }else if( zErr2 ){ |
| 937 | @ <p><font color="red"><b>Error: %h(zErr2)</b></font></p> |
| 938 | } |
| 939 | style_footer(); |
| 940 | }else{ |
| 941 | sqlite3_set_authorizer(g.db, report_query_authorizer, (void*)&zErr1); |
| 942 | sqlite3_exec(g.db, zSql, output_tab_separated, &count, &zErr2); |
| 943 | sqlite3_set_authorizer(g.db, 0, 0); |
| 944 | cgi_set_content_type("text/plain"); |
| 945 | } |
| 946 | } |
| 947 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -328,11 +328,11 @@ | |
| 328 | zTitle = db_text(0, "SELECT title FROM reportfmt " |
| 329 | "WHERE rn=%d", rn); |
| 330 | if( zTitle==0 ) cgi_redirect("reportlist"); |
| 331 | |
| 332 | style_header("Are You Sure?"); |
| 333 | @ <form action="rptedit" method="post"> |
| 334 | @ <p>You are about to delete all traces of the report |
| 335 | @ <strong>%h(zTitle)</strong> from |
| 336 | @ the database. This is an irreversible operation. All records |
| 337 | @ related to this report will be removed and cannot be recovered.</p> |
| 338 | @ |
| @@ -397,26 +397,26 @@ | |
| 397 | if( rn>0 ){ |
| 398 | style_submenu_element("Delete", "Delete", "rptedit?rn=%d&del1=1", rn); |
| 399 | } |
| 400 | style_header(rn>0 ? "Edit Report Format":"Create New Report Format"); |
| 401 | if( zErr ){ |
| 402 | @ <blockquote class="reportError">%h(zErr)</blockquote> |
| 403 | } |
| 404 | @ <form action="rptedit" method="post"><div> |
| 405 | @ <input type="hidden" name="rn" value="%d(rn)" /> |
| 406 | @ <p>Report Title:<br /> |
| 407 | @ <input type="text" name="t" value="%h(zTitle)" size="60" /></p> |
| 408 | @ <p>Enter a complete SQL query statement against the "TICKET" table:<br /> |
| 409 | @ <textarea name="s" rows="20" cols="80">%h(zSQL)</textarea> |
| 410 | @ </p> |
| 411 | login_insert_csrf_secret(); |
| 412 | if( g.okAdmin ){ |
| 413 | @ <p>Report owner: |
| 414 | @ <input type="text" name="w" size="20" value="%h(zOwner)" /> |
| 415 | @ </p> |
| 416 | } else { |
| 417 | @ <input type="hidden" name="w" value="%h(zOwner)" /> |
| 418 | } |
| 419 | @ <p>Enter an optional color key in the following box. (If blank, no |
| 420 | @ color key is displayed.) Each line contains the text for a single |
| 421 | @ entry in the key. The first token of each line is the background |
| 422 | @ color for that line.<br /> |
| @@ -428,15 +428,15 @@ | |
| 428 | @ </form> |
| 429 | report_format_hints(); |
| 430 | style_footer(); |
| 431 | return; |
| 432 | } |
| 433 | @ <input type="submit" value="Apply Changes" /> |
| 434 | if( rn>0 ){ |
| 435 | @ <input type="submit" value="Delete This Report" name="del1" /> |
| 436 | } |
| 437 | @ </div></form> |
| 438 | report_format_hints(); |
| 439 | style_footer(); |
| 440 | } |
| 441 | |
| 442 | /* |
| @@ -478,17 +478,17 @@ | |
| 478 | @ <p>In this example, the first column in the result set is named |
| 479 | @ "bgcolor". The value of this column is not displayed. Instead, it |
| 480 | @ selects the background color of each row based on the TICKET.STATUS |
| 481 | @ field of the database. The color key at the right shows the various |
| 482 | @ color codes.</p> |
| 483 | @ <table class="rpteditex"> |
| 484 | @ <tr style="background-color:#f2dcdc;"><td class="rpteditex">new or active</td></tr> |
| 485 | @ <tr style="background-color:#e8e8bd;"><td class="rpteditex">review</td></tr> |
| 486 | @ <tr style="background-color:#cfe8bd;"><td class="rpteditex">fixed</td></tr> |
| 487 | @ <tr style="background-color:#bde5d6;"><td class="rpteditex">tested</td></tr> |
| 488 | @ <tr style="background-color:#cacae5;"><td class="rpteditex">defer</td></tr> |
| 489 | @ <tr style="background-color:#c8c8c8;"><td class="rpteditex">closed</td></tr> |
| 490 | @ </table> |
| 491 | @ <blockquote><pre> |
| 492 | @ SELECT |
| 493 | @ CASE WHEN status IN ('new','active') THEN '#f2dcdc' |
| 494 | @ WHEN status='review' THEN '#e8e8bd' |
| @@ -510,16 +510,16 @@ | |
| 510 | @ FROM ticket |
| 511 | @ </pre></blockquote> |
| 512 | @ <p>To base the background color on the TICKET.PRIORITY or |
| 513 | @ TICKET.SEVERITY fields, substitute the following code for the |
| 514 | @ first column of the query:</p> |
| 515 | @ <table class="rpteditex"> |
| 516 | @ <tr style="background-color:#f2dcdc;"><td class="rpteditex">1</td></tr> |
| 517 | @ <tr style="background-color:#e8e8bd;"><td class="rpteditex">2</td></tr> |
| 518 | @ <tr style="background-color:#cfe8bd;"><td class="rpteditex">3</td></tr> |
| 519 | @ <tr style="background-color:#cacae5;"><td class="rpteditex">4</td></tr> |
| 520 | @ <tr style="background-color:#c8c8c8;"><td class="rpteditex">5</td></tr> |
| 521 | @ </table> |
| 522 | @ <blockquote><pre> |
| 523 | @ SELECT |
| 524 | @ CASE priority WHEN 1 THEN '#f2dcdc' |
| 525 | @ WHEN 2 THEN '#e8e8bd' |
| @@ -930,17 +930,17 @@ | |
| 930 | sqlite3_set_authorizer(g.db, report_query_authorizer, (void*)&zErr1); |
| 931 | sqlite3_exec(g.db, zSql, generate_html, &sState, &zErr2); |
| 932 | sqlite3_set_authorizer(g.db, 0, 0); |
| 933 | @ </table> |
| 934 | if( zErr1 ){ |
| 935 | @ <p class="reportError">Error: %h(zErr1)</p> |
| 936 | }else if( zErr2 ){ |
| 937 | @ <p class="reportError">Error: %h(zErr2)</p> |
| 938 | } |
| 939 | style_footer(); |
| 940 | }else{ |
| 941 | sqlite3_set_authorizer(g.db, report_query_authorizer, (void*)&zErr1); |
| 942 | sqlite3_exec(g.db, zSql, output_tab_separated, &count, &zErr2); |
| 943 | sqlite3_set_authorizer(g.db, 0, 0); |
| 944 | cgi_set_content_type("text/plain"); |
| 945 | } |
| 946 | } |
| 947 |
+6
-6
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -507,14 +507,14 @@ | ||
| 507 | 507 | @ </div></form> |
| 508 | 508 | @ </div> |
| 509 | 509 | @ <h2>Privileges And Capabilities:</h2> |
| 510 | 510 | @ <ul> |
| 511 | 511 | if( higherUser ){ |
| 512 | - @ <li><p><font color="blue"><b> | |
| 512 | + @ <li><p class=missingPriv"> | |
| 513 | 513 | @ User %h(zLogin) has Setup privileges and you only have Admin privileges |
| 514 | 514 | @ so you are not permitted to make changes to %h(zLogin). |
| 515 | - @ </b></font></p></li> | |
| 515 | + @ </p></li> | |
| 516 | 516 | @ |
| 517 | 517 | } |
| 518 | 518 | @ <li><p> |
| 519 | 519 | @ The <span class="capability">Setup</span> user can make arbitrary |
| 520 | 520 | @ configuration changes. An <span class="usertype">Admin</span> user |
| @@ -881,25 +881,25 @@ | ||
| 881 | 881 | pSet->var!=0 ? pSet->var : pSet->name, |
| 882 | 882 | pSet->def[0]=='1'); |
| 883 | 883 | @ <br /> |
| 884 | 884 | } |
| 885 | 885 | } |
| 886 | - @ </td><td width="30"></td><td valign="top"> | |
| 886 | + @ </td><td style="width: 30;"></td><td valign="top"> | |
| 887 | 887 | for(pSet=ctrlSettings; pSet->name!=0; pSet++){ |
| 888 | 888 | if( pSet->width!=0 ){ |
| 889 | 889 | entry_attribute(pSet->name, /*pSet->width*/ 40, pSet->name, |
| 890 | 890 | pSet->var!=0 ? pSet->var : pSet->name, |
| 891 | 891 | (char*)pSet->def); |
| 892 | 892 | @ <br /> |
| 893 | 893 | } |
| 894 | 894 | } |
| 895 | - @ </tr></table> | |
| 895 | + @ </td></tr></table> | |
| 896 | 896 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 897 | 897 | @ </div></form> |
| 898 | 898 | @ <hr /><p> |
| 899 | - @ These settings work in the same way, as the <kbd>set</kbd> commandline:<br> | |
| 900 | - @ <pre>%s(zHelp_setting_cmd)</pre></p> | |
| 899 | + @ These settings work in the same way, as the <kbd>set</kbd> commandline:<br /> | |
| 900 | + @ </p><pre>%s(zHelp_setting_cmd)</pre> | |
| 901 | 901 | db_end_transaction(0); |
| 902 | 902 | style_footer(); |
| 903 | 903 | } |
| 904 | 904 | |
| 905 | 905 | /* |
| 906 | 906 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -507,14 +507,14 @@ | |
| 507 | @ </div></form> |
| 508 | @ </div> |
| 509 | @ <h2>Privileges And Capabilities:</h2> |
| 510 | @ <ul> |
| 511 | if( higherUser ){ |
| 512 | @ <li><p><font color="blue"><b> |
| 513 | @ User %h(zLogin) has Setup privileges and you only have Admin privileges |
| 514 | @ so you are not permitted to make changes to %h(zLogin). |
| 515 | @ </b></font></p></li> |
| 516 | @ |
| 517 | } |
| 518 | @ <li><p> |
| 519 | @ The <span class="capability">Setup</span> user can make arbitrary |
| 520 | @ configuration changes. An <span class="usertype">Admin</span> user |
| @@ -881,25 +881,25 @@ | |
| 881 | pSet->var!=0 ? pSet->var : pSet->name, |
| 882 | pSet->def[0]=='1'); |
| 883 | @ <br /> |
| 884 | } |
| 885 | } |
| 886 | @ </td><td width="30"></td><td valign="top"> |
| 887 | for(pSet=ctrlSettings; pSet->name!=0; pSet++){ |
| 888 | if( pSet->width!=0 ){ |
| 889 | entry_attribute(pSet->name, /*pSet->width*/ 40, pSet->name, |
| 890 | pSet->var!=0 ? pSet->var : pSet->name, |
| 891 | (char*)pSet->def); |
| 892 | @ <br /> |
| 893 | } |
| 894 | } |
| 895 | @ </tr></table> |
| 896 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 897 | @ </div></form> |
| 898 | @ <hr /><p> |
| 899 | @ These settings work in the same way, as the <kbd>set</kbd> commandline:<br> |
| 900 | @ <pre>%s(zHelp_setting_cmd)</pre></p> |
| 901 | db_end_transaction(0); |
| 902 | style_footer(); |
| 903 | } |
| 904 | |
| 905 | /* |
| 906 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -507,14 +507,14 @@ | |
| 507 | @ </div></form> |
| 508 | @ </div> |
| 509 | @ <h2>Privileges And Capabilities:</h2> |
| 510 | @ <ul> |
| 511 | if( higherUser ){ |
| 512 | @ <li><p class=missingPriv"> |
| 513 | @ User %h(zLogin) has Setup privileges and you only have Admin privileges |
| 514 | @ so you are not permitted to make changes to %h(zLogin). |
| 515 | @ </p></li> |
| 516 | @ |
| 517 | } |
| 518 | @ <li><p> |
| 519 | @ The <span class="capability">Setup</span> user can make arbitrary |
| 520 | @ configuration changes. An <span class="usertype">Admin</span> user |
| @@ -881,25 +881,25 @@ | |
| 881 | pSet->var!=0 ? pSet->var : pSet->name, |
| 882 | pSet->def[0]=='1'); |
| 883 | @ <br /> |
| 884 | } |
| 885 | } |
| 886 | @ </td><td style="width: 30;"></td><td valign="top"> |
| 887 | for(pSet=ctrlSettings; pSet->name!=0; pSet++){ |
| 888 | if( pSet->width!=0 ){ |
| 889 | entry_attribute(pSet->name, /*pSet->width*/ 40, pSet->name, |
| 890 | pSet->var!=0 ? pSet->var : pSet->name, |
| 891 | (char*)pSet->def); |
| 892 | @ <br /> |
| 893 | } |
| 894 | } |
| 895 | @ </td></tr></table> |
| 896 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 897 | @ </div></form> |
| 898 | @ <hr /><p> |
| 899 | @ These settings work in the same way, as the <kbd>set</kbd> commandline:<br /> |
| 900 | @ </p><pre>%s(zHelp_setting_cmd)</pre> |
| 901 | db_end_transaction(0); |
| 902 | style_footer(); |
| 903 | } |
| 904 | |
| 905 | /* |
| 906 |
+6
-6
| --- src/shun.c | ||
| +++ src/shun.c | ||
| @@ -69,29 +69,29 @@ | ||
| 69 | 69 | style_header("Shunned Artifacts"); |
| 70 | 70 | if( zUuid && P("sub") ){ |
| 71 | 71 | login_verify_csrf_secret(); |
| 72 | 72 | db_multi_exec("DELETE FROM shun WHERE uuid='%s'", zUuid); |
| 73 | 73 | if( db_exists("SELECT 1 FROM blob WHERE uuid='%s'", zUuid) ){ |
| 74 | - @ <p><font color="blue">Artifact | |
| 74 | + @ <p class="noMoreShun">Artifact | |
| 75 | 75 | @ <a href="%s(g.zBaseURL)/artifact/%s(zUuid)">%s(zUuid)</a> is no |
| 76 | - @ longer being shunned.</font></p> | |
| 76 | + @ longer being shunned.</p> | |
| 77 | 77 | }else{ |
| 78 | - @ <p><font color="blue">Artifact %s(zUuid)</a> will no longer | |
| 78 | + @ <p class="noMoreShun">Artifact %s(zUuid) will no longer | |
| 79 | 79 | @ be shunned. But it does not exist in the repository. It |
| 80 | 80 | @ may be necessary to rebuild the repository using the |
| 81 | 81 | @ <b>fossil rebuild</b> command-line before the artifact content |
| 82 | - @ can pulled in from other respositories.</font></p> | |
| 82 | + @ can pulled in from other respositories.</p> | |
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | if( zUuid && P("add") ){ |
| 86 | 86 | login_verify_csrf_secret(); |
| 87 | 87 | db_multi_exec("INSERT OR IGNORE INTO shun VALUES('%s')", zUuid); |
| 88 | - @ <p><font color="blue">Artifact | |
| 88 | + @ <p class="shunned">Artifact | |
| 89 | 89 | @ <a href="%s(g.zBaseURL)/artifact/%s(zUuid)">%s(zUuid)</a> has been |
| 90 | 90 | @ shunned. It will no longer be pushed. |
| 91 | 91 | @ It will be removed from the repository the next time the respository |
| 92 | - @ is rebuilt using the <b>fossil rebuild</b> command-line</font></p> | |
| 92 | + @ is rebuilt using the <b>fossil rebuild</b> command-line</p> | |
| 93 | 93 | } |
| 94 | 94 | @ <p>A shunned artifact will not be pushed nor accepted in a pull and the |
| 95 | 95 | @ artifact content will be purged from the repository the next time the |
| 96 | 96 | @ repository is rebuilt. A list of shunned artifacts can be seen at the |
| 97 | 97 | @ bottom of this page.</p> |
| 98 | 98 |
| --- src/shun.c | |
| +++ src/shun.c | |
| @@ -69,29 +69,29 @@ | |
| 69 | style_header("Shunned Artifacts"); |
| 70 | if( zUuid && P("sub") ){ |
| 71 | login_verify_csrf_secret(); |
| 72 | db_multi_exec("DELETE FROM shun WHERE uuid='%s'", zUuid); |
| 73 | if( db_exists("SELECT 1 FROM blob WHERE uuid='%s'", zUuid) ){ |
| 74 | @ <p><font color="blue">Artifact |
| 75 | @ <a href="%s(g.zBaseURL)/artifact/%s(zUuid)">%s(zUuid)</a> is no |
| 76 | @ longer being shunned.</font></p> |
| 77 | }else{ |
| 78 | @ <p><font color="blue">Artifact %s(zUuid)</a> will no longer |
| 79 | @ be shunned. But it does not exist in the repository. It |
| 80 | @ may be necessary to rebuild the repository using the |
| 81 | @ <b>fossil rebuild</b> command-line before the artifact content |
| 82 | @ can pulled in from other respositories.</font></p> |
| 83 | } |
| 84 | } |
| 85 | if( zUuid && P("add") ){ |
| 86 | login_verify_csrf_secret(); |
| 87 | db_multi_exec("INSERT OR IGNORE INTO shun VALUES('%s')", zUuid); |
| 88 | @ <p><font color="blue">Artifact |
| 89 | @ <a href="%s(g.zBaseURL)/artifact/%s(zUuid)">%s(zUuid)</a> has been |
| 90 | @ shunned. It will no longer be pushed. |
| 91 | @ It will be removed from the repository the next time the respository |
| 92 | @ is rebuilt using the <b>fossil rebuild</b> command-line</font></p> |
| 93 | } |
| 94 | @ <p>A shunned artifact will not be pushed nor accepted in a pull and the |
| 95 | @ artifact content will be purged from the repository the next time the |
| 96 | @ repository is rebuilt. A list of shunned artifacts can be seen at the |
| 97 | @ bottom of this page.</p> |
| 98 |
| --- src/shun.c | |
| +++ src/shun.c | |
| @@ -69,29 +69,29 @@ | |
| 69 | style_header("Shunned Artifacts"); |
| 70 | if( zUuid && P("sub") ){ |
| 71 | login_verify_csrf_secret(); |
| 72 | db_multi_exec("DELETE FROM shun WHERE uuid='%s'", zUuid); |
| 73 | if( db_exists("SELECT 1 FROM blob WHERE uuid='%s'", zUuid) ){ |
| 74 | @ <p class="noMoreShun">Artifact |
| 75 | @ <a href="%s(g.zBaseURL)/artifact/%s(zUuid)">%s(zUuid)</a> is no |
| 76 | @ longer being shunned.</p> |
| 77 | }else{ |
| 78 | @ <p class="noMoreShun">Artifact %s(zUuid) will no longer |
| 79 | @ be shunned. But it does not exist in the repository. It |
| 80 | @ may be necessary to rebuild the repository using the |
| 81 | @ <b>fossil rebuild</b> command-line before the artifact content |
| 82 | @ can pulled in from other respositories.</p> |
| 83 | } |
| 84 | } |
| 85 | if( zUuid && P("add") ){ |
| 86 | login_verify_csrf_secret(); |
| 87 | db_multi_exec("INSERT OR IGNORE INTO shun VALUES('%s')", zUuid); |
| 88 | @ <p class="shunned">Artifact |
| 89 | @ <a href="%s(g.zBaseURL)/artifact/%s(zUuid)">%s(zUuid)</a> has been |
| 90 | @ shunned. It will no longer be pushed. |
| 91 | @ It will be removed from the repository the next time the respository |
| 92 | @ is rebuilt using the <b>fossil rebuild</b> command-line</p> |
| 93 | } |
| 94 | @ <p>A shunned artifact will not be pushed nor accepted in a pull and the |
| 95 | @ artifact content will be purged from the repository the next time the |
| 96 | @ repository is rebuilt. A list of shunned artifacts can be seen at the |
| 97 | @ bottom of this page.</p> |
| 98 |
+1
-1
| --- src/skins.c | ||
| +++ src/skins.c | ||
| @@ -830,11 +830,11 @@ | ||
| 830 | 830 | const char *zN = db_column_text(&q, 0); |
| 831 | 831 | const char *zV = db_column_text(&q, 1); |
| 832 | 832 | if( strcmp(zV, zCurrent)==0 ){ |
| 833 | 833 | @ <li><p>%h(zN). <b>Currently In Use</b></p> |
| 834 | 834 | }else{ |
| 835 | - @ <li><form action="%s(g.zBaseURL)/setup_skin" method="POST"> | |
| 835 | + @ <li><form action="%s(g.zBaseURL)/setup_skin" method="post"> | |
| 836 | 836 | @ %h(zN). |
| 837 | 837 | @ <input type="hidden" name="sn" value="%h(zN)"> |
| 838 | 838 | @ <input type="submit" name="load" value="Use This Skin"> |
| 839 | 839 | @ <input type="submit" name="del1" value="Delete This Skin"> |
| 840 | 840 | @ </form></li> |
| 841 | 841 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -830,11 +830,11 @@ | |
| 830 | const char *zN = db_column_text(&q, 0); |
| 831 | const char *zV = db_column_text(&q, 1); |
| 832 | if( strcmp(zV, zCurrent)==0 ){ |
| 833 | @ <li><p>%h(zN). <b>Currently In Use</b></p> |
| 834 | }else{ |
| 835 | @ <li><form action="%s(g.zBaseURL)/setup_skin" method="POST"> |
| 836 | @ %h(zN). |
| 837 | @ <input type="hidden" name="sn" value="%h(zN)"> |
| 838 | @ <input type="submit" name="load" value="Use This Skin"> |
| 839 | @ <input type="submit" name="del1" value="Delete This Skin"> |
| 840 | @ </form></li> |
| 841 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -830,11 +830,11 @@ | |
| 830 | const char *zN = db_column_text(&q, 0); |
| 831 | const char *zV = db_column_text(&q, 1); |
| 832 | if( strcmp(zV, zCurrent)==0 ){ |
| 833 | @ <li><p>%h(zN). <b>Currently In Use</b></p> |
| 834 | }else{ |
| 835 | @ <li><form action="%s(g.zBaseURL)/setup_skin" method="post"> |
| 836 | @ %h(zN). |
| 837 | @ <input type="hidden" name="sn" value="%h(zN)"> |
| 838 | @ <input type="submit" name="load" value="Use This Skin"> |
| 839 | @ <input type="submit" name="del1" value="Delete This Skin"> |
| 840 | @ </form></li> |
| 841 |
+89
-9
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -40,10 +40,15 @@ | ||
| 40 | 40 | ** Remember that the header has been generated. The footer is omitted |
| 41 | 41 | ** if an error occurs before the header. |
| 42 | 42 | */ |
| 43 | 43 | static int headerHasBeenGenerated = 0; |
| 44 | 44 | |
| 45 | +/* | |
| 46 | +** remember, if a sidebox was used | |
| 47 | +*/ | |
| 48 | +static int sideboxUsed = 0; | |
| 49 | + | |
| 45 | 50 | /* |
| 46 | 51 | ** Add a new element to the submenu |
| 47 | 52 | */ |
| 48 | 53 | void style_submenu_element( |
| 49 | 54 | const char *zLabel, |
| @@ -106,10 +111,11 @@ | ||
| 106 | 111 | if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1); |
| 107 | 112 | Th_Unstore("title"); /* Avoid collisions with ticket field names */ |
| 108 | 113 | cgi_destination(CGI_BODY); |
| 109 | 114 | g.cgiOutput = 1; |
| 110 | 115 | headerHasBeenGenerated = 1; |
| 116 | + sideboxUsed = 0; | |
| 111 | 117 | } |
| 112 | 118 | |
| 113 | 119 | /* |
| 114 | 120 | ** Draw the footer at the bottom of the page. |
| 115 | 121 | */ |
| @@ -138,35 +144,38 @@ | ||
| 138 | 144 | @ </div> |
| 139 | 145 | } |
| 140 | 146 | @ <div class="content"> |
| 141 | 147 | cgi_destination(CGI_BODY); |
| 142 | 148 | |
| 143 | - /* Put the footer at the bottom of the page. | |
| 144 | - ** the additional clear/both is needed to extend the content | |
| 145 | - ** part to the end of an optional sidebox. | |
| 146 | - */ | |
| 147 | - @ <div style="clear: both;"></div> | |
| 149 | + if (sideboxUsed) { | |
| 150 | + /* Put the footer at the bottom of the page. | |
| 151 | + ** the additional clear/both is needed to extend the content | |
| 152 | + ** part to the end of an optional sidebox. | |
| 153 | + */ | |
| 154 | + @ <div class="endContent"></div> | |
| 155 | + } | |
| 148 | 156 | @ </div> |
| 149 | 157 | zFooter = db_get("footer", (char*)zDefaultFooter); |
| 150 | 158 | if( g.thTrace ) Th_Trace("BEGIN_FOOTER<br />\n", -1); |
| 151 | 159 | Th_Render(zFooter); |
| 152 | 160 | if( g.thTrace ) Th_Trace("END_FOOTER<br />\n", -1); |
| 153 | 161 | |
| 154 | 162 | /* Render trace log if TH1 tracing is enabled. */ |
| 155 | 163 | if( g.thTrace ){ |
| 156 | - cgi_append_content("<font color=\"red\"><hr />\n", -1); | |
| 164 | + cgi_append_content("<span class=\"thTrace\"><hr />\n", -1); | |
| 157 | 165 | cgi_append_content(blob_str(&g.thLog), blob_size(&g.thLog)); |
| 158 | - cgi_append_content("</font>\n", -1); | |
| 166 | + cgi_append_content("</span>\n", -1); | |
| 159 | 167 | } |
| 160 | 168 | } |
| 161 | 169 | |
| 162 | 170 | /* |
| 163 | 171 | ** Begin a side-box on the right-hand side of a page. The title and |
| 164 | 172 | ** the width of the box are given as arguments. The width is usually |
| 165 | 173 | ** a percentage of total screen width. |
| 166 | 174 | */ |
| 167 | 175 | void style_sidebox_begin(const char *zTitle, const char *zWidth){ |
| 176 | + sideboxUsed = 1; | |
| 168 | 177 | @ <div class="sidebox" style="width:%s(zWidth)"> |
| 169 | 178 | @ <div class="sideboxTitle">%h(zTitle)</div> |
| 170 | 179 | } |
| 171 | 180 | |
| 172 | 181 | /* End the side-box |
| @@ -360,10 +369,11 @@ | ||
| 360 | 369 | @ white-space: nowrap; |
| 361 | 370 | @ } |
| 362 | 371 | @ |
| 363 | 372 | @ /* The footer at the very bottom of the page */ |
| 364 | 373 | @ div.footer { |
| 374 | +@ clear: both; | |
| 365 | 375 | @ font-size: 0.8em; |
| 366 | 376 | @ margin-top: 12px; |
| 367 | 377 | @ padding: 5px 10px 5px 10px; |
| 368 | 378 | @ text-align: right; |
| 369 | 379 | @ background-color: #558195; |
| @@ -521,13 +531,13 @@ | ||
| 521 | 531 | }, |
| 522 | 532 | { "table.captcha", |
| 523 | 533 | "format for the layout table, used for the captcha display", |
| 524 | 534 | @ margin: auto; |
| 525 | 535 | @ padding: 10px; |
| 526 | - @ border-width: 1; | |
| 536 | + @ border-width: 4px; | |
| 527 | 537 | @ border-style: double; |
| 528 | - @ bordor-color: black; | |
| 538 | + @ border-color: black; | |
| 529 | 539 | }, |
| 530 | 540 | { "td.login_out_label", |
| 531 | 541 | "format for the label cells in the login/out table", |
| 532 | 542 | @ text-align: center; |
| 533 | 543 | }, |
| @@ -629,10 +639,14 @@ | ||
| 629 | 639 | @ content:"'"; |
| 630 | 640 | }, |
| 631 | 641 | { "span.usertype:after", |
| 632 | 642 | "trailing text for user types, mentioned on the user edit page", |
| 633 | 643 | @ content:"'"; |
| 644 | + }, | |
| 645 | + { "p.missingPriv", | |
| 646 | + "format for missing priviliges note on user setup page", | |
| 647 | + @ color: blue; | |
| 634 | 648 | }, |
| 635 | 649 | { "span.wikiruleHead", |
| 636 | 650 | "format for leading text in wikirules definitions", |
| 637 | 651 | @ font-weight: bold; |
| 638 | 652 | }, |
| @@ -648,10 +662,76 @@ | ||
| 648 | 662 | }, |
| 649 | 663 | { "span.tktError", |
| 650 | 664 | "format for ticket error messages", |
| 651 | 665 | @ color: red; |
| 652 | 666 | @ font-weight: bold; |
| 667 | + }, | |
| 668 | + { "table.rpteditex", | |
| 669 | + "format for example tables on the report edit page", | |
| 670 | + @ float: right; | |
| 671 | + @ margin: 0; | |
| 672 | + @ padding: 0; | |
| 673 | + @ width: 125px; | |
| 674 | + @ text-align: center; | |
| 675 | + @ border-collapse: collapse; | |
| 676 | + @ border-spacing: 0; | |
| 677 | + }, | |
| 678 | + { "td.rpteditex", | |
| 679 | + "format for example table cells on the report edit page", | |
| 680 | + @ border-width: thin; | |
| 681 | + @ border-color: #000000; | |
| 682 | + @ border-style: solid; | |
| 683 | + }, | |
| 684 | + { "input.checkinUserColor", | |
| 685 | + "format for user color input on checkin edit page", | |
| 686 | + @ # no special definitions, class defined, to enable color pickers, f.e.: | |
| 687 | + @ # add the color picker found at http:jscolor.com as java script include | |
| 688 | + @ # to the header and configure the java script file with | |
| 689 | + @ # 1. use as bindClass :checkinUserColor | |
| 690 | + @ # 2. change the default hash adding behaviour to ON | |
| 691 | + @ # or change the class defition of element identified by id="clrcust" | |
| 692 | + @ # to a standard jscolor definition with java script in the footer. | |
| 693 | + }, | |
| 694 | + { "div.endContent", | |
| 695 | + "format for end of content area, to be used to clear page flow(sidebox on branch,..", | |
| 696 | + @ clear: both; | |
| 697 | + }, | |
| 698 | + { "p.generalError", | |
| 699 | + "format for general errors", | |
| 700 | + @ color: red; | |
| 701 | + }, | |
| 702 | + { "p.tktsetupError", | |
| 703 | + "format for tktsetup errors", | |
| 704 | + @ color: red; | |
| 705 | + @ font-weight: bold; | |
| 706 | + }, | |
| 707 | + { "p.thmainError", | |
| 708 | + "format for th script errors", | |
| 709 | + @ color: red; | |
| 710 | + @ font-weight: bold; | |
| 711 | + }, | |
| 712 | + { "span.thTrace", | |
| 713 | + "format for th script trace messages", | |
| 714 | + @ color: red; | |
| 715 | + }, | |
| 716 | + { "p:reportError", | |
| 717 | + "format for report configuration errors", | |
| 718 | + @ color: red; | |
| 719 | + @ font-weight: bold; | |
| 720 | + }, | |
| 721 | + { "blockquote.reportError", | |
| 722 | + "format for report configuration errors", | |
| 723 | + @ color: red; | |
| 724 | + @ font-weight: bold; | |
| 725 | + }, | |
| 726 | + { "p.noMoreShun", | |
| 727 | + "format for artifact lines, no longer shunned", | |
| 728 | + @ color: blue; | |
| 729 | + }, | |
| 730 | + { "p.shunned", | |
| 731 | + "format for artifact lines beeing shunned", | |
| 732 | + @ color: blue; | |
| 653 | 733 | }, |
| 654 | 734 | { 0, |
| 655 | 735 | 0, |
| 656 | 736 | 0 |
| 657 | 737 | } |
| 658 | 738 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -40,10 +40,15 @@ | |
| 40 | ** Remember that the header has been generated. The footer is omitted |
| 41 | ** if an error occurs before the header. |
| 42 | */ |
| 43 | static int headerHasBeenGenerated = 0; |
| 44 | |
| 45 | /* |
| 46 | ** Add a new element to the submenu |
| 47 | */ |
| 48 | void style_submenu_element( |
| 49 | const char *zLabel, |
| @@ -106,10 +111,11 @@ | |
| 106 | if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1); |
| 107 | Th_Unstore("title"); /* Avoid collisions with ticket field names */ |
| 108 | cgi_destination(CGI_BODY); |
| 109 | g.cgiOutput = 1; |
| 110 | headerHasBeenGenerated = 1; |
| 111 | } |
| 112 | |
| 113 | /* |
| 114 | ** Draw the footer at the bottom of the page. |
| 115 | */ |
| @@ -138,35 +144,38 @@ | |
| 138 | @ </div> |
| 139 | } |
| 140 | @ <div class="content"> |
| 141 | cgi_destination(CGI_BODY); |
| 142 | |
| 143 | /* Put the footer at the bottom of the page. |
| 144 | ** the additional clear/both is needed to extend the content |
| 145 | ** part to the end of an optional sidebox. |
| 146 | */ |
| 147 | @ <div style="clear: both;"></div> |
| 148 | @ </div> |
| 149 | zFooter = db_get("footer", (char*)zDefaultFooter); |
| 150 | if( g.thTrace ) Th_Trace("BEGIN_FOOTER<br />\n", -1); |
| 151 | Th_Render(zFooter); |
| 152 | if( g.thTrace ) Th_Trace("END_FOOTER<br />\n", -1); |
| 153 | |
| 154 | /* Render trace log if TH1 tracing is enabled. */ |
| 155 | if( g.thTrace ){ |
| 156 | cgi_append_content("<font color=\"red\"><hr />\n", -1); |
| 157 | cgi_append_content(blob_str(&g.thLog), blob_size(&g.thLog)); |
| 158 | cgi_append_content("</font>\n", -1); |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | /* |
| 163 | ** Begin a side-box on the right-hand side of a page. The title and |
| 164 | ** the width of the box are given as arguments. The width is usually |
| 165 | ** a percentage of total screen width. |
| 166 | */ |
| 167 | void style_sidebox_begin(const char *zTitle, const char *zWidth){ |
| 168 | @ <div class="sidebox" style="width:%s(zWidth)"> |
| 169 | @ <div class="sideboxTitle">%h(zTitle)</div> |
| 170 | } |
| 171 | |
| 172 | /* End the side-box |
| @@ -360,10 +369,11 @@ | |
| 360 | @ white-space: nowrap; |
| 361 | @ } |
| 362 | @ |
| 363 | @ /* The footer at the very bottom of the page */ |
| 364 | @ div.footer { |
| 365 | @ font-size: 0.8em; |
| 366 | @ margin-top: 12px; |
| 367 | @ padding: 5px 10px 5px 10px; |
| 368 | @ text-align: right; |
| 369 | @ background-color: #558195; |
| @@ -521,13 +531,13 @@ | |
| 521 | }, |
| 522 | { "table.captcha", |
| 523 | "format for the layout table, used for the captcha display", |
| 524 | @ margin: auto; |
| 525 | @ padding: 10px; |
| 526 | @ border-width: 1; |
| 527 | @ border-style: double; |
| 528 | @ bordor-color: black; |
| 529 | }, |
| 530 | { "td.login_out_label", |
| 531 | "format for the label cells in the login/out table", |
| 532 | @ text-align: center; |
| 533 | }, |
| @@ -629,10 +639,14 @@ | |
| 629 | @ content:"'"; |
| 630 | }, |
| 631 | { "span.usertype:after", |
| 632 | "trailing text for user types, mentioned on the user edit page", |
| 633 | @ content:"'"; |
| 634 | }, |
| 635 | { "span.wikiruleHead", |
| 636 | "format for leading text in wikirules definitions", |
| 637 | @ font-weight: bold; |
| 638 | }, |
| @@ -648,10 +662,76 @@ | |
| 648 | }, |
| 649 | { "span.tktError", |
| 650 | "format for ticket error messages", |
| 651 | @ color: red; |
| 652 | @ font-weight: bold; |
| 653 | }, |
| 654 | { 0, |
| 655 | 0, |
| 656 | 0 |
| 657 | } |
| 658 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -40,10 +40,15 @@ | |
| 40 | ** Remember that the header has been generated. The footer is omitted |
| 41 | ** if an error occurs before the header. |
| 42 | */ |
| 43 | static int headerHasBeenGenerated = 0; |
| 44 | |
| 45 | /* |
| 46 | ** remember, if a sidebox was used |
| 47 | */ |
| 48 | static int sideboxUsed = 0; |
| 49 | |
| 50 | /* |
| 51 | ** Add a new element to the submenu |
| 52 | */ |
| 53 | void style_submenu_element( |
| 54 | const char *zLabel, |
| @@ -106,10 +111,11 @@ | |
| 111 | if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1); |
| 112 | Th_Unstore("title"); /* Avoid collisions with ticket field names */ |
| 113 | cgi_destination(CGI_BODY); |
| 114 | g.cgiOutput = 1; |
| 115 | headerHasBeenGenerated = 1; |
| 116 | sideboxUsed = 0; |
| 117 | } |
| 118 | |
| 119 | /* |
| 120 | ** Draw the footer at the bottom of the page. |
| 121 | */ |
| @@ -138,35 +144,38 @@ | |
| 144 | @ </div> |
| 145 | } |
| 146 | @ <div class="content"> |
| 147 | cgi_destination(CGI_BODY); |
| 148 | |
| 149 | if (sideboxUsed) { |
| 150 | /* Put the footer at the bottom of the page. |
| 151 | ** the additional clear/both is needed to extend the content |
| 152 | ** part to the end of an optional sidebox. |
| 153 | */ |
| 154 | @ <div class="endContent"></div> |
| 155 | } |
| 156 | @ </div> |
| 157 | zFooter = db_get("footer", (char*)zDefaultFooter); |
| 158 | if( g.thTrace ) Th_Trace("BEGIN_FOOTER<br />\n", -1); |
| 159 | Th_Render(zFooter); |
| 160 | if( g.thTrace ) Th_Trace("END_FOOTER<br />\n", -1); |
| 161 | |
| 162 | /* Render trace log if TH1 tracing is enabled. */ |
| 163 | if( g.thTrace ){ |
| 164 | cgi_append_content("<span class=\"thTrace\"><hr />\n", -1); |
| 165 | cgi_append_content(blob_str(&g.thLog), blob_size(&g.thLog)); |
| 166 | cgi_append_content("</span>\n", -1); |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | /* |
| 171 | ** Begin a side-box on the right-hand side of a page. The title and |
| 172 | ** the width of the box are given as arguments. The width is usually |
| 173 | ** a percentage of total screen width. |
| 174 | */ |
| 175 | void style_sidebox_begin(const char *zTitle, const char *zWidth){ |
| 176 | sideboxUsed = 1; |
| 177 | @ <div class="sidebox" style="width:%s(zWidth)"> |
| 178 | @ <div class="sideboxTitle">%h(zTitle)</div> |
| 179 | } |
| 180 | |
| 181 | /* End the side-box |
| @@ -360,10 +369,11 @@ | |
| 369 | @ white-space: nowrap; |
| 370 | @ } |
| 371 | @ |
| 372 | @ /* The footer at the very bottom of the page */ |
| 373 | @ div.footer { |
| 374 | @ clear: both; |
| 375 | @ font-size: 0.8em; |
| 376 | @ margin-top: 12px; |
| 377 | @ padding: 5px 10px 5px 10px; |
| 378 | @ text-align: right; |
| 379 | @ background-color: #558195; |
| @@ -521,13 +531,13 @@ | |
| 531 | }, |
| 532 | { "table.captcha", |
| 533 | "format for the layout table, used for the captcha display", |
| 534 | @ margin: auto; |
| 535 | @ padding: 10px; |
| 536 | @ border-width: 4px; |
| 537 | @ border-style: double; |
| 538 | @ border-color: black; |
| 539 | }, |
| 540 | { "td.login_out_label", |
| 541 | "format for the label cells in the login/out table", |
| 542 | @ text-align: center; |
| 543 | }, |
| @@ -629,10 +639,14 @@ | |
| 639 | @ content:"'"; |
| 640 | }, |
| 641 | { "span.usertype:after", |
| 642 | "trailing text for user types, mentioned on the user edit page", |
| 643 | @ content:"'"; |
| 644 | }, |
| 645 | { "p.missingPriv", |
| 646 | "format for missing priviliges note on user setup page", |
| 647 | @ color: blue; |
| 648 | }, |
| 649 | { "span.wikiruleHead", |
| 650 | "format for leading text in wikirules definitions", |
| 651 | @ font-weight: bold; |
| 652 | }, |
| @@ -648,10 +662,76 @@ | |
| 662 | }, |
| 663 | { "span.tktError", |
| 664 | "format for ticket error messages", |
| 665 | @ color: red; |
| 666 | @ font-weight: bold; |
| 667 | }, |
| 668 | { "table.rpteditex", |
| 669 | "format for example tables on the report edit page", |
| 670 | @ float: right; |
| 671 | @ margin: 0; |
| 672 | @ padding: 0; |
| 673 | @ width: 125px; |
| 674 | @ text-align: center; |
| 675 | @ border-collapse: collapse; |
| 676 | @ border-spacing: 0; |
| 677 | }, |
| 678 | { "td.rpteditex", |
| 679 | "format for example table cells on the report edit page", |
| 680 | @ border-width: thin; |
| 681 | @ border-color: #000000; |
| 682 | @ border-style: solid; |
| 683 | }, |
| 684 | { "input.checkinUserColor", |
| 685 | "format for user color input on checkin edit page", |
| 686 | @ # no special definitions, class defined, to enable color pickers, f.e.: |
| 687 | @ # add the color picker found at http:jscolor.com as java script include |
| 688 | @ # to the header and configure the java script file with |
| 689 | @ # 1. use as bindClass :checkinUserColor |
| 690 | @ # 2. change the default hash adding behaviour to ON |
| 691 | @ # or change the class defition of element identified by id="clrcust" |
| 692 | @ # to a standard jscolor definition with java script in the footer. |
| 693 | }, |
| 694 | { "div.endContent", |
| 695 | "format for end of content area, to be used to clear page flow(sidebox on branch,..", |
| 696 | @ clear: both; |
| 697 | }, |
| 698 | { "p.generalError", |
| 699 | "format for general errors", |
| 700 | @ color: red; |
| 701 | }, |
| 702 | { "p.tktsetupError", |
| 703 | "format for tktsetup errors", |
| 704 | @ color: red; |
| 705 | @ font-weight: bold; |
| 706 | }, |
| 707 | { "p.thmainError", |
| 708 | "format for th script errors", |
| 709 | @ color: red; |
| 710 | @ font-weight: bold; |
| 711 | }, |
| 712 | { "span.thTrace", |
| 713 | "format for th script trace messages", |
| 714 | @ color: red; |
| 715 | }, |
| 716 | { "p:reportError", |
| 717 | "format for report configuration errors", |
| 718 | @ color: red; |
| 719 | @ font-weight: bold; |
| 720 | }, |
| 721 | { "blockquote.reportError", |
| 722 | "format for report configuration errors", |
| 723 | @ color: red; |
| 724 | @ font-weight: bold; |
| 725 | }, |
| 726 | { "p.noMoreShun", |
| 727 | "format for artifact lines, no longer shunned", |
| 728 | @ color: blue; |
| 729 | }, |
| 730 | { "p.shunned", |
| 731 | "format for artifact lines beeing shunned", |
| 732 | @ color: blue; |
| 733 | }, |
| 734 | { 0, |
| 735 | 0, |
| 736 | 0 |
| 737 | } |
| 738 |
+2
-2
| --- src/th_main.c | ||
| +++ src/th_main.c | ||
| @@ -504,14 +504,14 @@ | ||
| 504 | 504 | }else{ |
| 505 | 505 | i++; |
| 506 | 506 | } |
| 507 | 507 | } |
| 508 | 508 | if( rc==TH_ERROR ){ |
| 509 | - sendText("<hr><p><font color=\"red\"><b>ERROR: ", -1, 0); | |
| 509 | + sendText("<hr><p class=\"thmainError\">ERROR: ", -1, 0); | |
| 510 | 510 | zResult = (char*)Th_GetResult(g.interp, &n); |
| 511 | 511 | sendText((char*)zResult, n, 1); |
| 512 | - sendText("</b></font></p>", -1, 0); | |
| 512 | + sendText("</p>", -1, 0); | |
| 513 | 513 | }else{ |
| 514 | 514 | sendText(z, i, 0); |
| 515 | 515 | } |
| 516 | 516 | return rc; |
| 517 | 517 | } |
| 518 | 518 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -504,14 +504,14 @@ | |
| 504 | }else{ |
| 505 | i++; |
| 506 | } |
| 507 | } |
| 508 | if( rc==TH_ERROR ){ |
| 509 | sendText("<hr><p><font color=\"red\"><b>ERROR: ", -1, 0); |
| 510 | zResult = (char*)Th_GetResult(g.interp, &n); |
| 511 | sendText((char*)zResult, n, 1); |
| 512 | sendText("</b></font></p>", -1, 0); |
| 513 | }else{ |
| 514 | sendText(z, i, 0); |
| 515 | } |
| 516 | return rc; |
| 517 | } |
| 518 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -504,14 +504,14 @@ | |
| 504 | }else{ |
| 505 | i++; |
| 506 | } |
| 507 | } |
| 508 | if( rc==TH_ERROR ){ |
| 509 | sendText("<hr><p class=\"thmainError\">ERROR: ", -1, 0); |
| 510 | zResult = (char*)Th_GetResult(g.interp, &n); |
| 511 | sendText((char*)zResult, n, 1); |
| 512 | sendText("</p>", -1, 0); |
| 513 | }else{ |
| 514 | sendText(z, i, 0); |
| 515 | } |
| 516 | return rc; |
| 517 | } |
| 518 |
+1
-1
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -567,11 +567,11 @@ | ||
| 567 | 567 | @ <span class="tktError">No such ticket: \"%h(zName)\"</span> |
| 568 | 568 | style_footer(); |
| 569 | 569 | return; |
| 570 | 570 | } |
| 571 | 571 | if( nRec>1 ){ |
| 572 | - @ <span class="tktError"><b>%d(nRec) tickets begin with: | |
| 572 | + @ <span class="tktError">%d(nRec) tickets begin with: | |
| 573 | 573 | @ \"%h(zName)\"</span> |
| 574 | 574 | style_footer(); |
| 575 | 575 | return; |
| 576 | 576 | } |
| 577 | 577 | if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1); |
| 578 | 578 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -567,11 +567,11 @@ | |
| 567 | @ <span class="tktError">No such ticket: \"%h(zName)\"</span> |
| 568 | style_footer(); |
| 569 | return; |
| 570 | } |
| 571 | if( nRec>1 ){ |
| 572 | @ <span class="tktError"><b>%d(nRec) tickets begin with: |
| 573 | @ \"%h(zName)\"</span> |
| 574 | style_footer(); |
| 575 | return; |
| 576 | } |
| 577 | if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1); |
| 578 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -567,11 +567,11 @@ | |
| 567 | @ <span class="tktError">No such ticket: \"%h(zName)\"</span> |
| 568 | style_footer(); |
| 569 | return; |
| 570 | } |
| 571 | if( nRec>1 ){ |
| 572 | @ <span class="tktError">%d(nRec) tickets begin with: |
| 573 | @ \"%h(zName)\"</span> |
| 574 | style_footer(); |
| 575 | return; |
| 576 | } |
| 577 | if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT<br />\n", -1); |
| 578 |
+1
-1
| --- src/tktsetup.c | ||
| +++ src/tktsetup.c | ||
| @@ -123,11 +123,11 @@ | ||
| 123 | 123 | z = zDfltValue; |
| 124 | 124 | }else if( isSubmit ){ |
| 125 | 125 | char *zErr = 0; |
| 126 | 126 | login_verify_csrf_secret(); |
| 127 | 127 | if( xText && (zErr = xText(z))!=0 ){ |
| 128 | - @ <p><font color="red"><b>ERROR: %h(zErr)</b></font></p> | |
| 128 | + @ <p class="tktsetupError">ERROR: %h(zErr)</p> | |
| 129 | 129 | }else{ |
| 130 | 130 | db_set(zDbField, z, 0); |
| 131 | 131 | if( xRebuild ) xRebuild(); |
| 132 | 132 | cgi_redirect("tktsetup"); |
| 133 | 133 | } |
| 134 | 134 |
| --- src/tktsetup.c | |
| +++ src/tktsetup.c | |
| @@ -123,11 +123,11 @@ | |
| 123 | z = zDfltValue; |
| 124 | }else if( isSubmit ){ |
| 125 | char *zErr = 0; |
| 126 | login_verify_csrf_secret(); |
| 127 | if( xText && (zErr = xText(z))!=0 ){ |
| 128 | @ <p><font color="red"><b>ERROR: %h(zErr)</b></font></p> |
| 129 | }else{ |
| 130 | db_set(zDbField, z, 0); |
| 131 | if( xRebuild ) xRebuild(); |
| 132 | cgi_redirect("tktsetup"); |
| 133 | } |
| 134 |
| --- src/tktsetup.c | |
| +++ src/tktsetup.c | |
| @@ -123,11 +123,11 @@ | |
| 123 | z = zDfltValue; |
| 124 | }else if( isSubmit ){ |
| 125 | char *zErr = 0; |
| 126 | login_verify_csrf_secret(); |
| 127 | if( xText && (zErr = xText(z))!=0 ){ |
| 128 | @ <p class="tktsetupError">ERROR: %h(zErr)</p> |
| 129 | }else{ |
| 130 | db_set(zDbField, z, 0); |
| 131 | if( xRebuild ) xRebuild(); |
| 132 | cgi_redirect("tktsetup"); |
| 133 | } |
| 134 |
+6
-6
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -533,22 +533,22 @@ | ||
| 533 | 533 | wiki_convert(&preview, 0, 0); |
| 534 | 534 | @ <hr> |
| 535 | 535 | blob_reset(&preview); |
| 536 | 536 | } |
| 537 | 537 | zUser = PD("u", g.zLogin); |
| 538 | - @ <form method="POST" action="%s(g.zBaseURL)/wikiappend"> | |
| 538 | + @ <form method="post" action="%s(g.zBaseURL)/wikiappend"> | |
| 539 | 539 | login_insert_csrf_secret(); |
| 540 | - @ <input type="hidden" name="name" value="%h(zPageName)"> | |
| 540 | + @ <input type="hidden" name="name" value="%h(zPageName)" /> | |
| 541 | 541 | @ Your Name: |
| 542 | - @ <input type="text" name="u" size="20" value="%h(zUser)"><br /> | |
| 542 | + @ <input type="text" name="u" size="20" value="%h(zUser)" /><br /> | |
| 543 | 543 | @ Comment to append:<br /> |
| 544 | 544 | @ <textarea name="r" class="wikiedit" cols="80" |
| 545 | 545 | @ rows="10" wrap="virtual">%h(PD("r",""))</textarea> |
| 546 | 546 | @ <br /> |
| 547 | - @ <input type="submit" name="preview" value="Preview Your Comment"> | |
| 548 | - @ <input type="submit" name="submit" value="Append Your Changes"> | |
| 549 | - @ <input type="submit" name="cancel" value="Cancel"> | |
| 547 | + @ <input type="submit" name="preview" value="Preview Your Comment" /> | |
| 548 | + @ <input type="submit" name="submit" value="Append Your Changes" /> | |
| 549 | + @ <input type="submit" name="cancel" value="Cancel" /> | |
| 550 | 550 | @ </form> |
| 551 | 551 | style_footer(); |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | /* |
| 555 | 555 | |
| 556 | 556 | ADDED win/Makefile.PellesCGMake |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -533,22 +533,22 @@ | |
| 533 | wiki_convert(&preview, 0, 0); |
| 534 | @ <hr> |
| 535 | blob_reset(&preview); |
| 536 | } |
| 537 | zUser = PD("u", g.zLogin); |
| 538 | @ <form method="POST" action="%s(g.zBaseURL)/wikiappend"> |
| 539 | login_insert_csrf_secret(); |
| 540 | @ <input type="hidden" name="name" value="%h(zPageName)"> |
| 541 | @ Your Name: |
| 542 | @ <input type="text" name="u" size="20" value="%h(zUser)"><br /> |
| 543 | @ Comment to append:<br /> |
| 544 | @ <textarea name="r" class="wikiedit" cols="80" |
| 545 | @ rows="10" wrap="virtual">%h(PD("r",""))</textarea> |
| 546 | @ <br /> |
| 547 | @ <input type="submit" name="preview" value="Preview Your Comment"> |
| 548 | @ <input type="submit" name="submit" value="Append Your Changes"> |
| 549 | @ <input type="submit" name="cancel" value="Cancel"> |
| 550 | @ </form> |
| 551 | style_footer(); |
| 552 | } |
| 553 | |
| 554 | /* |
| 555 | |
| 556 | DDED win/Makefile.PellesCGMake |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -533,22 +533,22 @@ | |
| 533 | wiki_convert(&preview, 0, 0); |
| 534 | @ <hr> |
| 535 | blob_reset(&preview); |
| 536 | } |
| 537 | zUser = PD("u", g.zLogin); |
| 538 | @ <form method="post" action="%s(g.zBaseURL)/wikiappend"> |
| 539 | login_insert_csrf_secret(); |
| 540 | @ <input type="hidden" name="name" value="%h(zPageName)" /> |
| 541 | @ Your Name: |
| 542 | @ <input type="text" name="u" size="20" value="%h(zUser)" /><br /> |
| 543 | @ Comment to append:<br /> |
| 544 | @ <textarea name="r" class="wikiedit" cols="80" |
| 545 | @ rows="10" wrap="virtual">%h(PD("r",""))</textarea> |
| 546 | @ <br /> |
| 547 | @ <input type="submit" name="preview" value="Preview Your Comment" /> |
| 548 | @ <input type="submit" name="submit" value="Append Your Changes" /> |
| 549 | @ <input type="submit" name="cancel" value="Cancel" /> |
| 550 | @ </form> |
| 551 | style_footer(); |
| 552 | } |
| 553 | |
| 554 | /* |
| 555 | |
| 556 | DDED win/Makefile.PellesCGMake |
| --- a/win/Makefile.PellesCGMake | ||
| +++ b/win/Makefile.PellesCGMake | ||
| @@ -0,0 +1,81 @@ | ||
| 1 | +# LITE3.h ../src/jim.h VERSION.h | |
| 2 | + -DSQLITE_ENABjim | |
| 3 | +# | |
| 4 | +# HowTo | |
| 5 | +# ----- | |
| 6 | +# | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | +# =sqlite3DEFINES=C# LITE3.h ../src/jim.hh VERSION.h | |
| 13 | + -DSQLITE_ENABjim | |
| 14 | +# | |
| 15 | +# HowTo | |
| 16 | +# ----- | |
| 17 | +# | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | +# =sqlite3DEFC | |
| 24 | +SRC=add.c allrepo.c attach.c bag.c blob.c branch.c browse.c captcha.c cgi.c checkin.c checkout.c clearsign.c clone.c comformat.c configure.c content.c db.c delta.c deltacmd.c descendants.c diff.c diffcmd.c doc.c encode.c file.c finfo.c graph.c http.c http_socket.c http_ssl.c http_transport.c info.c login.c main.c manifest.c md5.c merge.c merge3.c name.c pivot.c popen.c pqueue.c printf.c rebuild.c report.c rss.c schema.c search.c setup.c sha1.c shun.c skins.c stat.c style.c sync.c tag.c th_main.c timeline.c tkt.c tktsetup.c undo.c update.c url.c user.c verify.c vfile.c wiki.c wikiformat.c winhttp.c xfer.c zip.c | |
| 25 | +ORIGSRC=$(foreach sf,$(m.h VERSION.h | |
| 26 | + -DSQLITE_ENABjim | |
| 27 | +# | |
| 28 | +# HowTo | |
| 29 | +# ----- | |
| 30 | +# | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | +# =sqlite3DEFINES=C# LITE3# LITE3.h ../src/jim.h VERSION.h | |
| 37 | + -DSQLITE_ENABjim | |
| 38 | +# | |
| 39 | +# HowTo | |
| 40 | +# ----- | |
| 41 | +# | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | +# =sqlite3DEFINES=C# LITE3.h ../src/jim.hh VERSION.h | |
| 48 | + -DSQLITE_ENABjim | |
| 49 | +# | |
| 50 | +# HowTo | |
| 51 | +# ----- | |
| 52 | +# | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | +# =sqlite3DEF$(UTILS) | |
| 59 | +# | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | +# =sqlite3DEFINES=C# LITE3.h ../src/jim.hh VERSION.h | |
| 66 | + -DSQLITE_EN# LITE3.h ../src/jim.h VERSION.h | |
| 67 | + -DSQLITE_ENABjim | |
| 68 | +# | |
| 69 | +# HowTo | |
| 70 | +# ----- | |
| 71 | +# | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | +# LITE3.h ../src/jim versionh@12T,1E@15T,1d@1F8,3L@1IY,5g@1No,1E@1Vc,2t@1YS,3Z@1bl,1q68LG; | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | +# =sqlite3DEFINES=C# LITE3E:/fossil-w32LITE3.h .. |
| --- a/win/Makefile.PellesCGMake | |
| +++ b/win/Makefile.PellesCGMake | |
| @@ -0,0 +1,81 @@ | |
| --- a/win/Makefile.PellesCGMake | |
| +++ b/win/Makefile.PellesCGMake | |
| @@ -0,0 +1,81 @@ | |
| 1 | # LITE3.h ../src/jim.h VERSION.h |
| 2 | -DSQLITE_ENABjim |
| 3 | # |
| 4 | # HowTo |
| 5 | # ----- |
| 6 | # |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | # =sqlite3DEFINES=C# LITE3.h ../src/jim.hh VERSION.h |
| 13 | -DSQLITE_ENABjim |
| 14 | # |
| 15 | # HowTo |
| 16 | # ----- |
| 17 | # |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | # =sqlite3DEFC |
| 24 | SRC=add.c allrepo.c attach.c bag.c blob.c branch.c browse.c captcha.c cgi.c checkin.c checkout.c clearsign.c clone.c comformat.c configure.c content.c db.c delta.c deltacmd.c descendants.c diff.c diffcmd.c doc.c encode.c file.c finfo.c graph.c http.c http_socket.c http_ssl.c http_transport.c info.c login.c main.c manifest.c md5.c merge.c merge3.c name.c pivot.c popen.c pqueue.c printf.c rebuild.c report.c rss.c schema.c search.c setup.c sha1.c shun.c skins.c stat.c style.c sync.c tag.c th_main.c timeline.c tkt.c tktsetup.c undo.c update.c url.c user.c verify.c vfile.c wiki.c wikiformat.c winhttp.c xfer.c zip.c |
| 25 | ORIGSRC=$(foreach sf,$(m.h VERSION.h |
| 26 | -DSQLITE_ENABjim |
| 27 | # |
| 28 | # HowTo |
| 29 | # ----- |
| 30 | # |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | # =sqlite3DEFINES=C# LITE3# LITE3.h ../src/jim.h VERSION.h |
| 37 | -DSQLITE_ENABjim |
| 38 | # |
| 39 | # HowTo |
| 40 | # ----- |
| 41 | # |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | # =sqlite3DEFINES=C# LITE3.h ../src/jim.hh VERSION.h |
| 48 | -DSQLITE_ENABjim |
| 49 | # |
| 50 | # HowTo |
| 51 | # ----- |
| 52 | # |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | # =sqlite3DEF$(UTILS) |
| 59 | # |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | # =sqlite3DEFINES=C# LITE3.h ../src/jim.hh VERSION.h |
| 66 | -DSQLITE_EN# LITE3.h ../src/jim.h VERSION.h |
| 67 | -DSQLITE_ENABjim |
| 68 | # |
| 69 | # HowTo |
| 70 | # ----- |
| 71 | # |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | # LITE3.h ../src/jim versionh@12T,1E@15T,1d@1F8,3L@1IY,5g@1No,1E@1Vc,2t@1YS,3Z@1bl,1q68LG; |
| 78 | |
| 79 | |
| 80 | |
| 81 | # =sqlite3DEFINES=C# LITE3E:/fossil-w32LITE3.h .. |