Fossil SCM
Merge trunk
Commit
250c12c2f7aac52999dfacfeeb3831469b5a4c7c
Parent
cda8c14c164998c…
27 files changed
+8
-9
+10
-10
+15
-25
+3
-3
+11
-13
+1
-1
+8
-9
+1
-1
+3
-4
+43
-59
+34
+4
-4
+9
-12
+4
-4
+5
-8
+2
-2
+14
-14
+1
-1
+3
-6
+3
-6
+2
-2
+4
-6
+4
-6
+22
-36
+5
-7
+16
-22
+1
-1
~
src/attach.c
~
src/branch.c
~
src/browse.c
~
src/descendants.c
~
src/diff.c
~
src/dispatch.c
~
src/event.c
~
src/finfo.c
~
src/http_socket.c
~
src/info.c
~
src/linenoise.c
~
src/name.c
~
src/report.c
~
src/setup.c
~
src/shun.c
~
src/skins.c
~
src/stat.c
~
src/statrep.c
~
src/style.c
~
src/style.c
~
src/tag.c
~
src/timeline.c
~
src/timeline.c
~
src/tkt.c
~
src/user.c
~
src/wiki.c
~
src/wikiformat.c
+8
-9
| --- src/attach.c | ||
| +++ src/attach.c | ||
| @@ -452,14 +452,14 @@ | ||
| 452 | 452 | #if 0 |
| 453 | 453 | /* Shunning here needs to get both the attachment control artifact and |
| 454 | 454 | ** the object that is attached. */ |
| 455 | 455 | if( g.perm.Admin ){ |
| 456 | 456 | if( db_exists("SELECT 1 FROM shun WHERE uuid='%q'", zUuid) ){ |
| 457 | - style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1", | |
| 457 | + style_submenu_element("Unshun", "%s/shun?uuid=%s&sub=1", | |
| 458 | 458 | g.zTop, zUuid); |
| 459 | 459 | }else{ |
| 460 | - style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun", | |
| 460 | + style_submenu_element("Shun", "%s/shun?shun=%s#addshun", | |
| 461 | 461 | g.zTop, zUuid); |
| 462 | 462 | } |
| 463 | 463 | } |
| 464 | 464 | #endif |
| 465 | 465 | pAttach = manifest_get(rid, CFTYPE_ATTACHMENT, 0); |
| @@ -475,23 +475,23 @@ | ||
| 475 | 475 | && db_exists("SELECT 1 FROM ticket WHERE tkt_uuid='%q'", zTarget) |
| 476 | 476 | ){ |
| 477 | 477 | zTktUuid = zTarget; |
| 478 | 478 | if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; } |
| 479 | 479 | if( g.perm.WrTkt ){ |
| 480 | - style_submenu_element("Delete","Delete","%R/ainfo/%s?del", zUuid); | |
| 480 | + style_submenu_element("Delete", "%R/ainfo/%s?del", zUuid); | |
| 481 | 481 | } |
| 482 | 482 | }else if( db_exists("SELECT 1 FROM tag WHERE tagname='wiki-%q'",zTarget) ){ |
| 483 | 483 | zWikiName = zTarget; |
| 484 | 484 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 485 | 485 | if( g.perm.WrWiki ){ |
| 486 | - style_submenu_element("Delete","Delete","%R/ainfo/%s?del", zUuid); | |
| 486 | + style_submenu_element("Delete", "%R/ainfo/%s?del", zUuid); | |
| 487 | 487 | } |
| 488 | 488 | }else if( db_exists("SELECT 1 FROM tag WHERE tagname='event-%q'",zTarget) ){ |
| 489 | 489 | zTNUuid = zTarget; |
| 490 | 490 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 491 | 491 | if( g.perm.Write && g.perm.WrWiki ){ |
| 492 | - style_submenu_element("Delete","Delete","%R/ainfo/%s?del", zUuid); | |
| 492 | + style_submenu_element("Delete", "%R/ainfo/%s?del", zUuid); | |
| 493 | 493 | } |
| 494 | 494 | } |
| 495 | 495 | zDate = db_text(0, "SELECT datetime(%.12f)", pAttach->rDate); |
| 496 | 496 | |
| 497 | 497 | if( P("confirm") |
| @@ -551,14 +551,13 @@ | ||
| 551 | 551 | if( strcmp(zModAction,"approve")==0 ){ |
| 552 | 552 | moderation_approve(rid); |
| 553 | 553 | } |
| 554 | 554 | } |
| 555 | 555 | style_header("Attachment Details"); |
| 556 | - style_submenu_element("Raw", "Raw", "%R/artifact/%s", zUuid); | |
| 556 | + style_submenu_element("Raw", "%R/artifact/%s", zUuid); | |
| 557 | 557 | if(fShowContent){ |
| 558 | - style_submenu_element("Line Numbers", "Line Numbers", | |
| 559 | - "%R/ainfo/%s%s",zUuid, | |
| 558 | + style_submenu_element("Line Numbers", "%R/ainfo/%s%s", zUuid, | |
| 560 | 559 | ((zLn&&*zLn) ? "" : "?ln=0")); |
| 561 | 560 | } |
| 562 | 561 | |
| 563 | 562 | @ <div class="section">Overview</div> |
| 564 | 563 | @ <p><table class="label-value"> |
| @@ -629,11 +628,11 @@ | ||
| 629 | 628 | } |
| 630 | 629 | }else if( strncmp(zMime, "image/", 6)==0 ){ |
| 631 | 630 | int sz = db_int(0, "SELECT size FROM blob WHERE rid=%d", ridSrc); |
| 632 | 631 | @ <i>(file is %d(sz) bytes of image data)</i><br /> |
| 633 | 632 | @ <img src="%R/raw/%s(zSrc)?m=%s(zMime)"></img> |
| 634 | - style_submenu_element("Image", "Image", "%R/raw/%s?m=%s", zSrc, zMime); | |
| 633 | + style_submenu_element("Image", "%R/raw/%s?m=%s", zSrc, zMime); | |
| 635 | 634 | }else{ |
| 636 | 635 | int sz = db_int(0, "SELECT size FROM blob WHERE rid=%d", ridSrc); |
| 637 | 636 | @ <i>(file is %d(sz) bytes of binary data)</i> |
| 638 | 637 | } |
| 639 | 638 | @ </blockquote> |
| 640 | 639 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -452,14 +452,14 @@ | |
| 452 | #if 0 |
| 453 | /* Shunning here needs to get both the attachment control artifact and |
| 454 | ** the object that is attached. */ |
| 455 | if( g.perm.Admin ){ |
| 456 | if( db_exists("SELECT 1 FROM shun WHERE uuid='%q'", zUuid) ){ |
| 457 | style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1", |
| 458 | g.zTop, zUuid); |
| 459 | }else{ |
| 460 | style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun", |
| 461 | g.zTop, zUuid); |
| 462 | } |
| 463 | } |
| 464 | #endif |
| 465 | pAttach = manifest_get(rid, CFTYPE_ATTACHMENT, 0); |
| @@ -475,23 +475,23 @@ | |
| 475 | && db_exists("SELECT 1 FROM ticket WHERE tkt_uuid='%q'", zTarget) |
| 476 | ){ |
| 477 | zTktUuid = zTarget; |
| 478 | if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; } |
| 479 | if( g.perm.WrTkt ){ |
| 480 | style_submenu_element("Delete","Delete","%R/ainfo/%s?del", zUuid); |
| 481 | } |
| 482 | }else if( db_exists("SELECT 1 FROM tag WHERE tagname='wiki-%q'",zTarget) ){ |
| 483 | zWikiName = zTarget; |
| 484 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 485 | if( g.perm.WrWiki ){ |
| 486 | style_submenu_element("Delete","Delete","%R/ainfo/%s?del", zUuid); |
| 487 | } |
| 488 | }else if( db_exists("SELECT 1 FROM tag WHERE tagname='event-%q'",zTarget) ){ |
| 489 | zTNUuid = zTarget; |
| 490 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 491 | if( g.perm.Write && g.perm.WrWiki ){ |
| 492 | style_submenu_element("Delete","Delete","%R/ainfo/%s?del", zUuid); |
| 493 | } |
| 494 | } |
| 495 | zDate = db_text(0, "SELECT datetime(%.12f)", pAttach->rDate); |
| 496 | |
| 497 | if( P("confirm") |
| @@ -551,14 +551,13 @@ | |
| 551 | if( strcmp(zModAction,"approve")==0 ){ |
| 552 | moderation_approve(rid); |
| 553 | } |
| 554 | } |
| 555 | style_header("Attachment Details"); |
| 556 | style_submenu_element("Raw", "Raw", "%R/artifact/%s", zUuid); |
| 557 | if(fShowContent){ |
| 558 | style_submenu_element("Line Numbers", "Line Numbers", |
| 559 | "%R/ainfo/%s%s",zUuid, |
| 560 | ((zLn&&*zLn) ? "" : "?ln=0")); |
| 561 | } |
| 562 | |
| 563 | @ <div class="section">Overview</div> |
| 564 | @ <p><table class="label-value"> |
| @@ -629,11 +628,11 @@ | |
| 629 | } |
| 630 | }else if( strncmp(zMime, "image/", 6)==0 ){ |
| 631 | int sz = db_int(0, "SELECT size FROM blob WHERE rid=%d", ridSrc); |
| 632 | @ <i>(file is %d(sz) bytes of image data)</i><br /> |
| 633 | @ <img src="%R/raw/%s(zSrc)?m=%s(zMime)"></img> |
| 634 | style_submenu_element("Image", "Image", "%R/raw/%s?m=%s", zSrc, zMime); |
| 635 | }else{ |
| 636 | int sz = db_int(0, "SELECT size FROM blob WHERE rid=%d", ridSrc); |
| 637 | @ <i>(file is %d(sz) bytes of binary data)</i> |
| 638 | } |
| 639 | @ </blockquote> |
| 640 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -452,14 +452,14 @@ | |
| 452 | #if 0 |
| 453 | /* Shunning here needs to get both the attachment control artifact and |
| 454 | ** the object that is attached. */ |
| 455 | if( g.perm.Admin ){ |
| 456 | if( db_exists("SELECT 1 FROM shun WHERE uuid='%q'", zUuid) ){ |
| 457 | style_submenu_element("Unshun", "%s/shun?uuid=%s&sub=1", |
| 458 | g.zTop, zUuid); |
| 459 | }else{ |
| 460 | style_submenu_element("Shun", "%s/shun?shun=%s#addshun", |
| 461 | g.zTop, zUuid); |
| 462 | } |
| 463 | } |
| 464 | #endif |
| 465 | pAttach = manifest_get(rid, CFTYPE_ATTACHMENT, 0); |
| @@ -475,23 +475,23 @@ | |
| 475 | && db_exists("SELECT 1 FROM ticket WHERE tkt_uuid='%q'", zTarget) |
| 476 | ){ |
| 477 | zTktUuid = zTarget; |
| 478 | if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; } |
| 479 | if( g.perm.WrTkt ){ |
| 480 | style_submenu_element("Delete", "%R/ainfo/%s?del", zUuid); |
| 481 | } |
| 482 | }else if( db_exists("SELECT 1 FROM tag WHERE tagname='wiki-%q'",zTarget) ){ |
| 483 | zWikiName = zTarget; |
| 484 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 485 | if( g.perm.WrWiki ){ |
| 486 | style_submenu_element("Delete", "%R/ainfo/%s?del", zUuid); |
| 487 | } |
| 488 | }else if( db_exists("SELECT 1 FROM tag WHERE tagname='event-%q'",zTarget) ){ |
| 489 | zTNUuid = zTarget; |
| 490 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 491 | if( g.perm.Write && g.perm.WrWiki ){ |
| 492 | style_submenu_element("Delete", "%R/ainfo/%s?del", zUuid); |
| 493 | } |
| 494 | } |
| 495 | zDate = db_text(0, "SELECT datetime(%.12f)", pAttach->rDate); |
| 496 | |
| 497 | if( P("confirm") |
| @@ -551,14 +551,13 @@ | |
| 551 | if( strcmp(zModAction,"approve")==0 ){ |
| 552 | moderation_approve(rid); |
| 553 | } |
| 554 | } |
| 555 | style_header("Attachment Details"); |
| 556 | style_submenu_element("Raw", "%R/artifact/%s", zUuid); |
| 557 | if(fShowContent){ |
| 558 | style_submenu_element("Line Numbers", "%R/ainfo/%s%s", zUuid, |
| 559 | ((zLn&&*zLn) ? "" : "?ln=0")); |
| 560 | } |
| 561 | |
| 562 | @ <div class="section">Overview</div> |
| 563 | @ <p><table class="label-value"> |
| @@ -629,11 +628,11 @@ | |
| 628 | } |
| 629 | }else if( strncmp(zMime, "image/", 6)==0 ){ |
| 630 | int sz = db_int(0, "SELECT size FROM blob WHERE rid=%d", ridSrc); |
| 631 | @ <i>(file is %d(sz) bytes of image data)</i><br /> |
| 632 | @ <img src="%R/raw/%s(zSrc)?m=%s(zMime)"></img> |
| 633 | style_submenu_element("Image", "%R/raw/%s?m=%s", zSrc, zMime); |
| 634 | }else{ |
| 635 | int sz = db_int(0, "SELECT size FROM blob WHERE rid=%d", ridSrc); |
| 636 | @ <i>(file is %d(sz) bytes of binary data)</i> |
| 637 | } |
| 638 | @ </blockquote> |
| 639 |
+10
-10
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -442,25 +442,25 @@ | ||
| 442 | 442 | if( showAll ) brFlags = BRL_BOTH; |
| 443 | 443 | if( showClosed ) brFlags = BRL_CLOSED_ONLY; |
| 444 | 444 | |
| 445 | 445 | style_header("%s", showClosed ? "Closed Branches" : |
| 446 | 446 | showAll ? "All Branches" : "Open Branches"); |
| 447 | - style_submenu_element("Timeline", "Timeline", "brtimeline"); | |
| 447 | + style_submenu_element("Timeline", "brtimeline"); | |
| 448 | 448 | if( showClosed ){ |
| 449 | - style_submenu_element("All", "All", "brlist?all"); | |
| 450 | - style_submenu_element("Open","Open","brlist?open"); | |
| 449 | + style_submenu_element("All", "brlist?all"); | |
| 450 | + style_submenu_element("Open", "brlist?open"); | |
| 451 | 451 | }else if( showAll ){ |
| 452 | - style_submenu_element("Closed", "Closed", "brlist?closed"); | |
| 453 | - style_submenu_element("Open","Open","brlist"); | |
| 452 | + style_submenu_element("Closed", "brlist?closed"); | |
| 453 | + style_submenu_element("Open", "brlist"); | |
| 454 | 454 | }else{ |
| 455 | - style_submenu_element("All", "All", "brlist?all"); | |
| 456 | - style_submenu_element("Closed","Closed","brlist?closed"); | |
| 455 | + style_submenu_element("All", "brlist?all"); | |
| 456 | + style_submenu_element("Closed", "brlist?closed"); | |
| 457 | 457 | } |
| 458 | 458 | if( !colorTest ){ |
| 459 | - style_submenu_element("Color-Test", "Color-Test", "brlist?colortest"); | |
| 459 | + style_submenu_element("Color-Test", "brlist?colortest"); | |
| 460 | 460 | }else{ |
| 461 | - style_submenu_element("All", "All", "brlist?all"); | |
| 461 | + style_submenu_element("All", "brlist?all"); | |
| 462 | 462 | } |
| 463 | 463 | login_anonymous_available(); |
| 464 | 464 | #if 0 |
| 465 | 465 | style_sidebox_begin("Nomenclature:", "33%"); |
| 466 | 466 | @ <ol> |
| @@ -544,11 +544,11 @@ | ||
| 544 | 544 | |
| 545 | 545 | login_check_credentials(); |
| 546 | 546 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 547 | 547 | |
| 548 | 548 | style_header("Branches"); |
| 549 | - style_submenu_element("List", "List", "brlist"); | |
| 549 | + style_submenu_element("List", "brlist"); | |
| 550 | 550 | login_anonymous_available(); |
| 551 | 551 | @ <h2>The initial check-in for each branch:</h2> |
| 552 | 552 | db_prepare(&q, |
| 553 | 553 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 554 | 554 | " WHERE tagtype>0 AND tagid=%d AND srcid!=0)" |
| 555 | 555 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -442,25 +442,25 @@ | |
| 442 | if( showAll ) brFlags = BRL_BOTH; |
| 443 | if( showClosed ) brFlags = BRL_CLOSED_ONLY; |
| 444 | |
| 445 | style_header("%s", showClosed ? "Closed Branches" : |
| 446 | showAll ? "All Branches" : "Open Branches"); |
| 447 | style_submenu_element("Timeline", "Timeline", "brtimeline"); |
| 448 | if( showClosed ){ |
| 449 | style_submenu_element("All", "All", "brlist?all"); |
| 450 | style_submenu_element("Open","Open","brlist?open"); |
| 451 | }else if( showAll ){ |
| 452 | style_submenu_element("Closed", "Closed", "brlist?closed"); |
| 453 | style_submenu_element("Open","Open","brlist"); |
| 454 | }else{ |
| 455 | style_submenu_element("All", "All", "brlist?all"); |
| 456 | style_submenu_element("Closed","Closed","brlist?closed"); |
| 457 | } |
| 458 | if( !colorTest ){ |
| 459 | style_submenu_element("Color-Test", "Color-Test", "brlist?colortest"); |
| 460 | }else{ |
| 461 | style_submenu_element("All", "All", "brlist?all"); |
| 462 | } |
| 463 | login_anonymous_available(); |
| 464 | #if 0 |
| 465 | style_sidebox_begin("Nomenclature:", "33%"); |
| 466 | @ <ol> |
| @@ -544,11 +544,11 @@ | |
| 544 | |
| 545 | login_check_credentials(); |
| 546 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 547 | |
| 548 | style_header("Branches"); |
| 549 | style_submenu_element("List", "List", "brlist"); |
| 550 | login_anonymous_available(); |
| 551 | @ <h2>The initial check-in for each branch:</h2> |
| 552 | db_prepare(&q, |
| 553 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 554 | " WHERE tagtype>0 AND tagid=%d AND srcid!=0)" |
| 555 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -442,25 +442,25 @@ | |
| 442 | if( showAll ) brFlags = BRL_BOTH; |
| 443 | if( showClosed ) brFlags = BRL_CLOSED_ONLY; |
| 444 | |
| 445 | style_header("%s", showClosed ? "Closed Branches" : |
| 446 | showAll ? "All Branches" : "Open Branches"); |
| 447 | style_submenu_element("Timeline", "brtimeline"); |
| 448 | if( showClosed ){ |
| 449 | style_submenu_element("All", "brlist?all"); |
| 450 | style_submenu_element("Open", "brlist?open"); |
| 451 | }else if( showAll ){ |
| 452 | style_submenu_element("Closed", "brlist?closed"); |
| 453 | style_submenu_element("Open", "brlist"); |
| 454 | }else{ |
| 455 | style_submenu_element("All", "brlist?all"); |
| 456 | style_submenu_element("Closed", "brlist?closed"); |
| 457 | } |
| 458 | if( !colorTest ){ |
| 459 | style_submenu_element("Color-Test", "brlist?colortest"); |
| 460 | }else{ |
| 461 | style_submenu_element("All", "brlist?all"); |
| 462 | } |
| 463 | login_anonymous_available(); |
| 464 | #if 0 |
| 465 | style_sidebox_begin("Nomenclature:", "33%"); |
| 466 | @ <ol> |
| @@ -544,11 +544,11 @@ | |
| 544 | |
| 545 | login_check_credentials(); |
| 546 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 547 | |
| 548 | style_header("Branches"); |
| 549 | style_submenu_element("List", "brlist"); |
| 550 | login_anonymous_available(); |
| 551 | @ <h2>The initial check-in for each branch:</h2> |
| 552 | db_prepare(&q, |
| 553 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 554 | " WHERE tagtype>0 AND tagid=%d AND srcid!=0)" |
| 555 |
+15
-25
| --- src/browse.c | ||
| +++ src/browse.c | ||
| @@ -171,40 +171,37 @@ | ||
| 171 | 171 | blob_zero(&dirname); |
| 172 | 172 | if( zD ){ |
| 173 | 173 | blob_append(&dirname, "in directory ", -1); |
| 174 | 174 | hyperlinked_path(zD, &dirname, zCI, "dir", ""); |
| 175 | 175 | zPrefix = mprintf("%s/", zD); |
| 176 | - style_submenu_element("Top-Level", "Top-Level", "%s", | |
| 176 | + style_submenu_element("Top-Level", "%s", | |
| 177 | 177 | url_render(&sURI, "name", 0, 0, 0)); |
| 178 | 178 | }else{ |
| 179 | 179 | blob_append(&dirname, "in the top-level directory", -1); |
| 180 | 180 | zPrefix = ""; |
| 181 | 181 | } |
| 182 | 182 | if( linkTrunk ){ |
| 183 | - style_submenu_element("Trunk", "Trunk", "%s", | |
| 183 | + style_submenu_element("Trunk", "%s", | |
| 184 | 184 | url_render(&sURI, "ci", "trunk", 0, 0)); |
| 185 | 185 | } |
| 186 | 186 | if( linkTip ){ |
| 187 | - style_submenu_element("Tip", "Tip", "%s", | |
| 188 | - url_render(&sURI, "ci", "tip", 0, 0)); | |
| 187 | + style_submenu_element("Tip", "%s", url_render(&sURI, "ci", "tip", 0, 0)); | |
| 189 | 188 | } |
| 190 | 189 | if( zCI ){ |
| 191 | 190 | @ <h2>Files of check-in [%z(href("vinfo?name=%!S",zUuid))%S(zUuid)</a>] |
| 192 | 191 | @ %s(blob_str(&dirname))</h2> |
| 193 | 192 | zSubdirLink = mprintf("%R/dir?ci=%!S&name=%T", zUuid, zPrefix); |
| 194 | 193 | if( nD==0 ){ |
| 195 | - style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%!S", | |
| 196 | - zUuid); | |
| 194 | + style_submenu_element("File Ages", "%R/fileage?name=%!S", zUuid); | |
| 197 | 195 | } |
| 198 | 196 | }else{ |
| 199 | 197 | @ <h2>The union of all files from all check-ins |
| 200 | 198 | @ %s(blob_str(&dirname))</h2> |
| 201 | 199 | zSubdirLink = mprintf("%R/dir?name=%T", zPrefix); |
| 202 | 200 | } |
| 203 | - style_submenu_element("All", "All", "%s", | |
| 204 | - url_render(&sURI, "ci", 0, 0, 0)); | |
| 205 | - style_submenu_element("Tree-View", "Tree-View", "%s", | |
| 201 | + style_submenu_element("All", "%s", url_render(&sURI, "ci", 0, 0, 0)); | |
| 202 | + style_submenu_element("Tree-View", "%s", | |
| 206 | 203 | url_render(&sURI, "type", "tree", 0, 0)); |
| 207 | 204 | |
| 208 | 205 | /* Compute the temporary table "localfiles" containing the names |
| 209 | 206 | ** of all files and subdirectories in the zD[] directory. |
| 210 | 207 | ** |
| @@ -616,35 +613,32 @@ | ||
| 616 | 613 | blob_zero(&dirname); |
| 617 | 614 | if( zD ){ |
| 618 | 615 | blob_append(&dirname, "within directory ", -1); |
| 619 | 616 | hyperlinked_path(zD, &dirname, zCI, "tree", zREx); |
| 620 | 617 | if( zRE ) blob_appendf(&dirname, " matching \"%s\"", zRE); |
| 621 | - style_submenu_element("Top-Level", "Top-Level", "%s", | |
| 618 | + style_submenu_element("Top-Level", "%s", | |
| 622 | 619 | url_render(&sURI, "name", 0, 0, 0)); |
| 623 | 620 | }else{ |
| 624 | 621 | if( zRE ){ |
| 625 | 622 | blob_appendf(&dirname, "matching \"%s\"", zRE); |
| 626 | 623 | } |
| 627 | 624 | } |
| 628 | 625 | style_submenu_binary("mtime","Sort By Time","Sort By Filename", 0); |
| 629 | 626 | if( zCI ){ |
| 630 | - style_submenu_element("All", "All", "%s", | |
| 631 | - url_render(&sURI, "ci", 0, 0, 0)); | |
| 627 | + style_submenu_element("All", "%s", url_render(&sURI, "ci", 0, 0, 0)); | |
| 632 | 628 | if( nD==0 && !showDirOnly ){ |
| 633 | - style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%s", | |
| 634 | - zUuid); | |
| 629 | + style_submenu_element("File Ages", "%R/fileage?name=%s", zUuid); | |
| 635 | 630 | } |
| 636 | 631 | } |
| 637 | 632 | if( linkTrunk ){ |
| 638 | - style_submenu_element("Trunk", "Trunk", "%s", | |
| 633 | + style_submenu_element("Trunk", "%s", | |
| 639 | 634 | url_render(&sURI, "ci", "trunk", 0, 0)); |
| 640 | 635 | } |
| 641 | 636 | if( linkTip ){ |
| 642 | - style_submenu_element("Tip", "Tip", "%s", | |
| 643 | - url_render(&sURI, "ci", "tip", 0, 0)); | |
| 637 | + style_submenu_element("Tip", "%s", url_render(&sURI, "ci", "tip", 0, 0)); | |
| 644 | 638 | } |
| 645 | - style_submenu_element("Flat-View", "Flat-View", "%s", | |
| 639 | + style_submenu_element("Flat-View", "%s", | |
| 646 | 640 | url_render(&sURI, "type", "flat", 0, 0)); |
| 647 | 641 | |
| 648 | 642 | /* Compute the file hierarchy. |
| 649 | 643 | */ |
| 650 | 644 | if( zCI ){ |
| @@ -695,16 +689,14 @@ | ||
| 695 | 689 | if( showDirOnly ){ |
| 696 | 690 | for(nFile=0, p=sTree.pFirst; p; p=p->pNext){ |
| 697 | 691 | if( p->pChild!=0 && p->nFullName>nD ) nFile++; |
| 698 | 692 | } |
| 699 | 693 | zObjType = "Folders"; |
| 700 | - style_submenu_element("Files","Files","%s", | |
| 701 | - url_render(&sURI,"nofiles",0,0,0)); | |
| 694 | + style_submenu_element("Files", "%s", url_render(&sURI,"nofiles",0,0,0)); | |
| 702 | 695 | }else{ |
| 703 | 696 | zObjType = "Files"; |
| 704 | - style_submenu_element("Folders","Folders","%s", | |
| 705 | - url_render(&sURI,"nofiles","1",0,0)); | |
| 697 | + style_submenu_element("Folders", "%s", url_render(&sURI,"nofiles","1",0,0)); | |
| 706 | 698 | } |
| 707 | 699 | |
| 708 | 700 | if( zCI ){ |
| 709 | 701 | @ <h2>%s(zObjType) from |
| 710 | 702 | if( sqlite3_strnicmp(zCI, zUuid, (int)strlen(zCI))!=0 ){ |
| @@ -1032,13 +1024,11 @@ | ||
| 1032 | 1024 | } |
| 1033 | 1025 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1034 | 1026 | baseTime = db_double(0.0,"SELECT mtime FROM event WHERE objid=%d", rid); |
| 1035 | 1027 | zNow = db_text("", "SELECT datetime(mtime,toLocal()) FROM event" |
| 1036 | 1028 | " WHERE objid=%d", rid); |
| 1037 | - style_submenu_element("Tree-View", "Tree-View", | |
| 1038 | - "%R/tree?ci=%T&mtime=1&type=tree", | |
| 1039 | - zName); | |
| 1029 | + style_submenu_element("Tree-View", "%R/tree?ci=%T&mtime=1&type=tree", zName); | |
| 1040 | 1030 | style_header("File Ages"); |
| 1041 | 1031 | zGlob = P("glob"); |
| 1042 | 1032 | compute_fileage(rid,zGlob); |
| 1043 | 1033 | db_multi_exec("CREATE INDEX fileage_ix1 ON fileage(mid,pathname);"); |
| 1044 | 1034 | |
| 1045 | 1035 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -171,40 +171,37 @@ | |
| 171 | blob_zero(&dirname); |
| 172 | if( zD ){ |
| 173 | blob_append(&dirname, "in directory ", -1); |
| 174 | hyperlinked_path(zD, &dirname, zCI, "dir", ""); |
| 175 | zPrefix = mprintf("%s/", zD); |
| 176 | style_submenu_element("Top-Level", "Top-Level", "%s", |
| 177 | url_render(&sURI, "name", 0, 0, 0)); |
| 178 | }else{ |
| 179 | blob_append(&dirname, "in the top-level directory", -1); |
| 180 | zPrefix = ""; |
| 181 | } |
| 182 | if( linkTrunk ){ |
| 183 | style_submenu_element("Trunk", "Trunk", "%s", |
| 184 | url_render(&sURI, "ci", "trunk", 0, 0)); |
| 185 | } |
| 186 | if( linkTip ){ |
| 187 | style_submenu_element("Tip", "Tip", "%s", |
| 188 | url_render(&sURI, "ci", "tip", 0, 0)); |
| 189 | } |
| 190 | if( zCI ){ |
| 191 | @ <h2>Files of check-in [%z(href("vinfo?name=%!S",zUuid))%S(zUuid)</a>] |
| 192 | @ %s(blob_str(&dirname))</h2> |
| 193 | zSubdirLink = mprintf("%R/dir?ci=%!S&name=%T", zUuid, zPrefix); |
| 194 | if( nD==0 ){ |
| 195 | style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%!S", |
| 196 | zUuid); |
| 197 | } |
| 198 | }else{ |
| 199 | @ <h2>The union of all files from all check-ins |
| 200 | @ %s(blob_str(&dirname))</h2> |
| 201 | zSubdirLink = mprintf("%R/dir?name=%T", zPrefix); |
| 202 | } |
| 203 | style_submenu_element("All", "All", "%s", |
| 204 | url_render(&sURI, "ci", 0, 0, 0)); |
| 205 | style_submenu_element("Tree-View", "Tree-View", "%s", |
| 206 | url_render(&sURI, "type", "tree", 0, 0)); |
| 207 | |
| 208 | /* Compute the temporary table "localfiles" containing the names |
| 209 | ** of all files and subdirectories in the zD[] directory. |
| 210 | ** |
| @@ -616,35 +613,32 @@ | |
| 616 | blob_zero(&dirname); |
| 617 | if( zD ){ |
| 618 | blob_append(&dirname, "within directory ", -1); |
| 619 | hyperlinked_path(zD, &dirname, zCI, "tree", zREx); |
| 620 | if( zRE ) blob_appendf(&dirname, " matching \"%s\"", zRE); |
| 621 | style_submenu_element("Top-Level", "Top-Level", "%s", |
| 622 | url_render(&sURI, "name", 0, 0, 0)); |
| 623 | }else{ |
| 624 | if( zRE ){ |
| 625 | blob_appendf(&dirname, "matching \"%s\"", zRE); |
| 626 | } |
| 627 | } |
| 628 | style_submenu_binary("mtime","Sort By Time","Sort By Filename", 0); |
| 629 | if( zCI ){ |
| 630 | style_submenu_element("All", "All", "%s", |
| 631 | url_render(&sURI, "ci", 0, 0, 0)); |
| 632 | if( nD==0 && !showDirOnly ){ |
| 633 | style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%s", |
| 634 | zUuid); |
| 635 | } |
| 636 | } |
| 637 | if( linkTrunk ){ |
| 638 | style_submenu_element("Trunk", "Trunk", "%s", |
| 639 | url_render(&sURI, "ci", "trunk", 0, 0)); |
| 640 | } |
| 641 | if( linkTip ){ |
| 642 | style_submenu_element("Tip", "Tip", "%s", |
| 643 | url_render(&sURI, "ci", "tip", 0, 0)); |
| 644 | } |
| 645 | style_submenu_element("Flat-View", "Flat-View", "%s", |
| 646 | url_render(&sURI, "type", "flat", 0, 0)); |
| 647 | |
| 648 | /* Compute the file hierarchy. |
| 649 | */ |
| 650 | if( zCI ){ |
| @@ -695,16 +689,14 @@ | |
| 695 | if( showDirOnly ){ |
| 696 | for(nFile=0, p=sTree.pFirst; p; p=p->pNext){ |
| 697 | if( p->pChild!=0 && p->nFullName>nD ) nFile++; |
| 698 | } |
| 699 | zObjType = "Folders"; |
| 700 | style_submenu_element("Files","Files","%s", |
| 701 | url_render(&sURI,"nofiles",0,0,0)); |
| 702 | }else{ |
| 703 | zObjType = "Files"; |
| 704 | style_submenu_element("Folders","Folders","%s", |
| 705 | url_render(&sURI,"nofiles","1",0,0)); |
| 706 | } |
| 707 | |
| 708 | if( zCI ){ |
| 709 | @ <h2>%s(zObjType) from |
| 710 | if( sqlite3_strnicmp(zCI, zUuid, (int)strlen(zCI))!=0 ){ |
| @@ -1032,13 +1024,11 @@ | |
| 1032 | } |
| 1033 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1034 | baseTime = db_double(0.0,"SELECT mtime FROM event WHERE objid=%d", rid); |
| 1035 | zNow = db_text("", "SELECT datetime(mtime,toLocal()) FROM event" |
| 1036 | " WHERE objid=%d", rid); |
| 1037 | style_submenu_element("Tree-View", "Tree-View", |
| 1038 | "%R/tree?ci=%T&mtime=1&type=tree", |
| 1039 | zName); |
| 1040 | style_header("File Ages"); |
| 1041 | zGlob = P("glob"); |
| 1042 | compute_fileage(rid,zGlob); |
| 1043 | db_multi_exec("CREATE INDEX fileage_ix1 ON fileage(mid,pathname);"); |
| 1044 | |
| 1045 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -171,40 +171,37 @@ | |
| 171 | blob_zero(&dirname); |
| 172 | if( zD ){ |
| 173 | blob_append(&dirname, "in directory ", -1); |
| 174 | hyperlinked_path(zD, &dirname, zCI, "dir", ""); |
| 175 | zPrefix = mprintf("%s/", zD); |
| 176 | style_submenu_element("Top-Level", "%s", |
| 177 | url_render(&sURI, "name", 0, 0, 0)); |
| 178 | }else{ |
| 179 | blob_append(&dirname, "in the top-level directory", -1); |
| 180 | zPrefix = ""; |
| 181 | } |
| 182 | if( linkTrunk ){ |
| 183 | style_submenu_element("Trunk", "%s", |
| 184 | url_render(&sURI, "ci", "trunk", 0, 0)); |
| 185 | } |
| 186 | if( linkTip ){ |
| 187 | style_submenu_element("Tip", "%s", url_render(&sURI, "ci", "tip", 0, 0)); |
| 188 | } |
| 189 | if( zCI ){ |
| 190 | @ <h2>Files of check-in [%z(href("vinfo?name=%!S",zUuid))%S(zUuid)</a>] |
| 191 | @ %s(blob_str(&dirname))</h2> |
| 192 | zSubdirLink = mprintf("%R/dir?ci=%!S&name=%T", zUuid, zPrefix); |
| 193 | if( nD==0 ){ |
| 194 | style_submenu_element("File Ages", "%R/fileage?name=%!S", zUuid); |
| 195 | } |
| 196 | }else{ |
| 197 | @ <h2>The union of all files from all check-ins |
| 198 | @ %s(blob_str(&dirname))</h2> |
| 199 | zSubdirLink = mprintf("%R/dir?name=%T", zPrefix); |
| 200 | } |
| 201 | style_submenu_element("All", "%s", url_render(&sURI, "ci", 0, 0, 0)); |
| 202 | style_submenu_element("Tree-View", "%s", |
| 203 | url_render(&sURI, "type", "tree", 0, 0)); |
| 204 | |
| 205 | /* Compute the temporary table "localfiles" containing the names |
| 206 | ** of all files and subdirectories in the zD[] directory. |
| 207 | ** |
| @@ -616,35 +613,32 @@ | |
| 613 | blob_zero(&dirname); |
| 614 | if( zD ){ |
| 615 | blob_append(&dirname, "within directory ", -1); |
| 616 | hyperlinked_path(zD, &dirname, zCI, "tree", zREx); |
| 617 | if( zRE ) blob_appendf(&dirname, " matching \"%s\"", zRE); |
| 618 | style_submenu_element("Top-Level", "%s", |
| 619 | url_render(&sURI, "name", 0, 0, 0)); |
| 620 | }else{ |
| 621 | if( zRE ){ |
| 622 | blob_appendf(&dirname, "matching \"%s\"", zRE); |
| 623 | } |
| 624 | } |
| 625 | style_submenu_binary("mtime","Sort By Time","Sort By Filename", 0); |
| 626 | if( zCI ){ |
| 627 | style_submenu_element("All", "%s", url_render(&sURI, "ci", 0, 0, 0)); |
| 628 | if( nD==0 && !showDirOnly ){ |
| 629 | style_submenu_element("File Ages", "%R/fileage?name=%s", zUuid); |
| 630 | } |
| 631 | } |
| 632 | if( linkTrunk ){ |
| 633 | style_submenu_element("Trunk", "%s", |
| 634 | url_render(&sURI, "ci", "trunk", 0, 0)); |
| 635 | } |
| 636 | if( linkTip ){ |
| 637 | style_submenu_element("Tip", "%s", url_render(&sURI, "ci", "tip", 0, 0)); |
| 638 | } |
| 639 | style_submenu_element("Flat-View", "%s", |
| 640 | url_render(&sURI, "type", "flat", 0, 0)); |
| 641 | |
| 642 | /* Compute the file hierarchy. |
| 643 | */ |
| 644 | if( zCI ){ |
| @@ -695,16 +689,14 @@ | |
| 689 | if( showDirOnly ){ |
| 690 | for(nFile=0, p=sTree.pFirst; p; p=p->pNext){ |
| 691 | if( p->pChild!=0 && p->nFullName>nD ) nFile++; |
| 692 | } |
| 693 | zObjType = "Folders"; |
| 694 | style_submenu_element("Files", "%s", url_render(&sURI,"nofiles",0,0,0)); |
| 695 | }else{ |
| 696 | zObjType = "Files"; |
| 697 | style_submenu_element("Folders", "%s", url_render(&sURI,"nofiles","1",0,0)); |
| 698 | } |
| 699 | |
| 700 | if( zCI ){ |
| 701 | @ <h2>%s(zObjType) from |
| 702 | if( sqlite3_strnicmp(zCI, zUuid, (int)strlen(zCI))!=0 ){ |
| @@ -1032,13 +1024,11 @@ | |
| 1024 | } |
| 1025 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1026 | baseTime = db_double(0.0,"SELECT mtime FROM event WHERE objid=%d", rid); |
| 1027 | zNow = db_text("", "SELECT datetime(mtime,toLocal()) FROM event" |
| 1028 | " WHERE objid=%d", rid); |
| 1029 | style_submenu_element("Tree-View", "%R/tree?ci=%T&mtime=1&type=tree", zName); |
| 1030 | style_header("File Ages"); |
| 1031 | zGlob = P("glob"); |
| 1032 | compute_fileage(rid,zGlob); |
| 1033 | db_multi_exec("CREATE INDEX fileage_ix1 ON fileage(mid,pathname);"); |
| 1034 | |
| 1035 |
+3
-3
| --- src/descendants.c | ||
| +++ src/descendants.c | ||
| @@ -455,17 +455,17 @@ | ||
| 455 | 455 | |
| 456 | 456 | login_check_credentials(); |
| 457 | 457 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 458 | 458 | |
| 459 | 459 | if( !showAll ){ |
| 460 | - style_submenu_element("All", "All", "leaves?all"); | |
| 460 | + style_submenu_element("All", "leaves?all"); | |
| 461 | 461 | } |
| 462 | 462 | if( !showClosed ){ |
| 463 | - style_submenu_element("Closed", "Closed", "leaves?closed"); | |
| 463 | + style_submenu_element("Closed", "leaves?closed"); | |
| 464 | 464 | } |
| 465 | 465 | if( showClosed || showAll ){ |
| 466 | - style_submenu_element("Open", "Open", "leaves"); | |
| 466 | + style_submenu_element("Open", "leaves"); | |
| 467 | 467 | } |
| 468 | 468 | style_header("Leaves"); |
| 469 | 469 | login_anonymous_available(); |
| 470 | 470 | #if 0 |
| 471 | 471 | style_sidebox_begin("Nomenclature:", "33%"); |
| 472 | 472 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -455,17 +455,17 @@ | |
| 455 | |
| 456 | login_check_credentials(); |
| 457 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 458 | |
| 459 | if( !showAll ){ |
| 460 | style_submenu_element("All", "All", "leaves?all"); |
| 461 | } |
| 462 | if( !showClosed ){ |
| 463 | style_submenu_element("Closed", "Closed", "leaves?closed"); |
| 464 | } |
| 465 | if( showClosed || showAll ){ |
| 466 | style_submenu_element("Open", "Open", "leaves"); |
| 467 | } |
| 468 | style_header("Leaves"); |
| 469 | login_anonymous_available(); |
| 470 | #if 0 |
| 471 | style_sidebox_begin("Nomenclature:", "33%"); |
| 472 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -455,17 +455,17 @@ | |
| 455 | |
| 456 | login_check_credentials(); |
| 457 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 458 | |
| 459 | if( !showAll ){ |
| 460 | style_submenu_element("All", "leaves?all"); |
| 461 | } |
| 462 | if( !showClosed ){ |
| 463 | style_submenu_element("Closed", "leaves?closed"); |
| 464 | } |
| 465 | if( showClosed || showAll ){ |
| 466 | style_submenu_element("Open", "leaves"); |
| 467 | } |
| 468 | style_header("Leaves"); |
| 469 | login_anonymous_available(); |
| 470 | #if 0 |
| 471 | style_sidebox_begin("Nomenclature:", "33%"); |
| 472 |
+11
-13
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -2345,34 +2345,32 @@ | ||
| 2345 | 2345 | url_add_parameter(&url, "limit", sqlite3_mprintf("%d", iLimit)); |
| 2346 | 2346 | } |
| 2347 | 2347 | url_add_parameter(&url, "log", showLog ? "1" : "0"); |
| 2348 | 2348 | if( ignoreWs ){ |
| 2349 | 2349 | url_add_parameter(&url, "w", ""); |
| 2350 | - style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes", | |
| 2351 | - "%s", url_render(&url, "w", 0, 0, 0)); | |
| 2350 | + style_submenu_element("Show Whitespace Changes", "%s", | |
| 2351 | + url_render(&url, "w", 0, 0, 0)); | |
| 2352 | 2352 | }else{ |
| 2353 | - style_submenu_element("Ignore Whitespace", "Ignore Whitespace", | |
| 2354 | - "%s", url_render(&url, "w", "", 0, 0)); | |
| 2353 | + style_submenu_element("Ignore Whitespace", "%s", | |
| 2354 | + url_render(&url, "w", "", 0, 0)); | |
| 2355 | 2355 | } |
| 2356 | 2356 | if( showLog ){ |
| 2357 | - style_submenu_element("Hide Log", "Hide Log", | |
| 2358 | - "%s", url_render(&url, "log", "0", 0, 0)); | |
| 2357 | + style_submenu_element("Hide Log", "%s", url_render(&url, "log", "0", 0, 0)); | |
| 2359 | 2358 | }else{ |
| 2360 | - style_submenu_element("Show Log", "Show Log", | |
| 2361 | - "%s", url_render(&url, "log", "1", 0, 0)); | |
| 2359 | + style_submenu_element("Show Log", "%s", url_render(&url, "log", "1", 0, 0)); | |
| 2362 | 2360 | } |
| 2363 | 2361 | if( ann.bLimit ){ |
| 2364 | 2362 | char *z1, *z2; |
| 2365 | - style_submenu_element("All Ancestors", "All Ancestors", | |
| 2366 | - "%s", url_render(&url, "limit", "-1", 0, 0)); | |
| 2363 | + style_submenu_element("All Ancestors", "%s", | |
| 2364 | + url_render(&url, "limit", "-1", 0, 0)); | |
| 2367 | 2365 | z1 = sqlite3_mprintf("%d Ancestors", iLimit+20); |
| 2368 | 2366 | z2 = sqlite3_mprintf("%d", iLimit+20); |
| 2369 | - style_submenu_element(z1, z1, "%s", url_render(&url, "limit", z2, 0, 0)); | |
| 2367 | + style_submenu_element(z1, "%s", url_render(&url, "limit", z2, 0, 0)); | |
| 2370 | 2368 | } |
| 2371 | 2369 | if( iLimit>20 ){ |
| 2372 | - style_submenu_element("20 Ancestors", "20 Ancestors", | |
| 2373 | - "%s", url_render(&url, "limit", "20", 0, 0)); | |
| 2370 | + style_submenu_element("20 Ancestors", "%s", | |
| 2371 | + url_render(&url, "limit", "20", 0, 0)); | |
| 2374 | 2372 | } |
| 2375 | 2373 | if( skin_detail_boolean("white-foreground") ){ |
| 2376 | 2374 | clr1 = 0xa04040; |
| 2377 | 2375 | clr2 = 0x4059a0; |
| 2378 | 2376 | }else{ |
| 2379 | 2377 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -2345,34 +2345,32 @@ | |
| 2345 | url_add_parameter(&url, "limit", sqlite3_mprintf("%d", iLimit)); |
| 2346 | } |
| 2347 | url_add_parameter(&url, "log", showLog ? "1" : "0"); |
| 2348 | if( ignoreWs ){ |
| 2349 | url_add_parameter(&url, "w", ""); |
| 2350 | style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes", |
| 2351 | "%s", url_render(&url, "w", 0, 0, 0)); |
| 2352 | }else{ |
| 2353 | style_submenu_element("Ignore Whitespace", "Ignore Whitespace", |
| 2354 | "%s", url_render(&url, "w", "", 0, 0)); |
| 2355 | } |
| 2356 | if( showLog ){ |
| 2357 | style_submenu_element("Hide Log", "Hide Log", |
| 2358 | "%s", url_render(&url, "log", "0", 0, 0)); |
| 2359 | }else{ |
| 2360 | style_submenu_element("Show Log", "Show Log", |
| 2361 | "%s", url_render(&url, "log", "1", 0, 0)); |
| 2362 | } |
| 2363 | if( ann.bLimit ){ |
| 2364 | char *z1, *z2; |
| 2365 | style_submenu_element("All Ancestors", "All Ancestors", |
| 2366 | "%s", url_render(&url, "limit", "-1", 0, 0)); |
| 2367 | z1 = sqlite3_mprintf("%d Ancestors", iLimit+20); |
| 2368 | z2 = sqlite3_mprintf("%d", iLimit+20); |
| 2369 | style_submenu_element(z1, z1, "%s", url_render(&url, "limit", z2, 0, 0)); |
| 2370 | } |
| 2371 | if( iLimit>20 ){ |
| 2372 | style_submenu_element("20 Ancestors", "20 Ancestors", |
| 2373 | "%s", url_render(&url, "limit", "20", 0, 0)); |
| 2374 | } |
| 2375 | if( skin_detail_boolean("white-foreground") ){ |
| 2376 | clr1 = 0xa04040; |
| 2377 | clr2 = 0x4059a0; |
| 2378 | }else{ |
| 2379 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -2345,34 +2345,32 @@ | |
| 2345 | url_add_parameter(&url, "limit", sqlite3_mprintf("%d", iLimit)); |
| 2346 | } |
| 2347 | url_add_parameter(&url, "log", showLog ? "1" : "0"); |
| 2348 | if( ignoreWs ){ |
| 2349 | url_add_parameter(&url, "w", ""); |
| 2350 | style_submenu_element("Show Whitespace Changes", "%s", |
| 2351 | url_render(&url, "w", 0, 0, 0)); |
| 2352 | }else{ |
| 2353 | style_submenu_element("Ignore Whitespace", "%s", |
| 2354 | url_render(&url, "w", "", 0, 0)); |
| 2355 | } |
| 2356 | if( showLog ){ |
| 2357 | style_submenu_element("Hide Log", "%s", url_render(&url, "log", "0", 0, 0)); |
| 2358 | }else{ |
| 2359 | style_submenu_element("Show Log", "%s", url_render(&url, "log", "1", 0, 0)); |
| 2360 | } |
| 2361 | if( ann.bLimit ){ |
| 2362 | char *z1, *z2; |
| 2363 | style_submenu_element("All Ancestors", "%s", |
| 2364 | url_render(&url, "limit", "-1", 0, 0)); |
| 2365 | z1 = sqlite3_mprintf("%d Ancestors", iLimit+20); |
| 2366 | z2 = sqlite3_mprintf("%d", iLimit+20); |
| 2367 | style_submenu_element(z1, "%s", url_render(&url, "limit", z2, 0, 0)); |
| 2368 | } |
| 2369 | if( iLimit>20 ){ |
| 2370 | style_submenu_element("20 Ancestors", "%s", |
| 2371 | url_render(&url, "limit", "20", 0, 0)); |
| 2372 | } |
| 2373 | if( skin_detail_boolean("white-foreground") ){ |
| 2374 | clr1 = 0xa04040; |
| 2375 | clr2 = 0x4059a0; |
| 2376 | }else{ |
| 2377 |
+1
-1
| --- src/dispatch.c | ||
| +++ src/dispatch.c | ||
| @@ -238,11 +238,11 @@ | ||
| 238 | 238 | style_header("Command-line Help"); |
| 239 | 239 | if( zCmd ){ |
| 240 | 240 | int rc; |
| 241 | 241 | const CmdOrPage *pCmd = 0; |
| 242 | 242 | |
| 243 | - style_submenu_element("Command-List", "Command-List", "%s/help", g.zTop); | |
| 243 | + style_submenu_element("Command-List", "%s/help", g.zTop); | |
| 244 | 244 | if( *zCmd=='/' ){ |
| 245 | 245 | /* Some of the webpages require query parameters in order to work. |
| 246 | 246 | ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */ |
| 247 | 247 | @ <h1>The "%s(zCmd)" page:</h1> |
| 248 | 248 | }else{ |
| 249 | 249 |
| --- src/dispatch.c | |
| +++ src/dispatch.c | |
| @@ -238,11 +238,11 @@ | |
| 238 | style_header("Command-line Help"); |
| 239 | if( zCmd ){ |
| 240 | int rc; |
| 241 | const CmdOrPage *pCmd = 0; |
| 242 | |
| 243 | style_submenu_element("Command-List", "Command-List", "%s/help", g.zTop); |
| 244 | if( *zCmd=='/' ){ |
| 245 | /* Some of the webpages require query parameters in order to work. |
| 246 | ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */ |
| 247 | @ <h1>The "%s(zCmd)" page:</h1> |
| 248 | }else{ |
| 249 |
| --- src/dispatch.c | |
| +++ src/dispatch.c | |
| @@ -238,11 +238,11 @@ | |
| 238 | style_header("Command-line Help"); |
| 239 | if( zCmd ){ |
| 240 | int rc; |
| 241 | const CmdOrPage *pCmd = 0; |
| 242 | |
| 243 | style_submenu_element("Command-List", "%s/help", g.zTop); |
| 244 | if( *zCmd=='/' ){ |
| 245 | /* Some of the webpages require query parameters in order to work. |
| 246 | ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */ |
| 247 | @ <h1>The "%s(zCmd)" page:</h1> |
| 248 | }else{ |
| 249 |
+8
-9
| --- src/event.c | ||
| +++ src/event.c | ||
| @@ -152,40 +152,39 @@ | ||
| 152 | 152 | blob_appendf(&title, "Tech-note %S", zId); |
| 153 | 153 | tail = fullbody; |
| 154 | 154 | } |
| 155 | 155 | style_header("%s", blob_str(&title)); |
| 156 | 156 | if( g.perm.WrWiki && g.perm.Write && nextRid==0 ){ |
| 157 | - style_submenu_element("Edit", 0, "%R/technoteedit?name=%!S", zId); | |
| 157 | + style_submenu_element("Edit", "%R/technoteedit?name=%!S", zId); | |
| 158 | 158 | if( g.perm.Attach ){ |
| 159 | - style_submenu_element("Attach", "Add an attachment", | |
| 160 | - "%R/attachadd?technote=%!S&from=%R/technote/%!S", | |
| 161 | - zId, zId); | |
| 159 | + style_submenu_element("Attach", | |
| 160 | + "%R/attachadd?technote=%!S&from=%R/technote/%!S", zId, zId); | |
| 162 | 161 | } |
| 163 | 162 | } |
| 164 | 163 | zETime = db_text(0, "SELECT datetime(%.17g)", pTNote->rEventDate); |
| 165 | - style_submenu_element("Context", 0, "%R/timeline?c=%.20s", zId); | |
| 164 | + style_submenu_element("Context", "%R/timeline?c=%.20s", zId); | |
| 166 | 165 | if( g.perm.Hyperlink ){ |
| 167 | 166 | if( verboseFlag ){ |
| 168 | - style_submenu_element("Plain", 0, | |
| 167 | + style_submenu_element("Plain", | |
| 169 | 168 | "%R/technote?name=%!S&aid=%s&mimetype=text/plain", |
| 170 | 169 | zId, zUuid); |
| 171 | 170 | if( nextRid ){ |
| 172 | 171 | char *zNext; |
| 173 | 172 | zNext = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nextRid); |
| 174 | - style_submenu_element("Next", 0,"%R/technote?name=%!S&aid=%s&v", | |
| 173 | + style_submenu_element("Next", "%R/technote?name=%!S&aid=%s&v", | |
| 175 | 174 | zId, zNext); |
| 176 | 175 | free(zNext); |
| 177 | 176 | } |
| 178 | 177 | if( prevRid ){ |
| 179 | 178 | char *zPrev; |
| 180 | 179 | zPrev = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", prevRid); |
| 181 | - style_submenu_element("Prev", 0, "%R/technote?name=%!S&aid=%s&v", | |
| 180 | + style_submenu_element("Prev", "%R/technote?name=%!S&aid=%s&v", | |
| 182 | 181 | zId, zPrev); |
| 183 | 182 | free(zPrev); |
| 184 | 183 | } |
| 185 | 184 | }else{ |
| 186 | - style_submenu_element("Detail", 0, "%R/technote?name=%!S&aid=%s&v", | |
| 185 | + style_submenu_element("Detail", "%R/technote?name=%!S&aid=%s&v", | |
| 187 | 186 | zId, zUuid); |
| 188 | 187 | } |
| 189 | 188 | } |
| 190 | 189 | |
| 191 | 190 | if( verboseFlag && g.perm.Hyperlink ){ |
| 192 | 191 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -152,40 +152,39 @@ | |
| 152 | blob_appendf(&title, "Tech-note %S", zId); |
| 153 | tail = fullbody; |
| 154 | } |
| 155 | style_header("%s", blob_str(&title)); |
| 156 | if( g.perm.WrWiki && g.perm.Write && nextRid==0 ){ |
| 157 | style_submenu_element("Edit", 0, "%R/technoteedit?name=%!S", zId); |
| 158 | if( g.perm.Attach ){ |
| 159 | style_submenu_element("Attach", "Add an attachment", |
| 160 | "%R/attachadd?technote=%!S&from=%R/technote/%!S", |
| 161 | zId, zId); |
| 162 | } |
| 163 | } |
| 164 | zETime = db_text(0, "SELECT datetime(%.17g)", pTNote->rEventDate); |
| 165 | style_submenu_element("Context", 0, "%R/timeline?c=%.20s", zId); |
| 166 | if( g.perm.Hyperlink ){ |
| 167 | if( verboseFlag ){ |
| 168 | style_submenu_element("Plain", 0, |
| 169 | "%R/technote?name=%!S&aid=%s&mimetype=text/plain", |
| 170 | zId, zUuid); |
| 171 | if( nextRid ){ |
| 172 | char *zNext; |
| 173 | zNext = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nextRid); |
| 174 | style_submenu_element("Next", 0,"%R/technote?name=%!S&aid=%s&v", |
| 175 | zId, zNext); |
| 176 | free(zNext); |
| 177 | } |
| 178 | if( prevRid ){ |
| 179 | char *zPrev; |
| 180 | zPrev = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", prevRid); |
| 181 | style_submenu_element("Prev", 0, "%R/technote?name=%!S&aid=%s&v", |
| 182 | zId, zPrev); |
| 183 | free(zPrev); |
| 184 | } |
| 185 | }else{ |
| 186 | style_submenu_element("Detail", 0, "%R/technote?name=%!S&aid=%s&v", |
| 187 | zId, zUuid); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | if( verboseFlag && g.perm.Hyperlink ){ |
| 192 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -152,40 +152,39 @@ | |
| 152 | blob_appendf(&title, "Tech-note %S", zId); |
| 153 | tail = fullbody; |
| 154 | } |
| 155 | style_header("%s", blob_str(&title)); |
| 156 | if( g.perm.WrWiki && g.perm.Write && nextRid==0 ){ |
| 157 | style_submenu_element("Edit", "%R/technoteedit?name=%!S", zId); |
| 158 | if( g.perm.Attach ){ |
| 159 | style_submenu_element("Attach", |
| 160 | "%R/attachadd?technote=%!S&from=%R/technote/%!S", zId, zId); |
| 161 | } |
| 162 | } |
| 163 | zETime = db_text(0, "SELECT datetime(%.17g)", pTNote->rEventDate); |
| 164 | style_submenu_element("Context", "%R/timeline?c=%.20s", zId); |
| 165 | if( g.perm.Hyperlink ){ |
| 166 | if( verboseFlag ){ |
| 167 | style_submenu_element("Plain", |
| 168 | "%R/technote?name=%!S&aid=%s&mimetype=text/plain", |
| 169 | zId, zUuid); |
| 170 | if( nextRid ){ |
| 171 | char *zNext; |
| 172 | zNext = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nextRid); |
| 173 | style_submenu_element("Next", "%R/technote?name=%!S&aid=%s&v", |
| 174 | zId, zNext); |
| 175 | free(zNext); |
| 176 | } |
| 177 | if( prevRid ){ |
| 178 | char *zPrev; |
| 179 | zPrev = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", prevRid); |
| 180 | style_submenu_element("Prev", "%R/technote?name=%!S&aid=%s&v", |
| 181 | zId, zPrev); |
| 182 | free(zPrev); |
| 183 | } |
| 184 | }else{ |
| 185 | style_submenu_element("Detail", "%R/technote?name=%!S&aid=%s&v", |
| 186 | zId, zUuid); |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | if( verboseFlag && g.perm.Hyperlink ){ |
| 191 |
+1
-1
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -331,11 +331,11 @@ | ||
| 331 | 331 | @ No such file: %h(zFilename) |
| 332 | 332 | style_footer(); |
| 333 | 333 | return; |
| 334 | 334 | } |
| 335 | 335 | if( g.perm.Admin ){ |
| 336 | - style_submenu_element("MLink Table", "mtab", "%R/mlink?name=%t", zFilename); | |
| 336 | + style_submenu_element("MLink Table", "%R/mlink?name=%t", zFilename); | |
| 337 | 337 | } |
| 338 | 338 | if( baseCheckin ){ |
| 339 | 339 | compute_direct_ancestors(baseCheckin); |
| 340 | 340 | } |
| 341 | 341 | url_add_parameter(&url, "name", zFilename); |
| 342 | 342 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -331,11 +331,11 @@ | |
| 331 | @ No such file: %h(zFilename) |
| 332 | style_footer(); |
| 333 | return; |
| 334 | } |
| 335 | if( g.perm.Admin ){ |
| 336 | style_submenu_element("MLink Table", "mtab", "%R/mlink?name=%t", zFilename); |
| 337 | } |
| 338 | if( baseCheckin ){ |
| 339 | compute_direct_ancestors(baseCheckin); |
| 340 | } |
| 341 | url_add_parameter(&url, "name", zFilename); |
| 342 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -331,11 +331,11 @@ | |
| 331 | @ No such file: %h(zFilename) |
| 332 | style_footer(); |
| 333 | return; |
| 334 | } |
| 335 | if( g.perm.Admin ){ |
| 336 | style_submenu_element("MLink Table", "%R/mlink?name=%t", zFilename); |
| 337 | } |
| 338 | if( baseCheckin ){ |
| 339 | compute_direct_ancestors(baseCheckin); |
| 340 | } |
| 341 | url_add_parameter(&url, "name", zFilename); |
| 342 |
+3
-4
| --- src/http_socket.c | ||
| +++ src/http_socket.c | ||
| @@ -23,20 +23,19 @@ | ||
| 23 | 23 | ** of the server is held in global variables that are set by url_parse(). |
| 24 | 24 | ** |
| 25 | 25 | ** Low-level sockets are abstracted out into this module because they |
| 26 | 26 | ** are handled different on Unix and windows. |
| 27 | 27 | */ |
| 28 | - | |
| 28 | +#if defined(_WIN32) | |
| 29 | +# define _WIN32_WINNT 0x501 | |
| 30 | +#endif | |
| 29 | 31 | #ifndef __EXTENSIONS__ |
| 30 | 32 | # define __EXTENSIONS__ 1 /* IPv6 won't compile on Solaris without this */ |
| 31 | 33 | #endif |
| 32 | 34 | #include "config.h" |
| 33 | 35 | #include "http_socket.h" |
| 34 | 36 | #if defined(_WIN32) |
| 35 | -# if !defined(_WIN32_WINNT) | |
| 36 | -# define _WIN32_WINNT 0x0501 | |
| 37 | -# endif | |
| 38 | 37 | # include <winsock2.h> |
| 39 | 38 | # include <ws2tcpip.h> |
| 40 | 39 | #else |
| 41 | 40 | # include <netinet/in.h> |
| 42 | 41 | # include <arpa/inet.h> |
| 43 | 42 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -23,20 +23,19 @@ | |
| 23 | ** of the server is held in global variables that are set by url_parse(). |
| 24 | ** |
| 25 | ** Low-level sockets are abstracted out into this module because they |
| 26 | ** are handled different on Unix and windows. |
| 27 | */ |
| 28 | |
| 29 | #ifndef __EXTENSIONS__ |
| 30 | # define __EXTENSIONS__ 1 /* IPv6 won't compile on Solaris without this */ |
| 31 | #endif |
| 32 | #include "config.h" |
| 33 | #include "http_socket.h" |
| 34 | #if defined(_WIN32) |
| 35 | # if !defined(_WIN32_WINNT) |
| 36 | # define _WIN32_WINNT 0x0501 |
| 37 | # endif |
| 38 | # include <winsock2.h> |
| 39 | # include <ws2tcpip.h> |
| 40 | #else |
| 41 | # include <netinet/in.h> |
| 42 | # include <arpa/inet.h> |
| 43 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -23,20 +23,19 @@ | |
| 23 | ** of the server is held in global variables that are set by url_parse(). |
| 24 | ** |
| 25 | ** Low-level sockets are abstracted out into this module because they |
| 26 | ** are handled different on Unix and windows. |
| 27 | */ |
| 28 | #if defined(_WIN32) |
| 29 | # define _WIN32_WINNT 0x501 |
| 30 | #endif |
| 31 | #ifndef __EXTENSIONS__ |
| 32 | # define __EXTENSIONS__ 1 /* IPv6 won't compile on Solaris without this */ |
| 33 | #endif |
| 34 | #include "config.h" |
| 35 | #include "http_socket.h" |
| 36 | #if defined(_WIN32) |
| 37 | # include <winsock2.h> |
| 38 | # include <ws2tcpip.h> |
| 39 | #else |
| 40 | # include <netinet/in.h> |
| 41 | # include <arpa/inet.h> |
| 42 |
+43
-59
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -826,15 +826,13 @@ | ||
| 826 | 826 | } |
| 827 | 827 | } |
| 828 | 828 | style_header("Update of \"%h\"", pWiki->zWikiTitle); |
| 829 | 829 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 830 | 830 | zDate = db_text(0, "SELECT datetime(%.17g)", pWiki->rDate); |
| 831 | - style_submenu_element("Raw", "Raw", "artifact/%s", zUuid); | |
| 832 | - style_submenu_element("History", "History", "whistory?name=%t", | |
| 833 | - pWiki->zWikiTitle); | |
| 834 | - style_submenu_element("Page", "Page", "wiki?name=%t", | |
| 835 | - pWiki->zWikiTitle); | |
| 831 | + style_submenu_element("Raw", "artifact/%s", zUuid); | |
| 832 | + style_submenu_element("History", "whistory?name=%t", pWiki->zWikiTitle); | |
| 833 | + style_submenu_element("Page", "wiki?name=%t", pWiki->zWikiTitle); | |
| 836 | 834 | login_anonymous_available(); |
| 837 | 835 | @ <div class="section">Overview</div> |
| 838 | 836 | @ <p><table class="label-value"> |
| 839 | 837 | @ <tr><th>Artifact ID:</th> |
| 840 | 838 | @ <td>%z(href("%R/artifact/%!S",zUuid))%s(zUuid)</a> |
| @@ -1053,50 +1051,47 @@ | ||
| 1053 | 1051 | if(zGlob && !*zGlob){ |
| 1054 | 1052 | zGlob = NULL; |
| 1055 | 1053 | } |
| 1056 | 1054 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 1057 | 1055 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 1058 | - style_submenu_element("Path","path", | |
| 1059 | - "%R/timeline?me=%T&you=%T", zFrom, zTo); | |
| 1056 | + style_submenu_element("Path", "%R/timeline?me=%T&you=%T", zFrom, zTo); | |
| 1060 | 1057 | if( sideBySide || verboseFlag ){ |
| 1061 | - style_submenu_element("Hide Diff", "hidediff", | |
| 1062 | - "%R/vdiff?from=%T&to=%T&sbs=0%s%T%s", | |
| 1058 | + style_submenu_element("Hide Diff", "%R/vdiff?from=%T&to=%T&sbs=0%s%T%s", | |
| 1063 | 1059 | zFrom, zTo, |
| 1064 | 1060 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| 1065 | 1061 | } |
| 1066 | 1062 | if( !sideBySide ){ |
| 1067 | - style_submenu_element("Side-by-Side Diff", "sbsdiff", | |
| 1063 | + style_submenu_element("Side-by-Side Diff", | |
| 1068 | 1064 | "%R/vdiff?from=%T&to=%T&sbs=1%s%T%s", |
| 1069 | 1065 | zFrom, zTo, |
| 1070 | 1066 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| 1071 | 1067 | } |
| 1072 | 1068 | if( sideBySide || !verboseFlag ) { |
| 1073 | - style_submenu_element("Unified Diff", "udiff", | |
| 1069 | + style_submenu_element("Unified Diff", | |
| 1074 | 1070 | "%R/vdiff?from=%T&to=%T&sbs=0&v%s%T%s", |
| 1075 | 1071 | zFrom, zTo, |
| 1076 | 1072 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| 1077 | 1073 | } |
| 1078 | - style_submenu_element("Invert", "invert", | |
| 1074 | + style_submenu_element("Invert", | |
| 1079 | 1075 | "%R/vdiff?from=%T&to=%T&sbs=%d%s%s%T%s", zTo, zFrom, |
| 1080 | 1076 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", |
| 1081 | 1077 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| 1082 | 1078 | if( zGlob ){ |
| 1083 | - style_submenu_element("Clear glob", "clearglob", | |
| 1079 | + style_submenu_element("Clear glob", | |
| 1084 | 1080 | "%R/vdiff?from=%T&to=%T&sbs=%d%s%s", zFrom, zTo, |
| 1085 | 1081 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", zW); |
| 1086 | 1082 | }else{ |
| 1087 | - style_submenu_element("Patch", "patch", | |
| 1088 | - "%R/vpatch?from=%T&to=%T%s", zFrom, zTo, zW); | |
| 1083 | + style_submenu_element("Patch", "%R/vpatch?from=%T&to=%T%s", zFrom, zTo, zW); | |
| 1089 | 1084 | } |
| 1090 | 1085 | if( sideBySide || verboseFlag ){ |
| 1091 | 1086 | if( *zW ){ |
| 1092 | - style_submenu_element("Show Whitespace Differences", "whitespace", | |
| 1087 | + style_submenu_element("Show Whitespace Differences", | |
| 1093 | 1088 | "%R/vdiff?from=%T&to=%T&sbs=%d%s%s%T", zFrom, zTo, |
| 1094 | 1089 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", |
| 1095 | 1090 | zGlob ? "&glob=" : "", zGlob ? zGlob : ""); |
| 1096 | 1091 | }else{ |
| 1097 | - style_submenu_element("Ignore Whitespace", "ignorews", | |
| 1092 | + style_submenu_element("Ignore Whitespace", | |
| 1098 | 1093 | "%R/vdiff?from=%T&to=%T&sbs=%d%s%s%T&w", zFrom, zTo, |
| 1099 | 1094 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", |
| 1100 | 1095 | zGlob ? "&glob=" : "", zGlob ? zGlob : ""); |
| 1101 | 1096 | } |
| 1102 | 1097 | } |
| @@ -1514,26 +1509,26 @@ | ||
| 1514 | 1509 | diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML; |
| 1515 | 1510 | |
| 1516 | 1511 | style_header("Diff"); |
| 1517 | 1512 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 1518 | 1513 | if( *zW ){ |
| 1519 | - style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes", | |
| 1514 | + style_submenu_element("Show Whitespace Changes", | |
| 1520 | 1515 | "%s/fdiff?v1=%T&v2=%T&sbs=%d", |
| 1521 | 1516 | g.zTop, P("v1"), P("v2"), sideBySide); |
| 1522 | 1517 | }else{ |
| 1523 | - style_submenu_element("Ignore Whitespace", "Ignore Whitespace", | |
| 1518 | + style_submenu_element("Ignore Whitespace", | |
| 1524 | 1519 | "%s/fdiff?v1=%T&v2=%T&sbs=%d&w", |
| 1525 | 1520 | g.zTop, P("v1"), P("v2"), sideBySide); |
| 1526 | 1521 | } |
| 1527 | - style_submenu_element("Patch", "Patch", "%s/fdiff?v1=%T&v2=%T&patch", | |
| 1522 | + style_submenu_element("Patch", "%s/fdiff?v1=%T&v2=%T&patch", | |
| 1528 | 1523 | g.zTop, P("v1"), P("v2")); |
| 1529 | 1524 | if( !sideBySide ){ |
| 1530 | - style_submenu_element("Side-by-Side Diff", "sbsdiff", | |
| 1525 | + style_submenu_element("Side-by-Side Diff", | |
| 1531 | 1526 | "%s/fdiff?v1=%T&v2=%T&sbs=1%s", |
| 1532 | 1527 | g.zTop, P("v1"), P("v2"), zW); |
| 1533 | 1528 | }else{ |
| 1534 | - style_submenu_element("Unified Diff", "udiff", | |
| 1529 | + style_submenu_element("Unified Diff", | |
| 1535 | 1530 | "%s/fdiff?v1=%T&v2=%T&sbs=0%s", |
| 1536 | 1531 | g.zTop, P("v1"), P("v2"), zW); |
| 1537 | 1532 | } |
| 1538 | 1533 | |
| 1539 | 1534 | if( P("smhdr")!=0 ){ |
| @@ -1672,15 +1667,14 @@ | ||
| 1672 | 1667 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 1673 | 1668 | if( rid==0 ) fossil_redirect_home(); |
| 1674 | 1669 | if( g.perm.Admin ){ |
| 1675 | 1670 | const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1676 | 1671 | if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){ |
| 1677 | - style_submenu_element("Unshun","Unshun","%s/shun?accept=%s&sub=1#delshun", | |
| 1672 | + style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#delshun", | |
| 1678 | 1673 | g.zTop, zUuid); |
| 1679 | 1674 | }else{ |
| 1680 | - style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun", | |
| 1681 | - g.zTop, zUuid); | |
| 1675 | + style_submenu_element("Shun", "%s/shun?shun=%s#addshun", g.zTop, zUuid); | |
| 1682 | 1676 | } |
| 1683 | 1677 | } |
| 1684 | 1678 | style_header("Hex Artifact Content"); |
| 1685 | 1679 | zUuid = db_text("?","SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1686 | 1680 | if( g.perm.Setup ){ |
| @@ -1689,12 +1683,12 @@ | ||
| 1689 | 1683 | @ <h2>Artifact %s(zUuid):</h2> |
| 1690 | 1684 | } |
| 1691 | 1685 | blob_zero(&downloadName); |
| 1692 | 1686 | if( P("verbose")!=0 ) objdescFlags |= OBJDESC_DETAIL; |
| 1693 | 1687 | object_description(rid, objdescFlags, &downloadName); |
| 1694 | - style_submenu_element("Download", "Download", | |
| 1695 | - "%s/raw/%T?name=%s", g.zTop, blob_str(&downloadName), zUuid); | |
| 1688 | + style_submenu_element("Download", "%s/raw/%T?name=%s", | |
| 1689 | + g.zTop, blob_str(&downloadName), zUuid); | |
| 1696 | 1690 | @ <hr /> |
| 1697 | 1691 | content_get(rid, &content); |
| 1698 | 1692 | @ <blockquote><pre> |
| 1699 | 1693 | hexdump(&content); |
| 1700 | 1694 | @ </pre></blockquote> |
| @@ -1895,15 +1889,14 @@ | ||
| 1895 | 1889 | /*NOTREACHED*/ |
| 1896 | 1890 | } |
| 1897 | 1891 | if( g.perm.Admin ){ |
| 1898 | 1892 | const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1899 | 1893 | if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){ |
| 1900 | - style_submenu_element("Unshun","Unshun","%s/shun?accept=%s&sub=1#accshun", | |
| 1894 | + style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#accshun", | |
| 1901 | 1895 | g.zTop, zUuid); |
| 1902 | 1896 | }else{ |
| 1903 | - style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun", | |
| 1904 | - g.zTop, zUuid); | |
| 1897 | + style_submenu_element("Shun", "%s/shun?shun=%s#addshun", g.zTop, zUuid); | |
| 1905 | 1898 | } |
| 1906 | 1899 | } |
| 1907 | 1900 | style_header("%s", descOnly ? "Artifact Description" : "Artifact Content"); |
| 1908 | 1901 | zUuid = db_text("?", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1909 | 1902 | if( g.perm.Setup ){ |
| @@ -1925,48 +1918,42 @@ | ||
| 1925 | 1918 | const char *zIp = db_column_text(&q,2); |
| 1926 | 1919 | @ <p>Received on %s(zDate) from %h(zUser) at %h(zIp).</p> |
| 1927 | 1920 | } |
| 1928 | 1921 | db_finalize(&q); |
| 1929 | 1922 | } |
| 1930 | - style_submenu_element("Download", "Download", | |
| 1931 | - "%R/raw/%T?name=%s", blob_str(&downloadName), zUuid); | |
| 1923 | + style_submenu_element("Download", "%R/raw/%T?name=%s", | |
| 1924 | + blob_str(&downloadName), zUuid); | |
| 1932 | 1925 | if( db_exists("SELECT 1 FROM mlink WHERE fid=%d", rid) ){ |
| 1933 | - style_submenu_element("Check-ins Using", "Check-ins Using", | |
| 1934 | - "%R/timeline?n=200&uf=%s",zUuid); | |
| 1926 | + style_submenu_element("Check-ins Using", "%R/timeline?n=200&uf=%s", zUuid); | |
| 1935 | 1927 | } |
| 1936 | 1928 | asText = P("txt")!=0; |
| 1937 | 1929 | zMime = mimetype_from_name(blob_str(&downloadName)); |
| 1938 | 1930 | if( zMime ){ |
| 1939 | 1931 | if( fossil_strcmp(zMime, "text/html")==0 ){ |
| 1940 | 1932 | if( asText ){ |
| 1941 | - style_submenu_element("Html", "Html", | |
| 1942 | - "%s/artifact/%s", g.zTop, zUuid); | |
| 1933 | + style_submenu_element("Html", "%s/artifact/%s", g.zTop, zUuid); | |
| 1943 | 1934 | }else{ |
| 1944 | 1935 | renderAsHtml = 1; |
| 1945 | - style_submenu_element("Text", "Text", | |
| 1946 | - "%s/artifact/%s?txt=1", g.zTop, zUuid); | |
| 1936 | + style_submenu_element("Text", "%s/artifact/%s?txt=1", g.zTop, zUuid); | |
| 1947 | 1937 | } |
| 1948 | 1938 | }else if( fossil_strcmp(zMime, "text/x-fossil-wiki")==0 |
| 1949 | 1939 | || fossil_strcmp(zMime, "text/x-markdown")==0 ){ |
| 1950 | 1940 | if( asText ){ |
| 1951 | - style_submenu_element("Wiki", "Wiki", | |
| 1952 | - "%s/artifact/%s", g.zTop, zUuid); | |
| 1941 | + style_submenu_element("Wiki", "%s/artifact/%s", g.zTop, zUuid); | |
| 1953 | 1942 | }else{ |
| 1954 | 1943 | renderAsWiki = 1; |
| 1955 | - style_submenu_element("Text", "Text", | |
| 1956 | - "%s/artifact/%s?txt=1", g.zTop, zUuid); | |
| 1944 | + style_submenu_element("Text", "%s/artifact/%s?txt=1", g.zTop, zUuid); | |
| 1957 | 1945 | } |
| 1958 | 1946 | } |
| 1959 | 1947 | } |
| 1960 | 1948 | if( (objType & (OBJTYPE_WIKI|OBJTYPE_TICKET))!=0 ){ |
| 1961 | - style_submenu_element("Parsed", "Parsed", "%R/info/%s", zUuid); | |
| 1949 | + style_submenu_element("Parsed", "%R/info/%s", zUuid); | |
| 1962 | 1950 | } |
| 1963 | 1951 | if( descOnly ){ |
| 1964 | - style_submenu_element("Content", "Content", "%R/artifact/%s", zUuid); | |
| 1952 | + style_submenu_element("Content", "%R/artifact/%s", zUuid); | |
| 1965 | 1953 | }else{ |
| 1966 | - style_submenu_element("Line Numbers", "Line Numbers", | |
| 1967 | - "%R/artifact/%s%s",zUuid, | |
| 1954 | + style_submenu_element("Line Numbers", "%R/artifact/%s%s", zUuid, | |
| 1968 | 1955 | ((zLn&&*zLn) ? "" : "?txt=1&ln=0")); |
| 1969 | 1956 | @ <hr /> |
| 1970 | 1957 | content_get(rid, &content); |
| 1971 | 1958 | if( renderAsWiki ){ |
| 1972 | 1959 | wiki_render_by_mimetype(&content, zMime); |
| @@ -1975,11 +1962,11 @@ | ||
| 1975 | 1962 | @ width="100%%" frameborder="0" marginwidth="0" marginheight="0" |
| 1976 | 1963 | @ sandbox="allow-same-origin" |
| 1977 | 1964 | @ onload="this.height=this.contentDocument.documentElement.scrollHeight;"> |
| 1978 | 1965 | @ </iframe> |
| 1979 | 1966 | }else{ |
| 1980 | - style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid); | |
| 1967 | + style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid); | |
| 1981 | 1968 | blob_to_utf8_no_bom(&content, 0); |
| 1982 | 1969 | zMime = mimetype_from_content(&content); |
| 1983 | 1970 | @ <blockquote> |
| 1984 | 1971 | if( zMime==0 ){ |
| 1985 | 1972 | const char *z; |
| @@ -1992,12 +1979,11 @@ | ||
| 1992 | 1979 | @ </pre> |
| 1993 | 1980 | } |
| 1994 | 1981 | }else if( strncmp(zMime, "image/", 6)==0 ){ |
| 1995 | 1982 | @ <i>(file is %d(blob_size(&content)) bytes of image data)</i><br /> |
| 1996 | 1983 | @ <img src="%R/raw/%s(zUuid)?m=%s(zMime)" /> |
| 1997 | - style_submenu_element("Image", "Image", | |
| 1998 | - "%R/raw/%s?m=%s", zUuid, zMime); | |
| 1984 | + style_submenu_element("Image", "%R/raw/%s?m=%s", zUuid, zMime); | |
| 1999 | 1985 | }else{ |
| 2000 | 1986 | @ <i>(file is %d(blob_size(&content)) bytes of binary data)</i> |
| 2001 | 1987 | } |
| 2002 | 1988 | @ </blockquote> |
| 2003 | 1989 | } |
| @@ -2025,15 +2011,14 @@ | ||
| 2025 | 2011 | rid = name_to_rid_www("name"); |
| 2026 | 2012 | if( rid==0 ){ fossil_redirect_home(); } |
| 2027 | 2013 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 2028 | 2014 | if( g.perm.Admin ){ |
| 2029 | 2015 | if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){ |
| 2030 | - style_submenu_element("Unshun","Unshun", "%s/shun?accept=%s&sub=1#accshun", | |
| 2016 | + style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#accshun", | |
| 2031 | 2017 | g.zTop, zUuid); |
| 2032 | 2018 | }else{ |
| 2033 | - style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun", | |
| 2034 | - g.zTop, zUuid); | |
| 2019 | + style_submenu_element("Shun", "%s/shun?shun=%s#addshun", g.zTop, zUuid); | |
| 2035 | 2020 | } |
| 2036 | 2021 | } |
| 2037 | 2022 | pTktChng = manifest_get(rid, CFTYPE_TICKET, 0); |
| 2038 | 2023 | if( pTktChng==0 ) fossil_redirect_home(); |
| 2039 | 2024 | zDate = db_text(0, "SELECT datetime(%.12f)", pTktChng->rDate); |
| @@ -2060,19 +2045,18 @@ | ||
| 2060 | 2045 | } |
| 2061 | 2046 | zTktTitle = db_table_has_column("repository", "ticket", "title" ) |
| 2062 | 2047 | ? db_text("(No title)", "SELECT title FROM ticket WHERE tkt_uuid=%Q", zTktName) |
| 2063 | 2048 | : 0; |
| 2064 | 2049 | style_header("Ticket Change Details"); |
| 2065 | - style_submenu_element("Raw", "Raw", "%R/artifact/%s", zUuid); | |
| 2066 | - style_submenu_element("History", "History", "%R/tkthistory/%s", zTktName); | |
| 2067 | - style_submenu_element("Page", "Page", "%R/tktview/%t", zTktName); | |
| 2068 | - style_submenu_element("Timeline", "Timeline", "%R/tkttimeline/%t", zTktName); | |
| 2050 | + style_submenu_element("Raw", "%R/artifact/%s", zUuid); | |
| 2051 | + style_submenu_element("History", "%R/tkthistory/%s", zTktName); | |
| 2052 | + style_submenu_element("Page", "%R/tktview/%t", zTktName); | |
| 2053 | + style_submenu_element("Timeline", "%R/tkttimeline/%t", zTktName); | |
| 2069 | 2054 | if( P("plaintext") ){ |
| 2070 | - style_submenu_element("Formatted", "Formatted", "%R/info/%s", zUuid); | |
| 2055 | + style_submenu_element("Formatted", "%R/info/%s", zUuid); | |
| 2071 | 2056 | }else{ |
| 2072 | - style_submenu_element("Plaintext", "Plaintext", | |
| 2073 | - "%R/info/%s?plaintext", zUuid); | |
| 2057 | + style_submenu_element("Plaintext", "%R/info/%s?plaintext", zUuid); | |
| 2074 | 2058 | } |
| 2075 | 2059 | |
| 2076 | 2060 | @ <div class="section">Overview</div> |
| 2077 | 2061 | @ <p><table class="label-value"> |
| 2078 | 2062 | @ <tr><th>Artifact ID:</th> |
| 2079 | 2063 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -826,15 +826,13 @@ | |
| 826 | } |
| 827 | } |
| 828 | style_header("Update of \"%h\"", pWiki->zWikiTitle); |
| 829 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 830 | zDate = db_text(0, "SELECT datetime(%.17g)", pWiki->rDate); |
| 831 | style_submenu_element("Raw", "Raw", "artifact/%s", zUuid); |
| 832 | style_submenu_element("History", "History", "whistory?name=%t", |
| 833 | pWiki->zWikiTitle); |
| 834 | style_submenu_element("Page", "Page", "wiki?name=%t", |
| 835 | pWiki->zWikiTitle); |
| 836 | login_anonymous_available(); |
| 837 | @ <div class="section">Overview</div> |
| 838 | @ <p><table class="label-value"> |
| 839 | @ <tr><th>Artifact ID:</th> |
| 840 | @ <td>%z(href("%R/artifact/%!S",zUuid))%s(zUuid)</a> |
| @@ -1053,50 +1051,47 @@ | |
| 1053 | if(zGlob && !*zGlob){ |
| 1054 | zGlob = NULL; |
| 1055 | } |
| 1056 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 1057 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 1058 | style_submenu_element("Path","path", |
| 1059 | "%R/timeline?me=%T&you=%T", zFrom, zTo); |
| 1060 | if( sideBySide || verboseFlag ){ |
| 1061 | style_submenu_element("Hide Diff", "hidediff", |
| 1062 | "%R/vdiff?from=%T&to=%T&sbs=0%s%T%s", |
| 1063 | zFrom, zTo, |
| 1064 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| 1065 | } |
| 1066 | if( !sideBySide ){ |
| 1067 | style_submenu_element("Side-by-Side Diff", "sbsdiff", |
| 1068 | "%R/vdiff?from=%T&to=%T&sbs=1%s%T%s", |
| 1069 | zFrom, zTo, |
| 1070 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| 1071 | } |
| 1072 | if( sideBySide || !verboseFlag ) { |
| 1073 | style_submenu_element("Unified Diff", "udiff", |
| 1074 | "%R/vdiff?from=%T&to=%T&sbs=0&v%s%T%s", |
| 1075 | zFrom, zTo, |
| 1076 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| 1077 | } |
| 1078 | style_submenu_element("Invert", "invert", |
| 1079 | "%R/vdiff?from=%T&to=%T&sbs=%d%s%s%T%s", zTo, zFrom, |
| 1080 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", |
| 1081 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| 1082 | if( zGlob ){ |
| 1083 | style_submenu_element("Clear glob", "clearglob", |
| 1084 | "%R/vdiff?from=%T&to=%T&sbs=%d%s%s", zFrom, zTo, |
| 1085 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", zW); |
| 1086 | }else{ |
| 1087 | style_submenu_element("Patch", "patch", |
| 1088 | "%R/vpatch?from=%T&to=%T%s", zFrom, zTo, zW); |
| 1089 | } |
| 1090 | if( sideBySide || verboseFlag ){ |
| 1091 | if( *zW ){ |
| 1092 | style_submenu_element("Show Whitespace Differences", "whitespace", |
| 1093 | "%R/vdiff?from=%T&to=%T&sbs=%d%s%s%T", zFrom, zTo, |
| 1094 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", |
| 1095 | zGlob ? "&glob=" : "", zGlob ? zGlob : ""); |
| 1096 | }else{ |
| 1097 | style_submenu_element("Ignore Whitespace", "ignorews", |
| 1098 | "%R/vdiff?from=%T&to=%T&sbs=%d%s%s%T&w", zFrom, zTo, |
| 1099 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", |
| 1100 | zGlob ? "&glob=" : "", zGlob ? zGlob : ""); |
| 1101 | } |
| 1102 | } |
| @@ -1514,26 +1509,26 @@ | |
| 1514 | diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML; |
| 1515 | |
| 1516 | style_header("Diff"); |
| 1517 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 1518 | if( *zW ){ |
| 1519 | style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes", |
| 1520 | "%s/fdiff?v1=%T&v2=%T&sbs=%d", |
| 1521 | g.zTop, P("v1"), P("v2"), sideBySide); |
| 1522 | }else{ |
| 1523 | style_submenu_element("Ignore Whitespace", "Ignore Whitespace", |
| 1524 | "%s/fdiff?v1=%T&v2=%T&sbs=%d&w", |
| 1525 | g.zTop, P("v1"), P("v2"), sideBySide); |
| 1526 | } |
| 1527 | style_submenu_element("Patch", "Patch", "%s/fdiff?v1=%T&v2=%T&patch", |
| 1528 | g.zTop, P("v1"), P("v2")); |
| 1529 | if( !sideBySide ){ |
| 1530 | style_submenu_element("Side-by-Side Diff", "sbsdiff", |
| 1531 | "%s/fdiff?v1=%T&v2=%T&sbs=1%s", |
| 1532 | g.zTop, P("v1"), P("v2"), zW); |
| 1533 | }else{ |
| 1534 | style_submenu_element("Unified Diff", "udiff", |
| 1535 | "%s/fdiff?v1=%T&v2=%T&sbs=0%s", |
| 1536 | g.zTop, P("v1"), P("v2"), zW); |
| 1537 | } |
| 1538 | |
| 1539 | if( P("smhdr")!=0 ){ |
| @@ -1672,15 +1667,14 @@ | |
| 1672 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 1673 | if( rid==0 ) fossil_redirect_home(); |
| 1674 | if( g.perm.Admin ){ |
| 1675 | const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1676 | if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){ |
| 1677 | style_submenu_element("Unshun","Unshun","%s/shun?accept=%s&sub=1#delshun", |
| 1678 | g.zTop, zUuid); |
| 1679 | }else{ |
| 1680 | style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun", |
| 1681 | g.zTop, zUuid); |
| 1682 | } |
| 1683 | } |
| 1684 | style_header("Hex Artifact Content"); |
| 1685 | zUuid = db_text("?","SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1686 | if( g.perm.Setup ){ |
| @@ -1689,12 +1683,12 @@ | |
| 1689 | @ <h2>Artifact %s(zUuid):</h2> |
| 1690 | } |
| 1691 | blob_zero(&downloadName); |
| 1692 | if( P("verbose")!=0 ) objdescFlags |= OBJDESC_DETAIL; |
| 1693 | object_description(rid, objdescFlags, &downloadName); |
| 1694 | style_submenu_element("Download", "Download", |
| 1695 | "%s/raw/%T?name=%s", g.zTop, blob_str(&downloadName), zUuid); |
| 1696 | @ <hr /> |
| 1697 | content_get(rid, &content); |
| 1698 | @ <blockquote><pre> |
| 1699 | hexdump(&content); |
| 1700 | @ </pre></blockquote> |
| @@ -1895,15 +1889,14 @@ | |
| 1895 | /*NOTREACHED*/ |
| 1896 | } |
| 1897 | if( g.perm.Admin ){ |
| 1898 | const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1899 | if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){ |
| 1900 | style_submenu_element("Unshun","Unshun","%s/shun?accept=%s&sub=1#accshun", |
| 1901 | g.zTop, zUuid); |
| 1902 | }else{ |
| 1903 | style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun", |
| 1904 | g.zTop, zUuid); |
| 1905 | } |
| 1906 | } |
| 1907 | style_header("%s", descOnly ? "Artifact Description" : "Artifact Content"); |
| 1908 | zUuid = db_text("?", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1909 | if( g.perm.Setup ){ |
| @@ -1925,48 +1918,42 @@ | |
| 1925 | const char *zIp = db_column_text(&q,2); |
| 1926 | @ <p>Received on %s(zDate) from %h(zUser) at %h(zIp).</p> |
| 1927 | } |
| 1928 | db_finalize(&q); |
| 1929 | } |
| 1930 | style_submenu_element("Download", "Download", |
| 1931 | "%R/raw/%T?name=%s", blob_str(&downloadName), zUuid); |
| 1932 | if( db_exists("SELECT 1 FROM mlink WHERE fid=%d", rid) ){ |
| 1933 | style_submenu_element("Check-ins Using", "Check-ins Using", |
| 1934 | "%R/timeline?n=200&uf=%s",zUuid); |
| 1935 | } |
| 1936 | asText = P("txt")!=0; |
| 1937 | zMime = mimetype_from_name(blob_str(&downloadName)); |
| 1938 | if( zMime ){ |
| 1939 | if( fossil_strcmp(zMime, "text/html")==0 ){ |
| 1940 | if( asText ){ |
| 1941 | style_submenu_element("Html", "Html", |
| 1942 | "%s/artifact/%s", g.zTop, zUuid); |
| 1943 | }else{ |
| 1944 | renderAsHtml = 1; |
| 1945 | style_submenu_element("Text", "Text", |
| 1946 | "%s/artifact/%s?txt=1", g.zTop, zUuid); |
| 1947 | } |
| 1948 | }else if( fossil_strcmp(zMime, "text/x-fossil-wiki")==0 |
| 1949 | || fossil_strcmp(zMime, "text/x-markdown")==0 ){ |
| 1950 | if( asText ){ |
| 1951 | style_submenu_element("Wiki", "Wiki", |
| 1952 | "%s/artifact/%s", g.zTop, zUuid); |
| 1953 | }else{ |
| 1954 | renderAsWiki = 1; |
| 1955 | style_submenu_element("Text", "Text", |
| 1956 | "%s/artifact/%s?txt=1", g.zTop, zUuid); |
| 1957 | } |
| 1958 | } |
| 1959 | } |
| 1960 | if( (objType & (OBJTYPE_WIKI|OBJTYPE_TICKET))!=0 ){ |
| 1961 | style_submenu_element("Parsed", "Parsed", "%R/info/%s", zUuid); |
| 1962 | } |
| 1963 | if( descOnly ){ |
| 1964 | style_submenu_element("Content", "Content", "%R/artifact/%s", zUuid); |
| 1965 | }else{ |
| 1966 | style_submenu_element("Line Numbers", "Line Numbers", |
| 1967 | "%R/artifact/%s%s",zUuid, |
| 1968 | ((zLn&&*zLn) ? "" : "?txt=1&ln=0")); |
| 1969 | @ <hr /> |
| 1970 | content_get(rid, &content); |
| 1971 | if( renderAsWiki ){ |
| 1972 | wiki_render_by_mimetype(&content, zMime); |
| @@ -1975,11 +1962,11 @@ | |
| 1975 | @ width="100%%" frameborder="0" marginwidth="0" marginheight="0" |
| 1976 | @ sandbox="allow-same-origin" |
| 1977 | @ onload="this.height=this.contentDocument.documentElement.scrollHeight;"> |
| 1978 | @ </iframe> |
| 1979 | }else{ |
| 1980 | style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid); |
| 1981 | blob_to_utf8_no_bom(&content, 0); |
| 1982 | zMime = mimetype_from_content(&content); |
| 1983 | @ <blockquote> |
| 1984 | if( zMime==0 ){ |
| 1985 | const char *z; |
| @@ -1992,12 +1979,11 @@ | |
| 1992 | @ </pre> |
| 1993 | } |
| 1994 | }else if( strncmp(zMime, "image/", 6)==0 ){ |
| 1995 | @ <i>(file is %d(blob_size(&content)) bytes of image data)</i><br /> |
| 1996 | @ <img src="%R/raw/%s(zUuid)?m=%s(zMime)" /> |
| 1997 | style_submenu_element("Image", "Image", |
| 1998 | "%R/raw/%s?m=%s", zUuid, zMime); |
| 1999 | }else{ |
| 2000 | @ <i>(file is %d(blob_size(&content)) bytes of binary data)</i> |
| 2001 | } |
| 2002 | @ </blockquote> |
| 2003 | } |
| @@ -2025,15 +2011,14 @@ | |
| 2025 | rid = name_to_rid_www("name"); |
| 2026 | if( rid==0 ){ fossil_redirect_home(); } |
| 2027 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 2028 | if( g.perm.Admin ){ |
| 2029 | if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){ |
| 2030 | style_submenu_element("Unshun","Unshun", "%s/shun?accept=%s&sub=1#accshun", |
| 2031 | g.zTop, zUuid); |
| 2032 | }else{ |
| 2033 | style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun", |
| 2034 | g.zTop, zUuid); |
| 2035 | } |
| 2036 | } |
| 2037 | pTktChng = manifest_get(rid, CFTYPE_TICKET, 0); |
| 2038 | if( pTktChng==0 ) fossil_redirect_home(); |
| 2039 | zDate = db_text(0, "SELECT datetime(%.12f)", pTktChng->rDate); |
| @@ -2060,19 +2045,18 @@ | |
| 2060 | } |
| 2061 | zTktTitle = db_table_has_column("repository", "ticket", "title" ) |
| 2062 | ? db_text("(No title)", "SELECT title FROM ticket WHERE tkt_uuid=%Q", zTktName) |
| 2063 | : 0; |
| 2064 | style_header("Ticket Change Details"); |
| 2065 | style_submenu_element("Raw", "Raw", "%R/artifact/%s", zUuid); |
| 2066 | style_submenu_element("History", "History", "%R/tkthistory/%s", zTktName); |
| 2067 | style_submenu_element("Page", "Page", "%R/tktview/%t", zTktName); |
| 2068 | style_submenu_element("Timeline", "Timeline", "%R/tkttimeline/%t", zTktName); |
| 2069 | if( P("plaintext") ){ |
| 2070 | style_submenu_element("Formatted", "Formatted", "%R/info/%s", zUuid); |
| 2071 | }else{ |
| 2072 | style_submenu_element("Plaintext", "Plaintext", |
| 2073 | "%R/info/%s?plaintext", zUuid); |
| 2074 | } |
| 2075 | |
| 2076 | @ <div class="section">Overview</div> |
| 2077 | @ <p><table class="label-value"> |
| 2078 | @ <tr><th>Artifact ID:</th> |
| 2079 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -826,15 +826,13 @@ | |
| 826 | } |
| 827 | } |
| 828 | style_header("Update of \"%h\"", pWiki->zWikiTitle); |
| 829 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 830 | zDate = db_text(0, "SELECT datetime(%.17g)", pWiki->rDate); |
| 831 | style_submenu_element("Raw", "artifact/%s", zUuid); |
| 832 | style_submenu_element("History", "whistory?name=%t", pWiki->zWikiTitle); |
| 833 | style_submenu_element("Page", "wiki?name=%t", pWiki->zWikiTitle); |
| 834 | login_anonymous_available(); |
| 835 | @ <div class="section">Overview</div> |
| 836 | @ <p><table class="label-value"> |
| 837 | @ <tr><th>Artifact ID:</th> |
| 838 | @ <td>%z(href("%R/artifact/%!S",zUuid))%s(zUuid)</a> |
| @@ -1053,50 +1051,47 @@ | |
| 1051 | if(zGlob && !*zGlob){ |
| 1052 | zGlob = NULL; |
| 1053 | } |
| 1054 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 1055 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 1056 | style_submenu_element("Path", "%R/timeline?me=%T&you=%T", zFrom, zTo); |
| 1057 | if( sideBySide || verboseFlag ){ |
| 1058 | style_submenu_element("Hide Diff", "%R/vdiff?from=%T&to=%T&sbs=0%s%T%s", |
| 1059 | zFrom, zTo, |
| 1060 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| 1061 | } |
| 1062 | if( !sideBySide ){ |
| 1063 | style_submenu_element("Side-by-Side Diff", |
| 1064 | "%R/vdiff?from=%T&to=%T&sbs=1%s%T%s", |
| 1065 | zFrom, zTo, |
| 1066 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| 1067 | } |
| 1068 | if( sideBySide || !verboseFlag ) { |
| 1069 | style_submenu_element("Unified Diff", |
| 1070 | "%R/vdiff?from=%T&to=%T&sbs=0&v%s%T%s", |
| 1071 | zFrom, zTo, |
| 1072 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| 1073 | } |
| 1074 | style_submenu_element("Invert", |
| 1075 | "%R/vdiff?from=%T&to=%T&sbs=%d%s%s%T%s", zTo, zFrom, |
| 1076 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", |
| 1077 | zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW); |
| 1078 | if( zGlob ){ |
| 1079 | style_submenu_element("Clear glob", |
| 1080 | "%R/vdiff?from=%T&to=%T&sbs=%d%s%s", zFrom, zTo, |
| 1081 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", zW); |
| 1082 | }else{ |
| 1083 | style_submenu_element("Patch", "%R/vpatch?from=%T&to=%T%s", zFrom, zTo, zW); |
| 1084 | } |
| 1085 | if( sideBySide || verboseFlag ){ |
| 1086 | if( *zW ){ |
| 1087 | style_submenu_element("Show Whitespace Differences", |
| 1088 | "%R/vdiff?from=%T&to=%T&sbs=%d%s%s%T", zFrom, zTo, |
| 1089 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", |
| 1090 | zGlob ? "&glob=" : "", zGlob ? zGlob : ""); |
| 1091 | }else{ |
| 1092 | style_submenu_element("Ignore Whitespace", |
| 1093 | "%R/vdiff?from=%T&to=%T&sbs=%d%s%s%T&w", zFrom, zTo, |
| 1094 | sideBySide, (verboseFlag && !sideBySide)?"&v":"", |
| 1095 | zGlob ? "&glob=" : "", zGlob ? zGlob : ""); |
| 1096 | } |
| 1097 | } |
| @@ -1514,26 +1509,26 @@ | |
| 1509 | diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML; |
| 1510 | |
| 1511 | style_header("Diff"); |
| 1512 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 1513 | if( *zW ){ |
| 1514 | style_submenu_element("Show Whitespace Changes", |
| 1515 | "%s/fdiff?v1=%T&v2=%T&sbs=%d", |
| 1516 | g.zTop, P("v1"), P("v2"), sideBySide); |
| 1517 | }else{ |
| 1518 | style_submenu_element("Ignore Whitespace", |
| 1519 | "%s/fdiff?v1=%T&v2=%T&sbs=%d&w", |
| 1520 | g.zTop, P("v1"), P("v2"), sideBySide); |
| 1521 | } |
| 1522 | style_submenu_element("Patch", "%s/fdiff?v1=%T&v2=%T&patch", |
| 1523 | g.zTop, P("v1"), P("v2")); |
| 1524 | if( !sideBySide ){ |
| 1525 | style_submenu_element("Side-by-Side Diff", |
| 1526 | "%s/fdiff?v1=%T&v2=%T&sbs=1%s", |
| 1527 | g.zTop, P("v1"), P("v2"), zW); |
| 1528 | }else{ |
| 1529 | style_submenu_element("Unified Diff", |
| 1530 | "%s/fdiff?v1=%T&v2=%T&sbs=0%s", |
| 1531 | g.zTop, P("v1"), P("v2"), zW); |
| 1532 | } |
| 1533 | |
| 1534 | if( P("smhdr")!=0 ){ |
| @@ -1672,15 +1667,14 @@ | |
| 1667 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 1668 | if( rid==0 ) fossil_redirect_home(); |
| 1669 | if( g.perm.Admin ){ |
| 1670 | const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1671 | if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){ |
| 1672 | style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#delshun", |
| 1673 | g.zTop, zUuid); |
| 1674 | }else{ |
| 1675 | style_submenu_element("Shun", "%s/shun?shun=%s#addshun", g.zTop, zUuid); |
| 1676 | } |
| 1677 | } |
| 1678 | style_header("Hex Artifact Content"); |
| 1679 | zUuid = db_text("?","SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1680 | if( g.perm.Setup ){ |
| @@ -1689,12 +1683,12 @@ | |
| 1683 | @ <h2>Artifact %s(zUuid):</h2> |
| 1684 | } |
| 1685 | blob_zero(&downloadName); |
| 1686 | if( P("verbose")!=0 ) objdescFlags |= OBJDESC_DETAIL; |
| 1687 | object_description(rid, objdescFlags, &downloadName); |
| 1688 | style_submenu_element("Download", "%s/raw/%T?name=%s", |
| 1689 | g.zTop, blob_str(&downloadName), zUuid); |
| 1690 | @ <hr /> |
| 1691 | content_get(rid, &content); |
| 1692 | @ <blockquote><pre> |
| 1693 | hexdump(&content); |
| 1694 | @ </pre></blockquote> |
| @@ -1895,15 +1889,14 @@ | |
| 1889 | /*NOTREACHED*/ |
| 1890 | } |
| 1891 | if( g.perm.Admin ){ |
| 1892 | const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1893 | if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){ |
| 1894 | style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#accshun", |
| 1895 | g.zTop, zUuid); |
| 1896 | }else{ |
| 1897 | style_submenu_element("Shun", "%s/shun?shun=%s#addshun", g.zTop, zUuid); |
| 1898 | } |
| 1899 | } |
| 1900 | style_header("%s", descOnly ? "Artifact Description" : "Artifact Content"); |
| 1901 | zUuid = db_text("?", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1902 | if( g.perm.Setup ){ |
| @@ -1925,48 +1918,42 @@ | |
| 1918 | const char *zIp = db_column_text(&q,2); |
| 1919 | @ <p>Received on %s(zDate) from %h(zUser) at %h(zIp).</p> |
| 1920 | } |
| 1921 | db_finalize(&q); |
| 1922 | } |
| 1923 | style_submenu_element("Download", "%R/raw/%T?name=%s", |
| 1924 | blob_str(&downloadName), zUuid); |
| 1925 | if( db_exists("SELECT 1 FROM mlink WHERE fid=%d", rid) ){ |
| 1926 | style_submenu_element("Check-ins Using", "%R/timeline?n=200&uf=%s", zUuid); |
| 1927 | } |
| 1928 | asText = P("txt")!=0; |
| 1929 | zMime = mimetype_from_name(blob_str(&downloadName)); |
| 1930 | if( zMime ){ |
| 1931 | if( fossil_strcmp(zMime, "text/html")==0 ){ |
| 1932 | if( asText ){ |
| 1933 | style_submenu_element("Html", "%s/artifact/%s", g.zTop, zUuid); |
| 1934 | }else{ |
| 1935 | renderAsHtml = 1; |
| 1936 | style_submenu_element("Text", "%s/artifact/%s?txt=1", g.zTop, zUuid); |
| 1937 | } |
| 1938 | }else if( fossil_strcmp(zMime, "text/x-fossil-wiki")==0 |
| 1939 | || fossil_strcmp(zMime, "text/x-markdown")==0 ){ |
| 1940 | if( asText ){ |
| 1941 | style_submenu_element("Wiki", "%s/artifact/%s", g.zTop, zUuid); |
| 1942 | }else{ |
| 1943 | renderAsWiki = 1; |
| 1944 | style_submenu_element("Text", "%s/artifact/%s?txt=1", g.zTop, zUuid); |
| 1945 | } |
| 1946 | } |
| 1947 | } |
| 1948 | if( (objType & (OBJTYPE_WIKI|OBJTYPE_TICKET))!=0 ){ |
| 1949 | style_submenu_element("Parsed", "%R/info/%s", zUuid); |
| 1950 | } |
| 1951 | if( descOnly ){ |
| 1952 | style_submenu_element("Content", "%R/artifact/%s", zUuid); |
| 1953 | }else{ |
| 1954 | style_submenu_element("Line Numbers", "%R/artifact/%s%s", zUuid, |
| 1955 | ((zLn&&*zLn) ? "" : "?txt=1&ln=0")); |
| 1956 | @ <hr /> |
| 1957 | content_get(rid, &content); |
| 1958 | if( renderAsWiki ){ |
| 1959 | wiki_render_by_mimetype(&content, zMime); |
| @@ -1975,11 +1962,11 @@ | |
| 1962 | @ width="100%%" frameborder="0" marginwidth="0" marginheight="0" |
| 1963 | @ sandbox="allow-same-origin" |
| 1964 | @ onload="this.height=this.contentDocument.documentElement.scrollHeight;"> |
| 1965 | @ </iframe> |
| 1966 | }else{ |
| 1967 | style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid); |
| 1968 | blob_to_utf8_no_bom(&content, 0); |
| 1969 | zMime = mimetype_from_content(&content); |
| 1970 | @ <blockquote> |
| 1971 | if( zMime==0 ){ |
| 1972 | const char *z; |
| @@ -1992,12 +1979,11 @@ | |
| 1979 | @ </pre> |
| 1980 | } |
| 1981 | }else if( strncmp(zMime, "image/", 6)==0 ){ |
| 1982 | @ <i>(file is %d(blob_size(&content)) bytes of image data)</i><br /> |
| 1983 | @ <img src="%R/raw/%s(zUuid)?m=%s(zMime)" /> |
| 1984 | style_submenu_element("Image", "%R/raw/%s?m=%s", zUuid, zMime); |
| 1985 | }else{ |
| 1986 | @ <i>(file is %d(blob_size(&content)) bytes of binary data)</i> |
| 1987 | } |
| 1988 | @ </blockquote> |
| 1989 | } |
| @@ -2025,15 +2011,14 @@ | |
| 2011 | rid = name_to_rid_www("name"); |
| 2012 | if( rid==0 ){ fossil_redirect_home(); } |
| 2013 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 2014 | if( g.perm.Admin ){ |
| 2015 | if( db_exists("SELECT 1 FROM shun WHERE uuid=%Q", zUuid) ){ |
| 2016 | style_submenu_element("Unshun", "%s/shun?accept=%s&sub=1#accshun", |
| 2017 | g.zTop, zUuid); |
| 2018 | }else{ |
| 2019 | style_submenu_element("Shun", "%s/shun?shun=%s#addshun", g.zTop, zUuid); |
| 2020 | } |
| 2021 | } |
| 2022 | pTktChng = manifest_get(rid, CFTYPE_TICKET, 0); |
| 2023 | if( pTktChng==0 ) fossil_redirect_home(); |
| 2024 | zDate = db_text(0, "SELECT datetime(%.12f)", pTktChng->rDate); |
| @@ -2060,19 +2045,18 @@ | |
| 2045 | } |
| 2046 | zTktTitle = db_table_has_column("repository", "ticket", "title" ) |
| 2047 | ? db_text("(No title)", "SELECT title FROM ticket WHERE tkt_uuid=%Q", zTktName) |
| 2048 | : 0; |
| 2049 | style_header("Ticket Change Details"); |
| 2050 | style_submenu_element("Raw", "%R/artifact/%s", zUuid); |
| 2051 | style_submenu_element("History", "%R/tkthistory/%s", zTktName); |
| 2052 | style_submenu_element("Page", "%R/tktview/%t", zTktName); |
| 2053 | style_submenu_element("Timeline", "%R/tkttimeline/%t", zTktName); |
| 2054 | if( P("plaintext") ){ |
| 2055 | style_submenu_element("Formatted", "%R/info/%s", zUuid); |
| 2056 | }else{ |
| 2057 | style_submenu_element("Plaintext", "%R/info/%s?plaintext", zUuid); |
| 2058 | } |
| 2059 | |
| 2060 | @ <div class="section">Overview</div> |
| 2061 | @ <p><table class="label-value"> |
| 2062 | @ <tr><th>Artifact ID:</th> |
| 2063 |
+34
| --- src/linenoise.c | ||
| +++ src/linenoise.c | ||
| @@ -105,10 +105,11 @@ | ||
| 105 | 105 | * |
| 106 | 106 | */ |
| 107 | 107 | |
| 108 | 108 | #include <termios.h> |
| 109 | 109 | #include <unistd.h> |
| 110 | +#include <stdarg.h> | |
| 110 | 111 | #include <stdlib.h> |
| 111 | 112 | #include <stdio.h> |
| 112 | 113 | #include <errno.h> |
| 113 | 114 | #include <string.h> |
| 114 | 115 | #include <stdlib.h> |
| @@ -115,10 +116,11 @@ | ||
| 115 | 116 | #include <ctype.h> |
| 116 | 117 | #include <sys/types.h> |
| 117 | 118 | #include <sys/ioctl.h> |
| 118 | 119 | #include <unistd.h> |
| 119 | 120 | #include "linenoise.h" |
| 121 | +#include "sqlite3.h" | |
| 120 | 122 | |
| 121 | 123 | #define LINENOISE_DEFAULT_HISTORY_MAX_LEN 100 |
| 122 | 124 | #define LINENOISE_MAX_LINE 4096 |
| 123 | 125 | static const char *unsupported_term[] = {"dumb","cons25","emacs",NULL}; |
| 124 | 126 | static linenoiseCompletionCallback *completionCallback = NULL; |
| @@ -191,10 +193,42 @@ | ||
| 191 | 193 | fflush(lndebug_fp); \ |
| 192 | 194 | } while (0) |
| 193 | 195 | #else |
| 194 | 196 | #define lndebug(fmt, arg1) |
| 195 | 197 | #endif |
| 198 | + | |
| 199 | +/* =========================== C89 compatibility ============================ */ | |
| 200 | + | |
| 201 | +/* snprintf() is not C89, but sqlite3_vsnprintf() can be adapted. */ | |
| 202 | +static int linenoiseSnprintf(char *str, size_t size, const char *format, ...) { | |
| 203 | + va_list ap; | |
| 204 | + int result; | |
| 205 | + | |
| 206 | + va_start(ap,format); | |
| 207 | + result = (int)strlen(sqlite3_vsnprintf((int)size,str,format,ap)); | |
| 208 | + va_end(ap); | |
| 209 | + | |
| 210 | + return result; | |
| 211 | +} | |
| 212 | +#undef snprintf | |
| 213 | +#define snprintf linenoiseSnprintf | |
| 214 | + | |
| 215 | +/* strdup() is technically not standard C89 despite being in POSIX. */ | |
| 216 | +static char *linenoiseStrdup(const char *s) { | |
| 217 | + size_t size = strlen(s)+1; | |
| 218 | + char *result = malloc(size); | |
| 219 | + | |
| 220 | + if (result) memcpy(result,s,size); | |
| 221 | + | |
| 222 | + return result; | |
| 223 | +} | |
| 224 | +#undef strdup | |
| 225 | +#define strdup linenoiseStrdup | |
| 226 | + | |
| 227 | +/* strcasecmp() is not standard C89. SQLite offers a direct replacement. */ | |
| 228 | +#undef strcasecmp | |
| 229 | +#define strcasecmp sqlite3_stricmp | |
| 196 | 230 | |
| 197 | 231 | /* ======================= Low level terminal handling ====================== */ |
| 198 | 232 | |
| 199 | 233 | /* Set if to use or not the multi line mode. */ |
| 200 | 234 | void linenoiseSetMultiLine(int ml) { |
| 201 | 235 |
| --- src/linenoise.c | |
| +++ src/linenoise.c | |
| @@ -105,10 +105,11 @@ | |
| 105 | * |
| 106 | */ |
| 107 | |
| 108 | #include <termios.h> |
| 109 | #include <unistd.h> |
| 110 | #include <stdlib.h> |
| 111 | #include <stdio.h> |
| 112 | #include <errno.h> |
| 113 | #include <string.h> |
| 114 | #include <stdlib.h> |
| @@ -115,10 +116,11 @@ | |
| 115 | #include <ctype.h> |
| 116 | #include <sys/types.h> |
| 117 | #include <sys/ioctl.h> |
| 118 | #include <unistd.h> |
| 119 | #include "linenoise.h" |
| 120 | |
| 121 | #define LINENOISE_DEFAULT_HISTORY_MAX_LEN 100 |
| 122 | #define LINENOISE_MAX_LINE 4096 |
| 123 | static const char *unsupported_term[] = {"dumb","cons25","emacs",NULL}; |
| 124 | static linenoiseCompletionCallback *completionCallback = NULL; |
| @@ -191,10 +193,42 @@ | |
| 191 | fflush(lndebug_fp); \ |
| 192 | } while (0) |
| 193 | #else |
| 194 | #define lndebug(fmt, arg1) |
| 195 | #endif |
| 196 | |
| 197 | /* ======================= Low level terminal handling ====================== */ |
| 198 | |
| 199 | /* Set if to use or not the multi line mode. */ |
| 200 | void linenoiseSetMultiLine(int ml) { |
| 201 |
| --- src/linenoise.c | |
| +++ src/linenoise.c | |
| @@ -105,10 +105,11 @@ | |
| 105 | * |
| 106 | */ |
| 107 | |
| 108 | #include <termios.h> |
| 109 | #include <unistd.h> |
| 110 | #include <stdarg.h> |
| 111 | #include <stdlib.h> |
| 112 | #include <stdio.h> |
| 113 | #include <errno.h> |
| 114 | #include <string.h> |
| 115 | #include <stdlib.h> |
| @@ -115,10 +116,11 @@ | |
| 116 | #include <ctype.h> |
| 117 | #include <sys/types.h> |
| 118 | #include <sys/ioctl.h> |
| 119 | #include <unistd.h> |
| 120 | #include "linenoise.h" |
| 121 | #include "sqlite3.h" |
| 122 | |
| 123 | #define LINENOISE_DEFAULT_HISTORY_MAX_LEN 100 |
| 124 | #define LINENOISE_MAX_LINE 4096 |
| 125 | static const char *unsupported_term[] = {"dumb","cons25","emacs",NULL}; |
| 126 | static linenoiseCompletionCallback *completionCallback = NULL; |
| @@ -191,10 +193,42 @@ | |
| 193 | fflush(lndebug_fp); \ |
| 194 | } while (0) |
| 195 | #else |
| 196 | #define lndebug(fmt, arg1) |
| 197 | #endif |
| 198 | |
| 199 | /* =========================== C89 compatibility ============================ */ |
| 200 | |
| 201 | /* snprintf() is not C89, but sqlite3_vsnprintf() can be adapted. */ |
| 202 | static int linenoiseSnprintf(char *str, size_t size, const char *format, ...) { |
| 203 | va_list ap; |
| 204 | int result; |
| 205 | |
| 206 | va_start(ap,format); |
| 207 | result = (int)strlen(sqlite3_vsnprintf((int)size,str,format,ap)); |
| 208 | va_end(ap); |
| 209 | |
| 210 | return result; |
| 211 | } |
| 212 | #undef snprintf |
| 213 | #define snprintf linenoiseSnprintf |
| 214 | |
| 215 | /* strdup() is technically not standard C89 despite being in POSIX. */ |
| 216 | static char *linenoiseStrdup(const char *s) { |
| 217 | size_t size = strlen(s)+1; |
| 218 | char *result = malloc(size); |
| 219 | |
| 220 | if (result) memcpy(result,s,size); |
| 221 | |
| 222 | return result; |
| 223 | } |
| 224 | #undef strdup |
| 225 | #define strdup linenoiseStrdup |
| 226 | |
| 227 | /* strcasecmp() is not standard C89. SQLite offers a direct replacement. */ |
| 228 | #undef strcasecmp |
| 229 | #define strcasecmp sqlite3_stricmp |
| 230 | |
| 231 | /* ======================= Low level terminal handling ====================== */ |
| 232 | |
| 233 | /* Set if to use or not the multi line mode. */ |
| 234 | void linenoiseSetMultiLine(int ml) { |
| 235 |
+4
-4
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -1006,11 +1006,11 @@ | ||
| 1006 | 1006 | char *zRange; |
| 1007 | 1007 | |
| 1008 | 1008 | login_check_credentials(); |
| 1009 | 1009 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 1010 | 1010 | style_header("List Of Artifacts"); |
| 1011 | - style_submenu_element("250 Largest", 0, "bigbloblist"); | |
| 1011 | + style_submenu_element("250 Largest", "bigbloblist"); | |
| 1012 | 1012 | if( !unpubOnly && mx>n && P("s")==0 ){ |
| 1013 | 1013 | int i; |
| 1014 | 1014 | @ <p>Select a range of artifacts to view:</p> |
| 1015 | 1015 | @ <ul> |
| 1016 | 1016 | for(i=1; i<=mx; i+=n){ |
| @@ -1020,11 +1020,11 @@ | ||
| 1020 | 1020 | @ </ul> |
| 1021 | 1021 | style_footer(); |
| 1022 | 1022 | return; |
| 1023 | 1023 | } |
| 1024 | 1024 | if( !unpubOnly && mx>n ){ |
| 1025 | - style_submenu_element("Index", "Index", "bloblist"); | |
| 1025 | + style_submenu_element("Index", "bloblist"); | |
| 1026 | 1026 | } |
| 1027 | 1027 | if( unpubOnly ){ |
| 1028 | 1028 | zRange = mprintf("IN private"); |
| 1029 | 1029 | }else{ |
| 1030 | 1030 | zRange = mprintf("BETWEEN %d AND %d", s, s+n-1); |
| @@ -1220,15 +1220,15 @@ | ||
| 1220 | 1220 | */ |
| 1221 | 1221 | void hash_collisions_webpage(void){ |
| 1222 | 1222 | login_check_credentials(); |
| 1223 | 1223 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 1224 | 1224 | style_header("SHA1 Prefix Collisions"); |
| 1225 | - style_submenu_element("Activity Reports", 0, "reports"); | |
| 1226 | - style_submenu_element("Stats", 0, "stat"); | |
| 1225 | + style_submenu_element("Activity Reports", "reports"); | |
| 1226 | + style_submenu_element("Stats", "stat"); | |
| 1227 | 1227 | @ <h1>Hash Prefix Collisions on Check-ins</h1> |
| 1228 | 1228 | collision_report("SELECT (SELECT uuid FROM blob WHERE rid=objid)" |
| 1229 | 1229 | " FROM event WHERE event.type='ci'" |
| 1230 | 1230 | " ORDER BY 1"); |
| 1231 | 1231 | @ <h1>Hash Prefix Collisions on All Artifacts</h1> |
| 1232 | 1232 | collision_report("SELECT uuid FROM blob ORDER BY 1"); |
| 1233 | 1233 | style_footer(); |
| 1234 | 1234 | } |
| 1235 | 1235 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -1006,11 +1006,11 @@ | |
| 1006 | char *zRange; |
| 1007 | |
| 1008 | login_check_credentials(); |
| 1009 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 1010 | style_header("List Of Artifacts"); |
| 1011 | style_submenu_element("250 Largest", 0, "bigbloblist"); |
| 1012 | if( !unpubOnly && mx>n && P("s")==0 ){ |
| 1013 | int i; |
| 1014 | @ <p>Select a range of artifacts to view:</p> |
| 1015 | @ <ul> |
| 1016 | for(i=1; i<=mx; i+=n){ |
| @@ -1020,11 +1020,11 @@ | |
| 1020 | @ </ul> |
| 1021 | style_footer(); |
| 1022 | return; |
| 1023 | } |
| 1024 | if( !unpubOnly && mx>n ){ |
| 1025 | style_submenu_element("Index", "Index", "bloblist"); |
| 1026 | } |
| 1027 | if( unpubOnly ){ |
| 1028 | zRange = mprintf("IN private"); |
| 1029 | }else{ |
| 1030 | zRange = mprintf("BETWEEN %d AND %d", s, s+n-1); |
| @@ -1220,15 +1220,15 @@ | |
| 1220 | */ |
| 1221 | void hash_collisions_webpage(void){ |
| 1222 | login_check_credentials(); |
| 1223 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 1224 | style_header("SHA1 Prefix Collisions"); |
| 1225 | style_submenu_element("Activity Reports", 0, "reports"); |
| 1226 | style_submenu_element("Stats", 0, "stat"); |
| 1227 | @ <h1>Hash Prefix Collisions on Check-ins</h1> |
| 1228 | collision_report("SELECT (SELECT uuid FROM blob WHERE rid=objid)" |
| 1229 | " FROM event WHERE event.type='ci'" |
| 1230 | " ORDER BY 1"); |
| 1231 | @ <h1>Hash Prefix Collisions on All Artifacts</h1> |
| 1232 | collision_report("SELECT uuid FROM blob ORDER BY 1"); |
| 1233 | style_footer(); |
| 1234 | } |
| 1235 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -1006,11 +1006,11 @@ | |
| 1006 | char *zRange; |
| 1007 | |
| 1008 | login_check_credentials(); |
| 1009 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 1010 | style_header("List Of Artifacts"); |
| 1011 | style_submenu_element("250 Largest", "bigbloblist"); |
| 1012 | if( !unpubOnly && mx>n && P("s")==0 ){ |
| 1013 | int i; |
| 1014 | @ <p>Select a range of artifacts to view:</p> |
| 1015 | @ <ul> |
| 1016 | for(i=1; i<=mx; i+=n){ |
| @@ -1020,11 +1020,11 @@ | |
| 1020 | @ </ul> |
| 1021 | style_footer(); |
| 1022 | return; |
| 1023 | } |
| 1024 | if( !unpubOnly && mx>n ){ |
| 1025 | style_submenu_element("Index", "bloblist"); |
| 1026 | } |
| 1027 | if( unpubOnly ){ |
| 1028 | zRange = mprintf("IN private"); |
| 1029 | }else{ |
| 1030 | zRange = mprintf("BETWEEN %d AND %d", s, s+n-1); |
| @@ -1220,15 +1220,15 @@ | |
| 1220 | */ |
| 1221 | void hash_collisions_webpage(void){ |
| 1222 | login_check_credentials(); |
| 1223 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 1224 | style_header("SHA1 Prefix Collisions"); |
| 1225 | style_submenu_element("Activity Reports", "reports"); |
| 1226 | style_submenu_element("Stats", "stat"); |
| 1227 | @ <h1>Hash Prefix Collisions on Check-ins</h1> |
| 1228 | collision_report("SELECT (SELECT uuid FROM blob WHERE rid=objid)" |
| 1229 | " FROM event WHERE event.type='ci'" |
| 1230 | " ORDER BY 1"); |
| 1231 | @ <h1>Hash Prefix Collisions on All Artifacts</h1> |
| 1232 | collision_report("SELECT uuid FROM blob ORDER BY 1"); |
| 1233 | style_footer(); |
| 1234 | } |
| 1235 |
+9
-12
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -450,13 +450,13 @@ | ||
| 450 | 450 | zTitle = mprintf("Copy Of %s", zTitle); |
| 451 | 451 | zOwner = g.zLogin; |
| 452 | 452 | } |
| 453 | 453 | } |
| 454 | 454 | if( zOwner==0 ) zOwner = g.zLogin; |
| 455 | - style_submenu_element("Cancel", "Cancel", "reportlist"); | |
| 455 | + style_submenu_element("Cancel", "reportlist"); | |
| 456 | 456 | if( rn>0 ){ |
| 457 | - style_submenu_element("Delete", "Delete", "rptedit?rn=%d&del1=1", rn); | |
| 457 | + style_submenu_element("Delete", "rptedit?rn=%d&del1=1", rn); | |
| 458 | 458 | } |
| 459 | 459 | style_header("%s", rn>0 ? "Edit Report Format":"Create New Report Format"); |
| 460 | 460 | if( zErr ){ |
| 461 | 461 | @ <blockquote class="reportError">%h(zErr)</blockquote> |
| 462 | 462 | } |
| @@ -700,15 +700,14 @@ | ||
| 700 | 700 | pState->zWikiEnd = ""; |
| 701 | 701 | if( P("plaintext") ){ |
| 702 | 702 | pState->wikiFlags |= WIKI_LINKSONLY; |
| 703 | 703 | pState->zWikiStart = "<pre class='verbatim'>"; |
| 704 | 704 | pState->zWikiEnd = "</pre>"; |
| 705 | - style_submenu_element("Formatted", "Formatted", | |
| 706 | - "%R/rptview?rn=%d", pState->rn); | |
| 705 | + style_submenu_element("Formatted", "%R/rptview?rn=%d", pState->rn); | |
| 707 | 706 | }else{ |
| 708 | - style_submenu_element("Plaintext", "Plaintext", | |
| 709 | - "%R/rptview?rn=%d&plaintext", pState->rn); | |
| 707 | + style_submenu_element("Plaintext", "%R/rptview?rn=%d&plaintext", | |
| 708 | + pState->rn); | |
| 710 | 709 | } |
| 711 | 710 | }else{ |
| 712 | 711 | pState->nCol++; |
| 713 | 712 | } |
| 714 | 713 | } |
| @@ -1197,22 +1196,20 @@ | ||
| 1197 | 1196 | count = 0; |
| 1198 | 1197 | if( !tabs ){ |
| 1199 | 1198 | struct GenerateHTML sState = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
| 1200 | 1199 | |
| 1201 | 1200 | db_multi_exec("PRAGMA empty_result_callbacks=ON"); |
| 1202 | - style_submenu_element("Raw", "Raw", | |
| 1203 | - "rptview?tablist=1&%h", PD("QUERY_STRING","")); | |
| 1201 | + style_submenu_element("Raw", "rptview?tablist=1&%h", PD("QUERY_STRING","")); | |
| 1204 | 1202 | if( g.perm.Admin |
| 1205 | 1203 | || (g.perm.TktFmt && g.zLogin && fossil_strcmp(g.zLogin,zOwner)==0) ){ |
| 1206 | - style_submenu_element("Edit", "Edit", "rptedit?rn=%d", rn); | |
| 1204 | + style_submenu_element("Edit", "rptedit?rn=%d", rn); | |
| 1207 | 1205 | } |
| 1208 | 1206 | if( g.perm.TktFmt ){ |
| 1209 | - style_submenu_element("SQL", "SQL", "rptsql?rn=%d",rn); | |
| 1207 | + style_submenu_element("SQL", "rptsql?rn=%d",rn); | |
| 1210 | 1208 | } |
| 1211 | 1209 | if( g.perm.NewTkt ){ |
| 1212 | - style_submenu_element("New Ticket", "Create a new ticket", | |
| 1213 | - "%s/tktnew", g.zTop); | |
| 1210 | + style_submenu_element("New Ticket", "%s/tktnew", g.zTop); | |
| 1214 | 1211 | } |
| 1215 | 1212 | style_header("%s", zTitle); |
| 1216 | 1213 | output_color_key(zClrKey, 1, |
| 1217 | 1214 | "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"report\""); |
| 1218 | 1215 | @ <table border="1" cellpadding="2" cellspacing="0" class="report" |
| 1219 | 1216 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -450,13 +450,13 @@ | |
| 450 | zTitle = mprintf("Copy Of %s", zTitle); |
| 451 | zOwner = g.zLogin; |
| 452 | } |
| 453 | } |
| 454 | if( zOwner==0 ) zOwner = g.zLogin; |
| 455 | style_submenu_element("Cancel", "Cancel", "reportlist"); |
| 456 | if( rn>0 ){ |
| 457 | style_submenu_element("Delete", "Delete", "rptedit?rn=%d&del1=1", rn); |
| 458 | } |
| 459 | style_header("%s", rn>0 ? "Edit Report Format":"Create New Report Format"); |
| 460 | if( zErr ){ |
| 461 | @ <blockquote class="reportError">%h(zErr)</blockquote> |
| 462 | } |
| @@ -700,15 +700,14 @@ | |
| 700 | pState->zWikiEnd = ""; |
| 701 | if( P("plaintext") ){ |
| 702 | pState->wikiFlags |= WIKI_LINKSONLY; |
| 703 | pState->zWikiStart = "<pre class='verbatim'>"; |
| 704 | pState->zWikiEnd = "</pre>"; |
| 705 | style_submenu_element("Formatted", "Formatted", |
| 706 | "%R/rptview?rn=%d", pState->rn); |
| 707 | }else{ |
| 708 | style_submenu_element("Plaintext", "Plaintext", |
| 709 | "%R/rptview?rn=%d&plaintext", pState->rn); |
| 710 | } |
| 711 | }else{ |
| 712 | pState->nCol++; |
| 713 | } |
| 714 | } |
| @@ -1197,22 +1196,20 @@ | |
| 1197 | count = 0; |
| 1198 | if( !tabs ){ |
| 1199 | struct GenerateHTML sState = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
| 1200 | |
| 1201 | db_multi_exec("PRAGMA empty_result_callbacks=ON"); |
| 1202 | style_submenu_element("Raw", "Raw", |
| 1203 | "rptview?tablist=1&%h", PD("QUERY_STRING","")); |
| 1204 | if( g.perm.Admin |
| 1205 | || (g.perm.TktFmt && g.zLogin && fossil_strcmp(g.zLogin,zOwner)==0) ){ |
| 1206 | style_submenu_element("Edit", "Edit", "rptedit?rn=%d", rn); |
| 1207 | } |
| 1208 | if( g.perm.TktFmt ){ |
| 1209 | style_submenu_element("SQL", "SQL", "rptsql?rn=%d",rn); |
| 1210 | } |
| 1211 | if( g.perm.NewTkt ){ |
| 1212 | style_submenu_element("New Ticket", "Create a new ticket", |
| 1213 | "%s/tktnew", g.zTop); |
| 1214 | } |
| 1215 | style_header("%s", zTitle); |
| 1216 | output_color_key(zClrKey, 1, |
| 1217 | "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"report\""); |
| 1218 | @ <table border="1" cellpadding="2" cellspacing="0" class="report" |
| 1219 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -450,13 +450,13 @@ | |
| 450 | zTitle = mprintf("Copy Of %s", zTitle); |
| 451 | zOwner = g.zLogin; |
| 452 | } |
| 453 | } |
| 454 | if( zOwner==0 ) zOwner = g.zLogin; |
| 455 | style_submenu_element("Cancel", "reportlist"); |
| 456 | if( rn>0 ){ |
| 457 | style_submenu_element("Delete", "rptedit?rn=%d&del1=1", rn); |
| 458 | } |
| 459 | style_header("%s", rn>0 ? "Edit Report Format":"Create New Report Format"); |
| 460 | if( zErr ){ |
| 461 | @ <blockquote class="reportError">%h(zErr)</blockquote> |
| 462 | } |
| @@ -700,15 +700,14 @@ | |
| 700 | pState->zWikiEnd = ""; |
| 701 | if( P("plaintext") ){ |
| 702 | pState->wikiFlags |= WIKI_LINKSONLY; |
| 703 | pState->zWikiStart = "<pre class='verbatim'>"; |
| 704 | pState->zWikiEnd = "</pre>"; |
| 705 | style_submenu_element("Formatted", "%R/rptview?rn=%d", pState->rn); |
| 706 | }else{ |
| 707 | style_submenu_element("Plaintext", "%R/rptview?rn=%d&plaintext", |
| 708 | pState->rn); |
| 709 | } |
| 710 | }else{ |
| 711 | pState->nCol++; |
| 712 | } |
| 713 | } |
| @@ -1197,22 +1196,20 @@ | |
| 1196 | count = 0; |
| 1197 | if( !tabs ){ |
| 1198 | struct GenerateHTML sState = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
| 1199 | |
| 1200 | db_multi_exec("PRAGMA empty_result_callbacks=ON"); |
| 1201 | style_submenu_element("Raw", "rptview?tablist=1&%h", PD("QUERY_STRING","")); |
| 1202 | if( g.perm.Admin |
| 1203 | || (g.perm.TktFmt && g.zLogin && fossil_strcmp(g.zLogin,zOwner)==0) ){ |
| 1204 | style_submenu_element("Edit", "rptedit?rn=%d", rn); |
| 1205 | } |
| 1206 | if( g.perm.TktFmt ){ |
| 1207 | style_submenu_element("SQL", "rptsql?rn=%d",rn); |
| 1208 | } |
| 1209 | if( g.perm.NewTkt ){ |
| 1210 | style_submenu_element("New Ticket", "%s/tktnew", g.zTop); |
| 1211 | } |
| 1212 | style_header("%s", zTitle); |
| 1213 | output_color_key(zClrKey, 1, |
| 1214 | "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"report\""); |
| 1215 | @ <table border="1" cellpadding="2" cellspacing="0" class="report" |
| 1216 |
+4
-4
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -149,13 +149,13 @@ | ||
| 149 | 149 | if( !g.perm.Admin ){ |
| 150 | 150 | login_needed(0); |
| 151 | 151 | return; |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | - style_submenu_element("Add", "Add User", "setup_uedit"); | |
| 155 | - style_submenu_element("Log", "Access Log", "access_log"); | |
| 156 | - style_submenu_element("Help", "Help", "setup_ulist_notes"); | |
| 154 | + style_submenu_element("Add", "setup_uedit"); | |
| 155 | + style_submenu_element("Log", "access_log"); | |
| 156 | + style_submenu_element("Help", "setup_ulist_notes"); | |
| 157 | 157 | style_header("User List"); |
| 158 | 158 | @ <table border=1 cellpadding=2 cellspacing=0 class='userTable'> |
| 159 | 159 | @ <thead><tr> |
| 160 | 160 | @ <th>UID <th>Category |
| 161 | 161 | @ <th>Capabilities (<a href='%R/setup_ucap_list'>key</a>) |
| @@ -557,11 +557,11 @@ | ||
| 557 | 557 | free(z2); |
| 558 | 558 | } |
| 559 | 559 | |
| 560 | 560 | /* Begin generating the page |
| 561 | 561 | */ |
| 562 | - style_submenu_element("Cancel", "Cancel", "setup_ulist"); | |
| 562 | + style_submenu_element("Cancel", "setup_ulist"); | |
| 563 | 563 | if( uid ){ |
| 564 | 564 | style_header("Edit User %h", zLogin); |
| 565 | 565 | }else{ |
| 566 | 566 | style_header("Add A New User"); |
| 567 | 567 | } |
| 568 | 568 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -149,13 +149,13 @@ | |
| 149 | if( !g.perm.Admin ){ |
| 150 | login_needed(0); |
| 151 | return; |
| 152 | } |
| 153 | |
| 154 | style_submenu_element("Add", "Add User", "setup_uedit"); |
| 155 | style_submenu_element("Log", "Access Log", "access_log"); |
| 156 | style_submenu_element("Help", "Help", "setup_ulist_notes"); |
| 157 | style_header("User List"); |
| 158 | @ <table border=1 cellpadding=2 cellspacing=0 class='userTable'> |
| 159 | @ <thead><tr> |
| 160 | @ <th>UID <th>Category |
| 161 | @ <th>Capabilities (<a href='%R/setup_ucap_list'>key</a>) |
| @@ -557,11 +557,11 @@ | |
| 557 | free(z2); |
| 558 | } |
| 559 | |
| 560 | /* Begin generating the page |
| 561 | */ |
| 562 | style_submenu_element("Cancel", "Cancel", "setup_ulist"); |
| 563 | if( uid ){ |
| 564 | style_header("Edit User %h", zLogin); |
| 565 | }else{ |
| 566 | style_header("Add A New User"); |
| 567 | } |
| 568 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -149,13 +149,13 @@ | |
| 149 | if( !g.perm.Admin ){ |
| 150 | login_needed(0); |
| 151 | return; |
| 152 | } |
| 153 | |
| 154 | style_submenu_element("Add", "setup_uedit"); |
| 155 | style_submenu_element("Log", "access_log"); |
| 156 | style_submenu_element("Help", "setup_ulist_notes"); |
| 157 | style_header("User List"); |
| 158 | @ <table border=1 cellpadding=2 cellspacing=0 class='userTable'> |
| 159 | @ <thead><tr> |
| 160 | @ <th>UID <th>Category |
| 161 | @ <th>Capabilities (<a href='%R/setup_ucap_list'>key</a>) |
| @@ -557,11 +557,11 @@ | |
| 557 | free(z2); |
| 558 | } |
| 559 | |
| 560 | /* Begin generating the page |
| 561 | */ |
| 562 | style_submenu_element("Cancel", "setup_ulist"); |
| 563 | if( uid ){ |
| 564 | style_header("Edit User %h", zLogin); |
| 565 | }else{ |
| 566 | style_header("Add A New User"); |
| 567 | } |
| 568 |
+5
-8
| --- src/shun.c | ||
| +++ src/shun.c | ||
| @@ -317,14 +317,14 @@ | ||
| 317 | 317 | } |
| 318 | 318 | style_header("Artifact Receipts"); |
| 319 | 319 | if( showAll ){ |
| 320 | 320 | ofst = 0; |
| 321 | 321 | }else{ |
| 322 | - style_submenu_element("All", "All", "rcvfromlist?all=1"); | |
| 322 | + style_submenu_element("All", "rcvfromlist?all=1"); | |
| 323 | 323 | } |
| 324 | 324 | if( ofst>0 ){ |
| 325 | - style_submenu_element("Newer", "Newer", "rcvfromlist?ofst=%d", | |
| 325 | + style_submenu_element("Newer", "rcvfromlist?ofst=%d", | |
| 326 | 326 | ofst>30 ? ofst-30 : 0); |
| 327 | 327 | } |
| 328 | 328 | db_multi_exec( |
| 329 | 329 | "CREATE TEMP TABLE rcvidUsed(x INTEGER PRIMARY KEY);" |
| 330 | 330 | "INSERT OR IGNORE INTO rcvidUsed(x) SELECT rcvid FROM blob;" |
| @@ -363,12 +363,11 @@ | ||
| 363 | 363 | int rcvid = db_column_int(&q, 0); |
| 364 | 364 | const char *zUser = db_column_text(&q, 1); |
| 365 | 365 | const char *zDate = db_column_text(&q, 2); |
| 366 | 366 | const char *zIpAddr = db_column_text(&q, 3); |
| 367 | 367 | if( cnt==30 && !showAll ){ |
| 368 | - style_submenu_element("Older", "Older", | |
| 369 | - "rcvfromlist?ofst=%d", ofst+30); | |
| 368 | + style_submenu_element("Older", "rcvfromlist?ofst=%d", ofst+30); | |
| 370 | 369 | }else{ |
| 371 | 370 | cnt++; |
| 372 | 371 | @ <tr> |
| 373 | 372 | if( db_column_int(&q,4) ){ |
| 374 | 373 | @ <td style="padding-right: 15px;text-align: right;"> |
| @@ -406,19 +405,17 @@ | ||
| 406 | 405 | style_header("Artifact Receipt %d", rcvid); |
| 407 | 406 | if( db_exists( |
| 408 | 407 | "SELECT 1 FROM blob WHERE rcvid=%d AND" |
| 409 | 408 | " NOT EXISTS (SELECT 1 FROM shun WHERE shun.uuid=blob.uuid)", rcvid) |
| 410 | 409 | ){ |
| 411 | - style_submenu_element("Shun All", "Shun All", | |
| 412 | - "shun?shun&rcvid=%d#addshun", rcvid); | |
| 410 | + style_submenu_element("Shun All", "shun?shun&rcvid=%d#addshun", rcvid); | |
| 413 | 411 | } |
| 414 | 412 | if( db_exists( |
| 415 | 413 | "SELECT 1 FROM blob WHERE rcvid=%d AND" |
| 416 | 414 | " EXISTS (SELECT 1 FROM shun WHERE shun.uuid=blob.uuid)", rcvid) |
| 417 | 415 | ){ |
| 418 | - style_submenu_element("Unshun All", "Unshun All", | |
| 419 | - "shun?accept&rcvid=%d#delshun", rcvid); | |
| 416 | + style_submenu_element("Unshun All", "shun?accept&rcvid=%d#delshun", rcvid); | |
| 420 | 417 | } |
| 421 | 418 | db_prepare(&q, |
| 422 | 419 | "SELECT login, datetime(rcvfrom.mtime), rcvfrom.ipaddr" |
| 423 | 420 | " FROM rcvfrom LEFT JOIN user USING(uid)" |
| 424 | 421 | " WHERE rcvid=%d", |
| 425 | 422 |
| --- src/shun.c | |
| +++ src/shun.c | |
| @@ -317,14 +317,14 @@ | |
| 317 | } |
| 318 | style_header("Artifact Receipts"); |
| 319 | if( showAll ){ |
| 320 | ofst = 0; |
| 321 | }else{ |
| 322 | style_submenu_element("All", "All", "rcvfromlist?all=1"); |
| 323 | } |
| 324 | if( ofst>0 ){ |
| 325 | style_submenu_element("Newer", "Newer", "rcvfromlist?ofst=%d", |
| 326 | ofst>30 ? ofst-30 : 0); |
| 327 | } |
| 328 | db_multi_exec( |
| 329 | "CREATE TEMP TABLE rcvidUsed(x INTEGER PRIMARY KEY);" |
| 330 | "INSERT OR IGNORE INTO rcvidUsed(x) SELECT rcvid FROM blob;" |
| @@ -363,12 +363,11 @@ | |
| 363 | int rcvid = db_column_int(&q, 0); |
| 364 | const char *zUser = db_column_text(&q, 1); |
| 365 | const char *zDate = db_column_text(&q, 2); |
| 366 | const char *zIpAddr = db_column_text(&q, 3); |
| 367 | if( cnt==30 && !showAll ){ |
| 368 | style_submenu_element("Older", "Older", |
| 369 | "rcvfromlist?ofst=%d", ofst+30); |
| 370 | }else{ |
| 371 | cnt++; |
| 372 | @ <tr> |
| 373 | if( db_column_int(&q,4) ){ |
| 374 | @ <td style="padding-right: 15px;text-align: right;"> |
| @@ -406,19 +405,17 @@ | |
| 406 | style_header("Artifact Receipt %d", rcvid); |
| 407 | if( db_exists( |
| 408 | "SELECT 1 FROM blob WHERE rcvid=%d AND" |
| 409 | " NOT EXISTS (SELECT 1 FROM shun WHERE shun.uuid=blob.uuid)", rcvid) |
| 410 | ){ |
| 411 | style_submenu_element("Shun All", "Shun All", |
| 412 | "shun?shun&rcvid=%d#addshun", rcvid); |
| 413 | } |
| 414 | if( db_exists( |
| 415 | "SELECT 1 FROM blob WHERE rcvid=%d AND" |
| 416 | " EXISTS (SELECT 1 FROM shun WHERE shun.uuid=blob.uuid)", rcvid) |
| 417 | ){ |
| 418 | style_submenu_element("Unshun All", "Unshun All", |
| 419 | "shun?accept&rcvid=%d#delshun", rcvid); |
| 420 | } |
| 421 | db_prepare(&q, |
| 422 | "SELECT login, datetime(rcvfrom.mtime), rcvfrom.ipaddr" |
| 423 | " FROM rcvfrom LEFT JOIN user USING(uid)" |
| 424 | " WHERE rcvid=%d", |
| 425 |
| --- src/shun.c | |
| +++ src/shun.c | |
| @@ -317,14 +317,14 @@ | |
| 317 | } |
| 318 | style_header("Artifact Receipts"); |
| 319 | if( showAll ){ |
| 320 | ofst = 0; |
| 321 | }else{ |
| 322 | style_submenu_element("All", "rcvfromlist?all=1"); |
| 323 | } |
| 324 | if( ofst>0 ){ |
| 325 | style_submenu_element("Newer", "rcvfromlist?ofst=%d", |
| 326 | ofst>30 ? ofst-30 : 0); |
| 327 | } |
| 328 | db_multi_exec( |
| 329 | "CREATE TEMP TABLE rcvidUsed(x INTEGER PRIMARY KEY);" |
| 330 | "INSERT OR IGNORE INTO rcvidUsed(x) SELECT rcvid FROM blob;" |
| @@ -363,12 +363,11 @@ | |
| 363 | int rcvid = db_column_int(&q, 0); |
| 364 | const char *zUser = db_column_text(&q, 1); |
| 365 | const char *zDate = db_column_text(&q, 2); |
| 366 | const char *zIpAddr = db_column_text(&q, 3); |
| 367 | if( cnt==30 && !showAll ){ |
| 368 | style_submenu_element("Older", "rcvfromlist?ofst=%d", ofst+30); |
| 369 | }else{ |
| 370 | cnt++; |
| 371 | @ <tr> |
| 372 | if( db_column_int(&q,4) ){ |
| 373 | @ <td style="padding-right: 15px;text-align: right;"> |
| @@ -406,19 +405,17 @@ | |
| 405 | style_header("Artifact Receipt %d", rcvid); |
| 406 | if( db_exists( |
| 407 | "SELECT 1 FROM blob WHERE rcvid=%d AND" |
| 408 | " NOT EXISTS (SELECT 1 FROM shun WHERE shun.uuid=blob.uuid)", rcvid) |
| 409 | ){ |
| 410 | style_submenu_element("Shun All", "shun?shun&rcvid=%d#addshun", rcvid); |
| 411 | } |
| 412 | if( db_exists( |
| 413 | "SELECT 1 FROM blob WHERE rcvid=%d AND" |
| 414 | " EXISTS (SELECT 1 FROM shun WHERE shun.uuid=blob.uuid)", rcvid) |
| 415 | ){ |
| 416 | style_submenu_element("Unshun All", "shun?accept&rcvid=%d#delshun", rcvid); |
| 417 | } |
| 418 | db_prepare(&q, |
| 419 | "SELECT login, datetime(rcvfrom.mtime), rcvfrom.ipaddr" |
| 420 | " FROM rcvfrom LEFT JOIN user USING(uid)" |
| 421 | " WHERE rcvid=%d", |
| 422 |
+2
-2
| --- src/skins.c | ||
| +++ src/skins.c | ||
| @@ -608,14 +608,14 @@ | ||
| 608 | 608 | cgi_replace_parameter(aSkinAttr[ii].zFile, builtin_text(zDflt)); |
| 609 | 609 | } |
| 610 | 610 | style_header("%s", aSkinAttr[ii].zTitle); |
| 611 | 611 | for(j=0; j<ArraySize(aSkinAttr); j++){ |
| 612 | 612 | if( j==ii ) continue; |
| 613 | - style_submenu_element(aSkinAttr[j].zSubmenu, 0, | |
| 613 | + style_submenu_element(aSkinAttr[j].zSubmenu, | |
| 614 | 614 | "%R/setup_skinedit?w=%d&basis=%h",j,zBasis); |
| 615 | 615 | } |
| 616 | - style_submenu_element("Skins", 0, "%R/setup_skin"); | |
| 616 | + style_submenu_element("Skins", "%R/setup_skin"); | |
| 617 | 617 | @ <form action="%s(g.zTop)/setup_skinedit" method="post"><div> |
| 618 | 618 | login_insert_csrf_secret(); |
| 619 | 619 | @ <input type='hidden' name='w' value='%d(ii)'> |
| 620 | 620 | @ <h2>Edit %s(aSkinAttr[ii].zTitle):</h2> |
| 621 | 621 | zContent = textarea_attribute("", 10, 80, aSkinAttr[ii].zFile, |
| 622 | 622 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -608,14 +608,14 @@ | |
| 608 | cgi_replace_parameter(aSkinAttr[ii].zFile, builtin_text(zDflt)); |
| 609 | } |
| 610 | style_header("%s", aSkinAttr[ii].zTitle); |
| 611 | for(j=0; j<ArraySize(aSkinAttr); j++){ |
| 612 | if( j==ii ) continue; |
| 613 | style_submenu_element(aSkinAttr[j].zSubmenu, 0, |
| 614 | "%R/setup_skinedit?w=%d&basis=%h",j,zBasis); |
| 615 | } |
| 616 | style_submenu_element("Skins", 0, "%R/setup_skin"); |
| 617 | @ <form action="%s(g.zTop)/setup_skinedit" method="post"><div> |
| 618 | login_insert_csrf_secret(); |
| 619 | @ <input type='hidden' name='w' value='%d(ii)'> |
| 620 | @ <h2>Edit %s(aSkinAttr[ii].zTitle):</h2> |
| 621 | zContent = textarea_attribute("", 10, 80, aSkinAttr[ii].zFile, |
| 622 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -608,14 +608,14 @@ | |
| 608 | cgi_replace_parameter(aSkinAttr[ii].zFile, builtin_text(zDflt)); |
| 609 | } |
| 610 | style_header("%s", aSkinAttr[ii].zTitle); |
| 611 | for(j=0; j<ArraySize(aSkinAttr); j++){ |
| 612 | if( j==ii ) continue; |
| 613 | style_submenu_element(aSkinAttr[j].zSubmenu, |
| 614 | "%R/setup_skinedit?w=%d&basis=%h",j,zBasis); |
| 615 | } |
| 616 | style_submenu_element("Skins", "%R/setup_skin"); |
| 617 | @ <form action="%s(g.zTop)/setup_skinedit" method="post"><div> |
| 618 | login_insert_csrf_secret(); |
| 619 | @ <input type='hidden' name='w' value='%d(ii)'> |
| 620 | @ <h2>Edit %s(aSkinAttr[ii].zTitle):</h2> |
| 621 | zContent = textarea_attribute("", 10, 80, aSkinAttr[ii].zFile, |
| 622 |
+14
-14
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -71,21 +71,21 @@ | ||
| 71 | 71 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 72 | 72 | brief = P("brief")!=0; |
| 73 | 73 | style_header("Repository Statistics"); |
| 74 | 74 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 75 | 75 | if( g.perm.Admin ){ |
| 76 | - style_submenu_element("URLs", "URLs and Checkouts", "urllist"); | |
| 77 | - style_submenu_element("Schema", "Repository Schema", "repo_schema"); | |
| 78 | - style_submenu_element("Web-Cache", "Web-Cache Stats", "cachestat"); | |
| 76 | + style_submenu_element("URLs", "urllist"); | |
| 77 | + style_submenu_element("Schema", "repo_schema"); | |
| 78 | + style_submenu_element("Web-Cache", "cachestat"); | |
| 79 | 79 | } |
| 80 | - style_submenu_element("Activity Reports", 0, "reports"); | |
| 81 | - style_submenu_element("SHA1 Collisions", 0, "hash-collisions"); | |
| 80 | + style_submenu_element("Activity Reports", "reports"); | |
| 81 | + style_submenu_element("SHA1 Collisions", "hash-collisions"); | |
| 82 | 82 | if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){ |
| 83 | - style_submenu_element("Table Sizes", 0, "repo-tabsize"); | |
| 83 | + style_submenu_element("Table Sizes", "repo-tabsize"); | |
| 84 | 84 | } |
| 85 | 85 | if( g.perm.Admin || g.perm.Setup || db_get_boolean("test_env_enable",0) ){ |
| 86 | - style_submenu_element("Environment", 0, "test_env"); | |
| 86 | + style_submenu_element("Environment", "test_env"); | |
| 87 | 87 | } |
| 88 | 88 | @ <table class="label-value"> |
| 89 | 89 | @ <tr><th>Repository Size:</th><td> |
| 90 | 90 | fsize = file_size(g.zRepositoryName); |
| 91 | 91 | bigSizeName(sizeof(zBuf), zBuf, fsize); |
| @@ -340,12 +340,12 @@ | ||
| 340 | 340 | login_check_credentials(); |
| 341 | 341 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 342 | 342 | |
| 343 | 343 | style_header("URLs and Checkouts"); |
| 344 | 344 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 345 | - style_submenu_element("Stat", "Repository Stats", "stat"); | |
| 346 | - style_submenu_element("Schema", "Repository Schema", "repo_schema"); | |
| 345 | + style_submenu_element("Stat", "stat"); | |
| 346 | + style_submenu_element("Schema", "repo_schema"); | |
| 347 | 347 | @ <div class="section">URLs</div> |
| 348 | 348 | @ <table border="0" width='100%%'> |
| 349 | 349 | db_prepare(&q, "SELECT substr(name,9), datetime(mtime,'unixepoch')" |
| 350 | 350 | " FROM config WHERE name GLOB 'baseurl:*' ORDER BY 2 DESC"); |
| 351 | 351 | cnt = 0; |
| @@ -387,14 +387,14 @@ | ||
| 387 | 387 | login_check_credentials(); |
| 388 | 388 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 389 | 389 | |
| 390 | 390 | style_header("Repository Schema"); |
| 391 | 391 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 392 | - style_submenu_element("Stat", "Repository Stats", "stat"); | |
| 393 | - style_submenu_element("URLs", "URLs and Checkouts", "urllist"); | |
| 392 | + style_submenu_element("Stat", "stat"); | |
| 393 | + style_submenu_element("URLs", "urllist"); | |
| 394 | 394 | if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){ |
| 395 | - style_submenu_element("Table Sizes", 0, "repo-tabsize"); | |
| 395 | + style_submenu_element("Table Sizes", "repo-tabsize"); | |
| 396 | 396 | } |
| 397 | 397 | db_prepare(&q, |
| 398 | 398 | "SELECT sql FROM repository.sqlite_master WHERE sql IS NOT NULL"); |
| 399 | 399 | @ <pre> |
| 400 | 400 | while( db_step(&q)==SQLITE_ROW ){ |
| @@ -417,13 +417,13 @@ | ||
| 417 | 417 | |
| 418 | 418 | login_check_credentials(); |
| 419 | 419 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 420 | 420 | style_header("Repository Table Sizes"); |
| 421 | 421 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 422 | - style_submenu_element("Stat", "Repository Stats", "stat"); | |
| 422 | + style_submenu_element("Stat", "stat"); | |
| 423 | 423 | if( g.perm.Admin ){ |
| 424 | - style_submenu_element("Schema", "Repository Schema", "repo_schema"); | |
| 424 | + style_submenu_element("Schema", "repo_schema"); | |
| 425 | 425 | } |
| 426 | 426 | db_multi_exec( |
| 427 | 427 | "CREATE TEMP TABLE trans(name TEXT PRIMARY KEY,tabname TEXT)WITHOUT ROWID;" |
| 428 | 428 | "INSERT INTO trans(name,tabname)" |
| 429 | 429 | " SELECT name, tbl_name FROM repository.sqlite_master;" |
| 430 | 430 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -71,21 +71,21 @@ | |
| 71 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 72 | brief = P("brief")!=0; |
| 73 | style_header("Repository Statistics"); |
| 74 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 75 | if( g.perm.Admin ){ |
| 76 | style_submenu_element("URLs", "URLs and Checkouts", "urllist"); |
| 77 | style_submenu_element("Schema", "Repository Schema", "repo_schema"); |
| 78 | style_submenu_element("Web-Cache", "Web-Cache Stats", "cachestat"); |
| 79 | } |
| 80 | style_submenu_element("Activity Reports", 0, "reports"); |
| 81 | style_submenu_element("SHA1 Collisions", 0, "hash-collisions"); |
| 82 | if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){ |
| 83 | style_submenu_element("Table Sizes", 0, "repo-tabsize"); |
| 84 | } |
| 85 | if( g.perm.Admin || g.perm.Setup || db_get_boolean("test_env_enable",0) ){ |
| 86 | style_submenu_element("Environment", 0, "test_env"); |
| 87 | } |
| 88 | @ <table class="label-value"> |
| 89 | @ <tr><th>Repository Size:</th><td> |
| 90 | fsize = file_size(g.zRepositoryName); |
| 91 | bigSizeName(sizeof(zBuf), zBuf, fsize); |
| @@ -340,12 +340,12 @@ | |
| 340 | login_check_credentials(); |
| 341 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 342 | |
| 343 | style_header("URLs and Checkouts"); |
| 344 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 345 | style_submenu_element("Stat", "Repository Stats", "stat"); |
| 346 | style_submenu_element("Schema", "Repository Schema", "repo_schema"); |
| 347 | @ <div class="section">URLs</div> |
| 348 | @ <table border="0" width='100%%'> |
| 349 | db_prepare(&q, "SELECT substr(name,9), datetime(mtime,'unixepoch')" |
| 350 | " FROM config WHERE name GLOB 'baseurl:*' ORDER BY 2 DESC"); |
| 351 | cnt = 0; |
| @@ -387,14 +387,14 @@ | |
| 387 | login_check_credentials(); |
| 388 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 389 | |
| 390 | style_header("Repository Schema"); |
| 391 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 392 | style_submenu_element("Stat", "Repository Stats", "stat"); |
| 393 | style_submenu_element("URLs", "URLs and Checkouts", "urllist"); |
| 394 | if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){ |
| 395 | style_submenu_element("Table Sizes", 0, "repo-tabsize"); |
| 396 | } |
| 397 | db_prepare(&q, |
| 398 | "SELECT sql FROM repository.sqlite_master WHERE sql IS NOT NULL"); |
| 399 | @ <pre> |
| 400 | while( db_step(&q)==SQLITE_ROW ){ |
| @@ -417,13 +417,13 @@ | |
| 417 | |
| 418 | login_check_credentials(); |
| 419 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 420 | style_header("Repository Table Sizes"); |
| 421 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 422 | style_submenu_element("Stat", "Repository Stats", "stat"); |
| 423 | if( g.perm.Admin ){ |
| 424 | style_submenu_element("Schema", "Repository Schema", "repo_schema"); |
| 425 | } |
| 426 | db_multi_exec( |
| 427 | "CREATE TEMP TABLE trans(name TEXT PRIMARY KEY,tabname TEXT)WITHOUT ROWID;" |
| 428 | "INSERT INTO trans(name,tabname)" |
| 429 | " SELECT name, tbl_name FROM repository.sqlite_master;" |
| 430 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -71,21 +71,21 @@ | |
| 71 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 72 | brief = P("brief")!=0; |
| 73 | style_header("Repository Statistics"); |
| 74 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 75 | if( g.perm.Admin ){ |
| 76 | style_submenu_element("URLs", "urllist"); |
| 77 | style_submenu_element("Schema", "repo_schema"); |
| 78 | style_submenu_element("Web-Cache", "cachestat"); |
| 79 | } |
| 80 | style_submenu_element("Activity Reports", "reports"); |
| 81 | style_submenu_element("SHA1 Collisions", "hash-collisions"); |
| 82 | if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){ |
| 83 | style_submenu_element("Table Sizes", "repo-tabsize"); |
| 84 | } |
| 85 | if( g.perm.Admin || g.perm.Setup || db_get_boolean("test_env_enable",0) ){ |
| 86 | style_submenu_element("Environment", "test_env"); |
| 87 | } |
| 88 | @ <table class="label-value"> |
| 89 | @ <tr><th>Repository Size:</th><td> |
| 90 | fsize = file_size(g.zRepositoryName); |
| 91 | bigSizeName(sizeof(zBuf), zBuf, fsize); |
| @@ -340,12 +340,12 @@ | |
| 340 | login_check_credentials(); |
| 341 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 342 | |
| 343 | style_header("URLs and Checkouts"); |
| 344 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 345 | style_submenu_element("Stat", "stat"); |
| 346 | style_submenu_element("Schema", "repo_schema"); |
| 347 | @ <div class="section">URLs</div> |
| 348 | @ <table border="0" width='100%%'> |
| 349 | db_prepare(&q, "SELECT substr(name,9), datetime(mtime,'unixepoch')" |
| 350 | " FROM config WHERE name GLOB 'baseurl:*' ORDER BY 2 DESC"); |
| 351 | cnt = 0; |
| @@ -387,14 +387,14 @@ | |
| 387 | login_check_credentials(); |
| 388 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 389 | |
| 390 | style_header("Repository Schema"); |
| 391 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 392 | style_submenu_element("Stat", "stat"); |
| 393 | style_submenu_element("URLs", "urllist"); |
| 394 | if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){ |
| 395 | style_submenu_element("Table Sizes", "repo-tabsize"); |
| 396 | } |
| 397 | db_prepare(&q, |
| 398 | "SELECT sql FROM repository.sqlite_master WHERE sql IS NOT NULL"); |
| 399 | @ <pre> |
| 400 | while( db_step(&q)==SQLITE_ROW ){ |
| @@ -417,13 +417,13 @@ | |
| 417 | |
| 418 | login_check_credentials(); |
| 419 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 420 | style_header("Repository Table Sizes"); |
| 421 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 422 | style_submenu_element("Stat", "stat"); |
| 423 | if( g.perm.Admin ){ |
| 424 | style_submenu_element("Schema", "repo_schema"); |
| 425 | } |
| 426 | db_multi_exec( |
| 427 | "CREATE TEMP TABLE trans(name TEXT PRIMARY KEY,tabname TEXT)WITHOUT ROWID;" |
| 428 | "INSERT INTO trans(name,tabname)" |
| 429 | " SELECT name, tbl_name FROM repository.sqlite_master;" |
| 430 |
+1
-1
| --- src/statrep.c | ||
| +++ src/statrep.c | ||
| @@ -732,11 +732,11 @@ | ||
| 732 | 732 | " ORDER BY 1 COLLATE nocase) WHERE x!=''", |
| 733 | 733 | eType==RPT_BYFILE ? "WHERE type='ci'" : "" |
| 734 | 734 | ); |
| 735 | 735 | } |
| 736 | 736 | } |
| 737 | - style_submenu_element("Stats", "Stats", "%R/stat"); | |
| 737 | + style_submenu_element("Stats", "%R/stat"); | |
| 738 | 738 | style_header("Activity Reports"); |
| 739 | 739 | switch( eType ){ |
| 740 | 740 | case RPT_BYYEAR: |
| 741 | 741 | stats_report_by_month_year(0, 0, zUserName); |
| 742 | 742 | break; |
| 743 | 743 |
| --- src/statrep.c | |
| +++ src/statrep.c | |
| @@ -732,11 +732,11 @@ | |
| 732 | " ORDER BY 1 COLLATE nocase) WHERE x!=''", |
| 733 | eType==RPT_BYFILE ? "WHERE type='ci'" : "" |
| 734 | ); |
| 735 | } |
| 736 | } |
| 737 | style_submenu_element("Stats", "Stats", "%R/stat"); |
| 738 | style_header("Activity Reports"); |
| 739 | switch( eType ){ |
| 740 | case RPT_BYYEAR: |
| 741 | stats_report_by_month_year(0, 0, zUserName); |
| 742 | break; |
| 743 |
| --- src/statrep.c | |
| +++ src/statrep.c | |
| @@ -732,11 +732,11 @@ | |
| 732 | " ORDER BY 1 COLLATE nocase) WHERE x!=''", |
| 733 | eType==RPT_BYFILE ? "WHERE type='ci'" : "" |
| 734 | ); |
| 735 | } |
| 736 | } |
| 737 | style_submenu_element("Stats", "%R/stat"); |
| 738 | style_header("Activity Reports"); |
| 739 | switch( eType ){ |
| 740 | case RPT_BYYEAR: |
| 741 | stats_report_by_month_year(0, 0, zUserName); |
| 742 | break; |
| 743 |
+3
-6
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -38,11 +38,10 @@ | ||
| 38 | 38 | ** will generate the appropriate HTML text just below the main |
| 39 | 39 | ** menu. |
| 40 | 40 | */ |
| 41 | 41 | static struct Submenu { |
| 42 | 42 | const char *zLabel; /* Button label */ |
| 43 | - const char *zTitle; | |
| 44 | 43 | const char *zLink; /* Jump to this link when button is pressed */ |
| 45 | 44 | } aSubmenu[30]; |
| 46 | 45 | static int nSubmenu = 0; /* Number of buttons */ |
| 47 | 46 | static struct SubmenuCtrl { |
| 48 | 47 | const char *zName; /* Form query parameter */ |
| @@ -230,18 +229,16 @@ | ||
| 230 | 229 | /* |
| 231 | 230 | ** Add a new element to the submenu |
| 232 | 231 | */ |
| 233 | 232 | void style_submenu_element( |
| 234 | 233 | const char *zLabel, |
| 235 | - const char *zTitle, | |
| 236 | 234 | const char *zLink, |
| 237 | 235 | ... |
| 238 | 236 | ){ |
| 239 | 237 | va_list ap; |
| 240 | 238 | assert( nSubmenu < sizeof(aSubmenu)/sizeof(aSubmenu[0]) ); |
| 241 | 239 | aSubmenu[nSubmenu].zLabel = zLabel; |
| 242 | - aSubmenu[nSubmenu].zTitle = zTitle ? zTitle : zLabel; | |
| 243 | 240 | va_start(ap, zLink); |
| 244 | 241 | aSubmenu[nSubmenu].zLink = vmprintf(zLink, ap); |
| 245 | 242 | va_end(ap); |
| 246 | 243 | nSubmenu++; |
| 247 | 244 | } |
| @@ -1584,15 +1581,15 @@ | ||
| 1584 | 1581 | } |
| 1585 | 1582 | for(i=0; i<count(azCgiVars); i++) (void)P(azCgiVars[i]); |
| 1586 | 1583 | style_header("Environment Test"); |
| 1587 | 1584 | showAll = atoi(PD("showall","0")); |
| 1588 | 1585 | if( !showAll ){ |
| 1589 | - style_submenu_element("Show Cookies", 0, "%R/test_env?showall=1"); | |
| 1586 | + style_submenu_element("Show Cookies", "%R/test_env?showall=1"); | |
| 1590 | 1587 | }else{ |
| 1591 | - style_submenu_element("Hide Cookies", 0, "%R/test_env"); | |
| 1588 | + style_submenu_element("Hide Cookies", "%R/test_env"); | |
| 1592 | 1589 | } |
| 1593 | - style_submenu_element("Stats", 0, "%R/stat"); | |
| 1590 | + style_submenu_element("Stats", "%R/stat"); | |
| 1594 | 1591 | |
| 1595 | 1592 | #if !defined(_WIN32) |
| 1596 | 1593 | @ uid=%d(getuid()), gid=%d(getgid())<br /> |
| 1597 | 1594 | #endif |
| 1598 | 1595 | @ g.zBaseURL = %h(g.zBaseURL)<br /> |
| 1599 | 1596 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -38,11 +38,10 @@ | |
| 38 | ** will generate the appropriate HTML text just below the main |
| 39 | ** menu. |
| 40 | */ |
| 41 | static struct Submenu { |
| 42 | const char *zLabel; /* Button label */ |
| 43 | const char *zTitle; |
| 44 | const char *zLink; /* Jump to this link when button is pressed */ |
| 45 | } aSubmenu[30]; |
| 46 | static int nSubmenu = 0; /* Number of buttons */ |
| 47 | static struct SubmenuCtrl { |
| 48 | const char *zName; /* Form query parameter */ |
| @@ -230,18 +229,16 @@ | |
| 230 | /* |
| 231 | ** Add a new element to the submenu |
| 232 | */ |
| 233 | void style_submenu_element( |
| 234 | const char *zLabel, |
| 235 | const char *zTitle, |
| 236 | const char *zLink, |
| 237 | ... |
| 238 | ){ |
| 239 | va_list ap; |
| 240 | assert( nSubmenu < sizeof(aSubmenu)/sizeof(aSubmenu[0]) ); |
| 241 | aSubmenu[nSubmenu].zLabel = zLabel; |
| 242 | aSubmenu[nSubmenu].zTitle = zTitle ? zTitle : zLabel; |
| 243 | va_start(ap, zLink); |
| 244 | aSubmenu[nSubmenu].zLink = vmprintf(zLink, ap); |
| 245 | va_end(ap); |
| 246 | nSubmenu++; |
| 247 | } |
| @@ -1584,15 +1581,15 @@ | |
| 1584 | } |
| 1585 | for(i=0; i<count(azCgiVars); i++) (void)P(azCgiVars[i]); |
| 1586 | style_header("Environment Test"); |
| 1587 | showAll = atoi(PD("showall","0")); |
| 1588 | if( !showAll ){ |
| 1589 | style_submenu_element("Show Cookies", 0, "%R/test_env?showall=1"); |
| 1590 | }else{ |
| 1591 | style_submenu_element("Hide Cookies", 0, "%R/test_env"); |
| 1592 | } |
| 1593 | style_submenu_element("Stats", 0, "%R/stat"); |
| 1594 | |
| 1595 | #if !defined(_WIN32) |
| 1596 | @ uid=%d(getuid()), gid=%d(getgid())<br /> |
| 1597 | #endif |
| 1598 | @ g.zBaseURL = %h(g.zBaseURL)<br /> |
| 1599 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -38,11 +38,10 @@ | |
| 38 | ** will generate the appropriate HTML text just below the main |
| 39 | ** menu. |
| 40 | */ |
| 41 | static struct Submenu { |
| 42 | const char *zLabel; /* Button label */ |
| 43 | const char *zLink; /* Jump to this link when button is pressed */ |
| 44 | } aSubmenu[30]; |
| 45 | static int nSubmenu = 0; /* Number of buttons */ |
| 46 | static struct SubmenuCtrl { |
| 47 | const char *zName; /* Form query parameter */ |
| @@ -230,18 +229,16 @@ | |
| 229 | /* |
| 230 | ** Add a new element to the submenu |
| 231 | */ |
| 232 | void style_submenu_element( |
| 233 | const char *zLabel, |
| 234 | const char *zLink, |
| 235 | ... |
| 236 | ){ |
| 237 | va_list ap; |
| 238 | assert( nSubmenu < sizeof(aSubmenu)/sizeof(aSubmenu[0]) ); |
| 239 | aSubmenu[nSubmenu].zLabel = zLabel; |
| 240 | va_start(ap, zLink); |
| 241 | aSubmenu[nSubmenu].zLink = vmprintf(zLink, ap); |
| 242 | va_end(ap); |
| 243 | nSubmenu++; |
| 244 | } |
| @@ -1584,15 +1581,15 @@ | |
| 1581 | } |
| 1582 | for(i=0; i<count(azCgiVars); i++) (void)P(azCgiVars[i]); |
| 1583 | style_header("Environment Test"); |
| 1584 | showAll = atoi(PD("showall","0")); |
| 1585 | if( !showAll ){ |
| 1586 | style_submenu_element("Show Cookies", "%R/test_env?showall=1"); |
| 1587 | }else{ |
| 1588 | style_submenu_element("Hide Cookies", "%R/test_env"); |
| 1589 | } |
| 1590 | style_submenu_element("Stats", "%R/stat"); |
| 1591 | |
| 1592 | #if !defined(_WIN32) |
| 1593 | @ uid=%d(getuid()), gid=%d(getgid())<br /> |
| 1594 | #endif |
| 1595 | @ g.zBaseURL = %h(g.zBaseURL)<br /> |
| 1596 |
+3
-6
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -38,11 +38,10 @@ | ||
| 38 | 38 | ** will generate the appropriate HTML text just below the main |
| 39 | 39 | ** menu. |
| 40 | 40 | */ |
| 41 | 41 | static struct Submenu { |
| 42 | 42 | const char *zLabel; /* Button label */ |
| 43 | - const char *zTitle; | |
| 44 | 43 | const char *zLink; /* Jump to this link when button is pressed */ |
| 45 | 44 | } aSubmenu[30]; |
| 46 | 45 | static int nSubmenu = 0; /* Number of buttons */ |
| 47 | 46 | static struct SubmenuCtrl { |
| 48 | 47 | const char *zName; /* Form query parameter */ |
| @@ -230,18 +229,16 @@ | ||
| 230 | 229 | /* |
| 231 | 230 | ** Add a new element to the submenu |
| 232 | 231 | */ |
| 233 | 232 | void style_submenu_element( |
| 234 | 233 | const char *zLabel, |
| 235 | - const char *zTitle, | |
| 236 | 234 | const char *zLink, |
| 237 | 235 | ... |
| 238 | 236 | ){ |
| 239 | 237 | va_list ap; |
| 240 | 238 | assert( nSubmenu < sizeof(aSubmenu)/sizeof(aSubmenu[0]) ); |
| 241 | 239 | aSubmenu[nSubmenu].zLabel = zLabel; |
| 242 | - aSubmenu[nSubmenu].zTitle = zTitle ? zTitle : zLabel; | |
| 243 | 240 | va_start(ap, zLink); |
| 244 | 241 | aSubmenu[nSubmenu].zLink = vmprintf(zLink, ap); |
| 245 | 242 | va_end(ap); |
| 246 | 243 | nSubmenu++; |
| 247 | 244 | } |
| @@ -1584,15 +1581,15 @@ | ||
| 1584 | 1581 | } |
| 1585 | 1582 | for(i=0; i<count(azCgiVars); i++) (void)P(azCgiVars[i]); |
| 1586 | 1583 | style_header("Environment Test"); |
| 1587 | 1584 | showAll = atoi(PD("showall","0")); |
| 1588 | 1585 | if( !showAll ){ |
| 1589 | - style_submenu_element("Show Cookies", 0, "%R/test_env?showall=1"); | |
| 1586 | + style_submenu_element("Show Cookies", "%R/test_env?showall=1"); | |
| 1590 | 1587 | }else{ |
| 1591 | - style_submenu_element("Hide Cookies", 0, "%R/test_env"); | |
| 1588 | + style_submenu_element("Hide Cookies", "%R/test_env"); | |
| 1592 | 1589 | } |
| 1593 | - style_submenu_element("Stats", 0, "%R/stat"); | |
| 1590 | + style_submenu_element("Stats", "%R/stat"); | |
| 1594 | 1591 | |
| 1595 | 1592 | #if !defined(_WIN32) |
| 1596 | 1593 | @ uid=%d(getuid()), gid=%d(getgid())<br /> |
| 1597 | 1594 | #endif |
| 1598 | 1595 | @ g.zBaseURL = %h(g.zBaseURL)<br /> |
| 1599 | 1596 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -38,11 +38,10 @@ | |
| 38 | ** will generate the appropriate HTML text just below the main |
| 39 | ** menu. |
| 40 | */ |
| 41 | static struct Submenu { |
| 42 | const char *zLabel; /* Button label */ |
| 43 | const char *zTitle; |
| 44 | const char *zLink; /* Jump to this link when button is pressed */ |
| 45 | } aSubmenu[30]; |
| 46 | static int nSubmenu = 0; /* Number of buttons */ |
| 47 | static struct SubmenuCtrl { |
| 48 | const char *zName; /* Form query parameter */ |
| @@ -230,18 +229,16 @@ | |
| 230 | /* |
| 231 | ** Add a new element to the submenu |
| 232 | */ |
| 233 | void style_submenu_element( |
| 234 | const char *zLabel, |
| 235 | const char *zTitle, |
| 236 | const char *zLink, |
| 237 | ... |
| 238 | ){ |
| 239 | va_list ap; |
| 240 | assert( nSubmenu < sizeof(aSubmenu)/sizeof(aSubmenu[0]) ); |
| 241 | aSubmenu[nSubmenu].zLabel = zLabel; |
| 242 | aSubmenu[nSubmenu].zTitle = zTitle ? zTitle : zLabel; |
| 243 | va_start(ap, zLink); |
| 244 | aSubmenu[nSubmenu].zLink = vmprintf(zLink, ap); |
| 245 | va_end(ap); |
| 246 | nSubmenu++; |
| 247 | } |
| @@ -1584,15 +1581,15 @@ | |
| 1584 | } |
| 1585 | for(i=0; i<count(azCgiVars); i++) (void)P(azCgiVars[i]); |
| 1586 | style_header("Environment Test"); |
| 1587 | showAll = atoi(PD("showall","0")); |
| 1588 | if( !showAll ){ |
| 1589 | style_submenu_element("Show Cookies", 0, "%R/test_env?showall=1"); |
| 1590 | }else{ |
| 1591 | style_submenu_element("Hide Cookies", 0, "%R/test_env"); |
| 1592 | } |
| 1593 | style_submenu_element("Stats", 0, "%R/stat"); |
| 1594 | |
| 1595 | #if !defined(_WIN32) |
| 1596 | @ uid=%d(getuid()), gid=%d(getgid())<br /> |
| 1597 | #endif |
| 1598 | @ g.zBaseURL = %h(g.zBaseURL)<br /> |
| 1599 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -38,11 +38,10 @@ | |
| 38 | ** will generate the appropriate HTML text just below the main |
| 39 | ** menu. |
| 40 | */ |
| 41 | static struct Submenu { |
| 42 | const char *zLabel; /* Button label */ |
| 43 | const char *zLink; /* Jump to this link when button is pressed */ |
| 44 | } aSubmenu[30]; |
| 45 | static int nSubmenu = 0; /* Number of buttons */ |
| 46 | static struct SubmenuCtrl { |
| 47 | const char *zName; /* Form query parameter */ |
| @@ -230,18 +229,16 @@ | |
| 229 | /* |
| 230 | ** Add a new element to the submenu |
| 231 | */ |
| 232 | void style_submenu_element( |
| 233 | const char *zLabel, |
| 234 | const char *zLink, |
| 235 | ... |
| 236 | ){ |
| 237 | va_list ap; |
| 238 | assert( nSubmenu < sizeof(aSubmenu)/sizeof(aSubmenu[0]) ); |
| 239 | aSubmenu[nSubmenu].zLabel = zLabel; |
| 240 | va_start(ap, zLink); |
| 241 | aSubmenu[nSubmenu].zLink = vmprintf(zLink, ap); |
| 242 | va_end(ap); |
| 243 | nSubmenu++; |
| 244 | } |
| @@ -1584,15 +1581,15 @@ | |
| 1581 | } |
| 1582 | for(i=0; i<count(azCgiVars); i++) (void)P(azCgiVars[i]); |
| 1583 | style_header("Environment Test"); |
| 1584 | showAll = atoi(PD("showall","0")); |
| 1585 | if( !showAll ){ |
| 1586 | style_submenu_element("Show Cookies", "%R/test_env?showall=1"); |
| 1587 | }else{ |
| 1588 | style_submenu_element("Hide Cookies", "%R/test_env"); |
| 1589 | } |
| 1590 | style_submenu_element("Stats", "%R/stat"); |
| 1591 | |
| 1592 | #if !defined(_WIN32) |
| 1593 | @ uid=%d(getuid()), gid=%d(getgid())<br /> |
| 1594 | #endif |
| 1595 | @ g.zBaseURL = %h(g.zBaseURL)<br /> |
| 1596 |
+2
-2
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -654,11 +654,11 @@ | ||
| 654 | 654 | login_needed(g.anon.Read); |
| 655 | 655 | } |
| 656 | 656 | login_anonymous_available(); |
| 657 | 657 | style_header("Tags"); |
| 658 | 658 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 659 | - style_submenu_element("Timeline", "Timeline", "tagtimeline"); | |
| 659 | + style_submenu_element("Timeline", "tagtimeline"); | |
| 660 | 660 | @ <h2>Non-propagating tags:</h2> |
| 661 | 661 | db_prepare(&q, |
| 662 | 662 | "SELECT substr(tagname,5)" |
| 663 | 663 | " FROM tag" |
| 664 | 664 | " WHERE EXISTS(SELECT 1 FROM tagxref" |
| @@ -693,11 +693,11 @@ | ||
| 693 | 693 | |
| 694 | 694 | login_check_credentials(); |
| 695 | 695 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 696 | 696 | |
| 697 | 697 | style_header("Tagged Check-ins"); |
| 698 | - style_submenu_element("List", "List", "taglist"); | |
| 698 | + style_submenu_element("List", "taglist"); | |
| 699 | 699 | login_anonymous_available(); |
| 700 | 700 | @ <h2>Check-ins with non-propagating tags:</h2> |
| 701 | 701 | db_prepare(&q, |
| 702 | 702 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 703 | 703 | " WHERE tagtype=1 AND srcid>0" |
| 704 | 704 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -654,11 +654,11 @@ | |
| 654 | login_needed(g.anon.Read); |
| 655 | } |
| 656 | login_anonymous_available(); |
| 657 | style_header("Tags"); |
| 658 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 659 | style_submenu_element("Timeline", "Timeline", "tagtimeline"); |
| 660 | @ <h2>Non-propagating tags:</h2> |
| 661 | db_prepare(&q, |
| 662 | "SELECT substr(tagname,5)" |
| 663 | " FROM tag" |
| 664 | " WHERE EXISTS(SELECT 1 FROM tagxref" |
| @@ -693,11 +693,11 @@ | |
| 693 | |
| 694 | login_check_credentials(); |
| 695 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 696 | |
| 697 | style_header("Tagged Check-ins"); |
| 698 | style_submenu_element("List", "List", "taglist"); |
| 699 | login_anonymous_available(); |
| 700 | @ <h2>Check-ins with non-propagating tags:</h2> |
| 701 | db_prepare(&q, |
| 702 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 703 | " WHERE tagtype=1 AND srcid>0" |
| 704 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -654,11 +654,11 @@ | |
| 654 | login_needed(g.anon.Read); |
| 655 | } |
| 656 | login_anonymous_available(); |
| 657 | style_header("Tags"); |
| 658 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 659 | style_submenu_element("Timeline", "tagtimeline"); |
| 660 | @ <h2>Non-propagating tags:</h2> |
| 661 | db_prepare(&q, |
| 662 | "SELECT substr(tagname,5)" |
| 663 | " FROM tag" |
| 664 | " WHERE EXISTS(SELECT 1 FROM tagxref" |
| @@ -693,11 +693,11 @@ | |
| 693 | |
| 694 | login_check_credentials(); |
| 695 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 696 | |
| 697 | style_header("Tagged Check-ins"); |
| 698 | style_submenu_element("List", "taglist"); |
| 699 | login_anonymous_available(); |
| 700 | @ <h2>Check-ins with non-propagating tags:</h2> |
| 701 | db_prepare(&q, |
| 702 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 703 | " WHERE tagtype=1 AND srcid>0" |
| 704 |
+4
-6
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1083,11 +1083,11 @@ | ||
| 1083 | 1083 | const char *zMenuName, /* Submenu name */ |
| 1084 | 1084 | const char *zParam, /* Parameter value to add or change */ |
| 1085 | 1085 | const char *zValue, /* Value of the new parameter */ |
| 1086 | 1086 | const char *zRemove /* Parameter to omit */ |
| 1087 | 1087 | ){ |
| 1088 | - style_submenu_element(zMenuName, zMenuName, "%s", | |
| 1088 | + style_submenu_element(zMenuName, "%s", | |
| 1089 | 1089 | url_render(pUrl, zParam, zValue, zRemove, 0)); |
| 1090 | 1090 | } |
| 1091 | 1091 | |
| 1092 | 1092 | |
| 1093 | 1093 | /* |
| @@ -1553,15 +1553,13 @@ | ||
| 1553 | 1553 | if( zThisTag ){ |
| 1554 | 1554 | zTagSql = tagMatchExpression(matchStyle, zThisTag, &zMatchDesc); |
| 1555 | 1555 | } |
| 1556 | 1556 | |
| 1557 | 1557 | if( zTagName && g.perm.Read ){ |
| 1558 | - style_submenu_element("Related", "Related", "%s", | |
| 1559 | - url_render(&url, "r", zTagName, "t", 0)); | |
| 1558 | + timeline_submenu(&url, "Related", "r", zTagName, "t"); | |
| 1560 | 1559 | }else if( zBrName && g.perm.Read ){ |
| 1561 | - style_submenu_element("Branch Only", "only", "%s", | |
| 1562 | - url_render(&url, "t", zBrName, "r", 0)); | |
| 1560 | + timeline_submenu(&url, "Branch Only", "t", zBrName, "r"); | |
| 1563 | 1561 | } |
| 1564 | 1562 | if( zMark && zMark[0]==0 ){ |
| 1565 | 1563 | if( zAfter ) zMark = zAfter; |
| 1566 | 1564 | if( zBefore ) zMark = zBefore; |
| 1567 | 1565 | if( zCirca ) zMark = zCirca; |
| @@ -2057,11 +2055,11 @@ | ||
| 2057 | 2055 | } |
| 2058 | 2056 | if( PB("showsql") ){ |
| 2059 | 2057 | @ <pre>%h(blob_sql_text(&sql))</pre> |
| 2060 | 2058 | } |
| 2061 | 2059 | if( search_restrict(SRCH_CKIN)!=0 ){ |
| 2062 | - style_submenu_element("Search", 0, "%R/search?y=c"); | |
| 2060 | + style_submenu_element("Search", "%R/search?y=c"); | |
| 2063 | 2061 | } |
| 2064 | 2062 | if( PB("showid") ) tmFlags |= TIMELINE_SHOWRID; |
| 2065 | 2063 | if( useDividers && zMark && zMark[0] ){ |
| 2066 | 2064 | double r = symbolic_name_to_mtime(zMark); |
| 2067 | 2065 | if( r>0.0 ) selectedRid = timeline_add_divider(r); |
| 2068 | 2066 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1083,11 +1083,11 @@ | |
| 1083 | const char *zMenuName, /* Submenu name */ |
| 1084 | const char *zParam, /* Parameter value to add or change */ |
| 1085 | const char *zValue, /* Value of the new parameter */ |
| 1086 | const char *zRemove /* Parameter to omit */ |
| 1087 | ){ |
| 1088 | style_submenu_element(zMenuName, zMenuName, "%s", |
| 1089 | url_render(pUrl, zParam, zValue, zRemove, 0)); |
| 1090 | } |
| 1091 | |
| 1092 | |
| 1093 | /* |
| @@ -1553,15 +1553,13 @@ | |
| 1553 | if( zThisTag ){ |
| 1554 | zTagSql = tagMatchExpression(matchStyle, zThisTag, &zMatchDesc); |
| 1555 | } |
| 1556 | |
| 1557 | if( zTagName && g.perm.Read ){ |
| 1558 | style_submenu_element("Related", "Related", "%s", |
| 1559 | url_render(&url, "r", zTagName, "t", 0)); |
| 1560 | }else if( zBrName && g.perm.Read ){ |
| 1561 | style_submenu_element("Branch Only", "only", "%s", |
| 1562 | url_render(&url, "t", zBrName, "r", 0)); |
| 1563 | } |
| 1564 | if( zMark && zMark[0]==0 ){ |
| 1565 | if( zAfter ) zMark = zAfter; |
| 1566 | if( zBefore ) zMark = zBefore; |
| 1567 | if( zCirca ) zMark = zCirca; |
| @@ -2057,11 +2055,11 @@ | |
| 2057 | } |
| 2058 | if( PB("showsql") ){ |
| 2059 | @ <pre>%h(blob_sql_text(&sql))</pre> |
| 2060 | } |
| 2061 | if( search_restrict(SRCH_CKIN)!=0 ){ |
| 2062 | style_submenu_element("Search", 0, "%R/search?y=c"); |
| 2063 | } |
| 2064 | if( PB("showid") ) tmFlags |= TIMELINE_SHOWRID; |
| 2065 | if( useDividers && zMark && zMark[0] ){ |
| 2066 | double r = symbolic_name_to_mtime(zMark); |
| 2067 | if( r>0.0 ) selectedRid = timeline_add_divider(r); |
| 2068 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1083,11 +1083,11 @@ | |
| 1083 | const char *zMenuName, /* Submenu name */ |
| 1084 | const char *zParam, /* Parameter value to add or change */ |
| 1085 | const char *zValue, /* Value of the new parameter */ |
| 1086 | const char *zRemove /* Parameter to omit */ |
| 1087 | ){ |
| 1088 | style_submenu_element(zMenuName, "%s", |
| 1089 | url_render(pUrl, zParam, zValue, zRemove, 0)); |
| 1090 | } |
| 1091 | |
| 1092 | |
| 1093 | /* |
| @@ -1553,15 +1553,13 @@ | |
| 1553 | if( zThisTag ){ |
| 1554 | zTagSql = tagMatchExpression(matchStyle, zThisTag, &zMatchDesc); |
| 1555 | } |
| 1556 | |
| 1557 | if( zTagName && g.perm.Read ){ |
| 1558 | timeline_submenu(&url, "Related", "r", zTagName, "t"); |
| 1559 | }else if( zBrName && g.perm.Read ){ |
| 1560 | timeline_submenu(&url, "Branch Only", "t", zBrName, "r"); |
| 1561 | } |
| 1562 | if( zMark && zMark[0]==0 ){ |
| 1563 | if( zAfter ) zMark = zAfter; |
| 1564 | if( zBefore ) zMark = zBefore; |
| 1565 | if( zCirca ) zMark = zCirca; |
| @@ -2057,11 +2055,11 @@ | |
| 2055 | } |
| 2056 | if( PB("showsql") ){ |
| 2057 | @ <pre>%h(blob_sql_text(&sql))</pre> |
| 2058 | } |
| 2059 | if( search_restrict(SRCH_CKIN)!=0 ){ |
| 2060 | style_submenu_element("Search", "%R/search?y=c"); |
| 2061 | } |
| 2062 | if( PB("showid") ) tmFlags |= TIMELINE_SHOWRID; |
| 2063 | if( useDividers && zMark && zMark[0] ){ |
| 2064 | double r = symbolic_name_to_mtime(zMark); |
| 2065 | if( r>0.0 ) selectedRid = timeline_add_divider(r); |
| 2066 |
+4
-6
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1083,11 +1083,11 @@ | ||
| 1083 | 1083 | const char *zMenuName, /* Submenu name */ |
| 1084 | 1084 | const char *zParam, /* Parameter value to add or change */ |
| 1085 | 1085 | const char *zValue, /* Value of the new parameter */ |
| 1086 | 1086 | const char *zRemove /* Parameter to omit */ |
| 1087 | 1087 | ){ |
| 1088 | - style_submenu_element(zMenuName, zMenuName, "%s", | |
| 1088 | + style_submenu_element(zMenuName, "%s", | |
| 1089 | 1089 | url_render(pUrl, zParam, zValue, zRemove, 0)); |
| 1090 | 1090 | } |
| 1091 | 1091 | |
| 1092 | 1092 | |
| 1093 | 1093 | /* |
| @@ -1553,15 +1553,13 @@ | ||
| 1553 | 1553 | if( zThisTag ){ |
| 1554 | 1554 | zTagSql = tagMatchExpression(matchStyle, zThisTag, &zMatchDesc); |
| 1555 | 1555 | } |
| 1556 | 1556 | |
| 1557 | 1557 | if( zTagName && g.perm.Read ){ |
| 1558 | - style_submenu_element("Related", "Related", "%s", | |
| 1559 | - url_render(&url, "r", zTagName, "t", 0)); | |
| 1558 | + timeline_submenu(&url, "Related", "r", zTagName, "t"); | |
| 1560 | 1559 | }else if( zBrName && g.perm.Read ){ |
| 1561 | - style_submenu_element("Branch Only", "only", "%s", | |
| 1562 | - url_render(&url, "t", zBrName, "r", 0)); | |
| 1560 | + timeline_submenu(&url, "Branch Only", "t", zBrName, "r"); | |
| 1563 | 1561 | } |
| 1564 | 1562 | if( zMark && zMark[0]==0 ){ |
| 1565 | 1563 | if( zAfter ) zMark = zAfter; |
| 1566 | 1564 | if( zBefore ) zMark = zBefore; |
| 1567 | 1565 | if( zCirca ) zMark = zCirca; |
| @@ -2057,11 +2055,11 @@ | ||
| 2057 | 2055 | } |
| 2058 | 2056 | if( PB("showsql") ){ |
| 2059 | 2057 | @ <pre>%h(blob_sql_text(&sql))</pre> |
| 2060 | 2058 | } |
| 2061 | 2059 | if( search_restrict(SRCH_CKIN)!=0 ){ |
| 2062 | - style_submenu_element("Search", 0, "%R/search?y=c"); | |
| 2060 | + style_submenu_element("Search", "%R/search?y=c"); | |
| 2063 | 2061 | } |
| 2064 | 2062 | if( PB("showid") ) tmFlags |= TIMELINE_SHOWRID; |
| 2065 | 2063 | if( useDividers && zMark && zMark[0] ){ |
| 2066 | 2064 | double r = symbolic_name_to_mtime(zMark); |
| 2067 | 2065 | if( r>0.0 ) selectedRid = timeline_add_divider(r); |
| 2068 | 2066 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1083,11 +1083,11 @@ | |
| 1083 | const char *zMenuName, /* Submenu name */ |
| 1084 | const char *zParam, /* Parameter value to add or change */ |
| 1085 | const char *zValue, /* Value of the new parameter */ |
| 1086 | const char *zRemove /* Parameter to omit */ |
| 1087 | ){ |
| 1088 | style_submenu_element(zMenuName, zMenuName, "%s", |
| 1089 | url_render(pUrl, zParam, zValue, zRemove, 0)); |
| 1090 | } |
| 1091 | |
| 1092 | |
| 1093 | /* |
| @@ -1553,15 +1553,13 @@ | |
| 1553 | if( zThisTag ){ |
| 1554 | zTagSql = tagMatchExpression(matchStyle, zThisTag, &zMatchDesc); |
| 1555 | } |
| 1556 | |
| 1557 | if( zTagName && g.perm.Read ){ |
| 1558 | style_submenu_element("Related", "Related", "%s", |
| 1559 | url_render(&url, "r", zTagName, "t", 0)); |
| 1560 | }else if( zBrName && g.perm.Read ){ |
| 1561 | style_submenu_element("Branch Only", "only", "%s", |
| 1562 | url_render(&url, "t", zBrName, "r", 0)); |
| 1563 | } |
| 1564 | if( zMark && zMark[0]==0 ){ |
| 1565 | if( zAfter ) zMark = zAfter; |
| 1566 | if( zBefore ) zMark = zBefore; |
| 1567 | if( zCirca ) zMark = zCirca; |
| @@ -2057,11 +2055,11 @@ | |
| 2057 | } |
| 2058 | if( PB("showsql") ){ |
| 2059 | @ <pre>%h(blob_sql_text(&sql))</pre> |
| 2060 | } |
| 2061 | if( search_restrict(SRCH_CKIN)!=0 ){ |
| 2062 | style_submenu_element("Search", 0, "%R/search?y=c"); |
| 2063 | } |
| 2064 | if( PB("showid") ) tmFlags |= TIMELINE_SHOWRID; |
| 2065 | if( useDividers && zMark && zMark[0] ){ |
| 2066 | double r = symbolic_name_to_mtime(zMark); |
| 2067 | if( r>0.0 ) selectedRid = timeline_add_divider(r); |
| 2068 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1083,11 +1083,11 @@ | |
| 1083 | const char *zMenuName, /* Submenu name */ |
| 1084 | const char *zParam, /* Parameter value to add or change */ |
| 1085 | const char *zValue, /* Value of the new parameter */ |
| 1086 | const char *zRemove /* Parameter to omit */ |
| 1087 | ){ |
| 1088 | style_submenu_element(zMenuName, "%s", |
| 1089 | url_render(pUrl, zParam, zValue, zRemove, 0)); |
| 1090 | } |
| 1091 | |
| 1092 | |
| 1093 | /* |
| @@ -1553,15 +1553,13 @@ | |
| 1553 | if( zThisTag ){ |
| 1554 | zTagSql = tagMatchExpression(matchStyle, zThisTag, &zMatchDesc); |
| 1555 | } |
| 1556 | |
| 1557 | if( zTagName && g.perm.Read ){ |
| 1558 | timeline_submenu(&url, "Related", "r", zTagName, "t"); |
| 1559 | }else if( zBrName && g.perm.Read ){ |
| 1560 | timeline_submenu(&url, "Branch Only", "t", zBrName, "r"); |
| 1561 | } |
| 1562 | if( zMark && zMark[0]==0 ){ |
| 1563 | if( zAfter ) zMark = zAfter; |
| 1564 | if( zBefore ) zMark = zBefore; |
| 1565 | if( zCirca ) zMark = zCirca; |
| @@ -2057,11 +2055,11 @@ | |
| 2055 | } |
| 2056 | if( PB("showsql") ){ |
| 2057 | @ <pre>%h(blob_sql_text(&sql))</pre> |
| 2058 | } |
| 2059 | if( search_restrict(SRCH_CKIN)!=0 ){ |
| 2060 | style_submenu_element("Search", "%R/search?y=c"); |
| 2061 | } |
| 2062 | if( PB("showid") ) tmFlags |= TIMELINE_SHOWRID; |
| 2063 | if( useDividers && zMark && zMark[0] ){ |
| 2064 | double r = symbolic_name_to_mtime(zMark); |
| 2065 | if( r>0.0 ) selectedRid = timeline_add_divider(r); |
| 2066 |
+22
-36
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -456,35 +456,28 @@ | ||
| 456 | 456 | const char *zUuid = PD("name",""); |
| 457 | 457 | |
| 458 | 458 | login_check_credentials(); |
| 459 | 459 | if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; } |
| 460 | 460 | if( g.anon.WrTkt || g.anon.ApndTkt ){ |
| 461 | - style_submenu_element("Edit", "Edit The Ticket", "%s/tktedit?name=%T", | |
| 462 | - g.zTop, PD("name","")); | |
| 461 | + style_submenu_element("Edit", "%s/tktedit?name=%T", g.zTop, PD("name","")); | |
| 463 | 462 | } |
| 464 | 463 | if( g.perm.Hyperlink ){ |
| 465 | - style_submenu_element("History", "History Of This Ticket", | |
| 466 | - "%s/tkthistory/%T", g.zTop, zUuid); | |
| 467 | - style_submenu_element("Timeline", "Timeline Of This Ticket", | |
| 468 | - "%s/tkttimeline/%T", g.zTop, zUuid); | |
| 469 | - style_submenu_element("Check-ins", "Check-ins Of This Ticket", | |
| 470 | - "%s/tkttimeline/%T?y=ci", g.zTop, zUuid); | |
| 464 | + style_submenu_element("History", "%s/tkthistory/%T", g.zTop, zUuid); | |
| 465 | + style_submenu_element("Timeline", "%s/tkttimeline/%T", g.zTop, zUuid); | |
| 466 | + style_submenu_element("Check-ins", "%s/tkttimeline/%T?y=ci", g.zTop, zUuid); | |
| 471 | 467 | } |
| 472 | 468 | if( g.anon.NewTkt ){ |
| 473 | - style_submenu_element("New Ticket", "Create a new ticket", | |
| 474 | - "%s/tktnew", g.zTop); | |
| 469 | + style_submenu_element("New Ticket", "%s/tktnew", g.zTop); | |
| 475 | 470 | } |
| 476 | 471 | if( g.anon.ApndTkt && g.anon.Attach ){ |
| 477 | - style_submenu_element("Attach", "Add An Attachment", | |
| 478 | - "%s/attachadd?tkt=%T&from=%s/tktview/%t", | |
| 472 | + style_submenu_element("Attach", "%s/attachadd?tkt=%T&from=%s/tktview/%t", | |
| 479 | 473 | g.zTop, zUuid, g.zTop, zUuid); |
| 480 | 474 | } |
| 481 | 475 | if( P("plaintext") ){ |
| 482 | - style_submenu_element("Formatted", "Formatted", "%R/tktview/%s", zUuid); | |
| 476 | + style_submenu_element("Formatted", "%R/tktview/%s", zUuid); | |
| 483 | 477 | }else{ |
| 484 | - style_submenu_element("Plaintext", "Plaintext", | |
| 485 | - "%R/tktview/%s?plaintext", zUuid); | |
| 478 | + style_submenu_element("Plaintext", "%R/tktview/%s?plaintext", zUuid); | |
| 486 | 479 | } |
| 487 | 480 | style_header("View Ticket"); |
| 488 | 481 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br />\n", -1); |
| 489 | 482 | ticket_init(); |
| 490 | 483 | initializeVariablesFromCGI(); |
| @@ -856,20 +849,17 @@ | ||
| 856 | 849 | return; |
| 857 | 850 | } |
| 858 | 851 | zUuid = PD("name",""); |
| 859 | 852 | zType = PD("y","a"); |
| 860 | 853 | if( zType[0]!='c' ){ |
| 861 | - style_submenu_element("Check-ins", "Check-ins", | |
| 862 | - "%s/tkttimeline?name=%T&y=ci", g.zTop, zUuid); | |
| 854 | + style_submenu_element("Check-ins", "%s/tkttimeline?name=%T&y=ci", | |
| 855 | + g.zTop, zUuid); | |
| 863 | 856 | }else{ |
| 864 | - style_submenu_element("Timeline", "Timeline", | |
| 865 | - "%s/tkttimeline?name=%T", g.zTop, zUuid); | |
| 857 | + style_submenu_element("Timeline", "%s/tkttimeline?name=%T", g.zTop, zUuid); | |
| 866 | 858 | } |
| 867 | - style_submenu_element("History", "History", | |
| 868 | - "%s/tkthistory/%s", g.zTop, zUuid); | |
| 869 | - style_submenu_element("Status", "Status", | |
| 870 | - "%s/info/%s", g.zTop, zUuid); | |
| 859 | + style_submenu_element("History", "%s/tkthistory/%s", g.zTop, zUuid); | |
| 860 | + style_submenu_element("Status", "%s/info/%s", g.zTop, zUuid); | |
| 871 | 861 | if( zType[0]=='c' ){ |
| 872 | 862 | zTitle = mprintf("Check-ins Associated With Ticket %h", zUuid); |
| 873 | 863 | }else{ |
| 874 | 864 | zTitle = mprintf("Timeline Of Ticket %h", zUuid); |
| 875 | 865 | } |
| @@ -931,22 +921,18 @@ | ||
| 931 | 921 | login_needed(g.anon.Hyperlink && g.anon.RdTkt); |
| 932 | 922 | return; |
| 933 | 923 | } |
| 934 | 924 | zUuid = PD("name",""); |
| 935 | 925 | zTitle = mprintf("History Of Ticket %h", zUuid); |
| 936 | - style_submenu_element("Status", "Status", | |
| 937 | - "%s/info/%s", g.zTop, zUuid); | |
| 938 | - style_submenu_element("Check-ins", "Check-ins", | |
| 939 | - "%s/tkttimeline?name=%s&y=ci", g.zTop, zUuid); | |
| 940 | - style_submenu_element("Timeline", "Timeline", | |
| 941 | - "%s/tkttimeline?name=%s", g.zTop, zUuid); | |
| 926 | + style_submenu_element("Status", "%s/info/%s", g.zTop, zUuid); | |
| 927 | + style_submenu_element("Check-ins", "%s/tkttimeline?name=%s&y=ci", | |
| 928 | + g.zTop, zUuid); | |
| 929 | + style_submenu_element("Timeline", "%s/tkttimeline?name=%s", g.zTop, zUuid); | |
| 942 | 930 | if( P("plaintext")!=0 ){ |
| 943 | - style_submenu_element("Formatted", "Formatted", | |
| 944 | - "%R/tkthistory/%s", zUuid); | |
| 931 | + style_submenu_element("Formatted", "%R/tkthistory/%s", zUuid); | |
| 945 | 932 | }else{ |
| 946 | - style_submenu_element("Plaintext", "Plaintext", | |
| 947 | - "%R/tkthistory/%s?plaintext", zUuid); | |
| 933 | + style_submenu_element("Plaintext", "%R/tkthistory/%s?plaintext", zUuid); | |
| 948 | 934 | } |
| 949 | 935 | style_header("%z", zTitle); |
| 950 | 936 | |
| 951 | 937 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid); |
| 952 | 938 | if( tagid==0 ){ |
| @@ -1416,17 +1402,17 @@ | ||
| 1416 | 1402 | /* |
| 1417 | 1403 | ** Add some standard submenu elements for ticket screens. |
| 1418 | 1404 | */ |
| 1419 | 1405 | void ticket_standard_submenu(unsigned int ok){ |
| 1420 | 1406 | if( (ok & T_SRCH)!=0 && search_restrict(SRCH_TKT)!=0 ){ |
| 1421 | - style_submenu_element("Search","Search","%R/tktsrch"); | |
| 1407 | + style_submenu_element("Search", "%R/tktsrch"); | |
| 1422 | 1408 | } |
| 1423 | 1409 | if( (ok & T_REPLIST)!=0 ){ |
| 1424 | - style_submenu_element("Reports","Reports","%R/reportlist"); | |
| 1410 | + style_submenu_element("Reports", "%R/reportlist"); | |
| 1425 | 1411 | } |
| 1426 | 1412 | if( (ok & T_NEW)!=0 && g.anon.NewTkt ){ |
| 1427 | - style_submenu_element("New","New","%R/tktnew"); | |
| 1413 | + style_submenu_element("New", "%R/tktnew"); | |
| 1428 | 1414 | } |
| 1429 | 1415 | } |
| 1430 | 1416 | |
| 1431 | 1417 | /* |
| 1432 | 1418 | ** WEBPAGE: ticket |
| 1433 | 1419 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -456,35 +456,28 @@ | |
| 456 | const char *zUuid = PD("name",""); |
| 457 | |
| 458 | login_check_credentials(); |
| 459 | if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; } |
| 460 | if( g.anon.WrTkt || g.anon.ApndTkt ){ |
| 461 | style_submenu_element("Edit", "Edit The Ticket", "%s/tktedit?name=%T", |
| 462 | g.zTop, PD("name","")); |
| 463 | } |
| 464 | if( g.perm.Hyperlink ){ |
| 465 | style_submenu_element("History", "History Of This Ticket", |
| 466 | "%s/tkthistory/%T", g.zTop, zUuid); |
| 467 | style_submenu_element("Timeline", "Timeline Of This Ticket", |
| 468 | "%s/tkttimeline/%T", g.zTop, zUuid); |
| 469 | style_submenu_element("Check-ins", "Check-ins Of This Ticket", |
| 470 | "%s/tkttimeline/%T?y=ci", g.zTop, zUuid); |
| 471 | } |
| 472 | if( g.anon.NewTkt ){ |
| 473 | style_submenu_element("New Ticket", "Create a new ticket", |
| 474 | "%s/tktnew", g.zTop); |
| 475 | } |
| 476 | if( g.anon.ApndTkt && g.anon.Attach ){ |
| 477 | style_submenu_element("Attach", "Add An Attachment", |
| 478 | "%s/attachadd?tkt=%T&from=%s/tktview/%t", |
| 479 | g.zTop, zUuid, g.zTop, zUuid); |
| 480 | } |
| 481 | if( P("plaintext") ){ |
| 482 | style_submenu_element("Formatted", "Formatted", "%R/tktview/%s", zUuid); |
| 483 | }else{ |
| 484 | style_submenu_element("Plaintext", "Plaintext", |
| 485 | "%R/tktview/%s?plaintext", zUuid); |
| 486 | } |
| 487 | style_header("View Ticket"); |
| 488 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br />\n", -1); |
| 489 | ticket_init(); |
| 490 | initializeVariablesFromCGI(); |
| @@ -856,20 +849,17 @@ | |
| 856 | return; |
| 857 | } |
| 858 | zUuid = PD("name",""); |
| 859 | zType = PD("y","a"); |
| 860 | if( zType[0]!='c' ){ |
| 861 | style_submenu_element("Check-ins", "Check-ins", |
| 862 | "%s/tkttimeline?name=%T&y=ci", g.zTop, zUuid); |
| 863 | }else{ |
| 864 | style_submenu_element("Timeline", "Timeline", |
| 865 | "%s/tkttimeline?name=%T", g.zTop, zUuid); |
| 866 | } |
| 867 | style_submenu_element("History", "History", |
| 868 | "%s/tkthistory/%s", g.zTop, zUuid); |
| 869 | style_submenu_element("Status", "Status", |
| 870 | "%s/info/%s", g.zTop, zUuid); |
| 871 | if( zType[0]=='c' ){ |
| 872 | zTitle = mprintf("Check-ins Associated With Ticket %h", zUuid); |
| 873 | }else{ |
| 874 | zTitle = mprintf("Timeline Of Ticket %h", zUuid); |
| 875 | } |
| @@ -931,22 +921,18 @@ | |
| 931 | login_needed(g.anon.Hyperlink && g.anon.RdTkt); |
| 932 | return; |
| 933 | } |
| 934 | zUuid = PD("name",""); |
| 935 | zTitle = mprintf("History Of Ticket %h", zUuid); |
| 936 | style_submenu_element("Status", "Status", |
| 937 | "%s/info/%s", g.zTop, zUuid); |
| 938 | style_submenu_element("Check-ins", "Check-ins", |
| 939 | "%s/tkttimeline?name=%s&y=ci", g.zTop, zUuid); |
| 940 | style_submenu_element("Timeline", "Timeline", |
| 941 | "%s/tkttimeline?name=%s", g.zTop, zUuid); |
| 942 | if( P("plaintext")!=0 ){ |
| 943 | style_submenu_element("Formatted", "Formatted", |
| 944 | "%R/tkthistory/%s", zUuid); |
| 945 | }else{ |
| 946 | style_submenu_element("Plaintext", "Plaintext", |
| 947 | "%R/tkthistory/%s?plaintext", zUuid); |
| 948 | } |
| 949 | style_header("%z", zTitle); |
| 950 | |
| 951 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid); |
| 952 | if( tagid==0 ){ |
| @@ -1416,17 +1402,17 @@ | |
| 1416 | /* |
| 1417 | ** Add some standard submenu elements for ticket screens. |
| 1418 | */ |
| 1419 | void ticket_standard_submenu(unsigned int ok){ |
| 1420 | if( (ok & T_SRCH)!=0 && search_restrict(SRCH_TKT)!=0 ){ |
| 1421 | style_submenu_element("Search","Search","%R/tktsrch"); |
| 1422 | } |
| 1423 | if( (ok & T_REPLIST)!=0 ){ |
| 1424 | style_submenu_element("Reports","Reports","%R/reportlist"); |
| 1425 | } |
| 1426 | if( (ok & T_NEW)!=0 && g.anon.NewTkt ){ |
| 1427 | style_submenu_element("New","New","%R/tktnew"); |
| 1428 | } |
| 1429 | } |
| 1430 | |
| 1431 | /* |
| 1432 | ** WEBPAGE: ticket |
| 1433 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -456,35 +456,28 @@ | |
| 456 | const char *zUuid = PD("name",""); |
| 457 | |
| 458 | login_check_credentials(); |
| 459 | if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; } |
| 460 | if( g.anon.WrTkt || g.anon.ApndTkt ){ |
| 461 | style_submenu_element("Edit", "%s/tktedit?name=%T", g.zTop, PD("name","")); |
| 462 | } |
| 463 | if( g.perm.Hyperlink ){ |
| 464 | style_submenu_element("History", "%s/tkthistory/%T", g.zTop, zUuid); |
| 465 | style_submenu_element("Timeline", "%s/tkttimeline/%T", g.zTop, zUuid); |
| 466 | style_submenu_element("Check-ins", "%s/tkttimeline/%T?y=ci", g.zTop, zUuid); |
| 467 | } |
| 468 | if( g.anon.NewTkt ){ |
| 469 | style_submenu_element("New Ticket", "%s/tktnew", g.zTop); |
| 470 | } |
| 471 | if( g.anon.ApndTkt && g.anon.Attach ){ |
| 472 | style_submenu_element("Attach", "%s/attachadd?tkt=%T&from=%s/tktview/%t", |
| 473 | g.zTop, zUuid, g.zTop, zUuid); |
| 474 | } |
| 475 | if( P("plaintext") ){ |
| 476 | style_submenu_element("Formatted", "%R/tktview/%s", zUuid); |
| 477 | }else{ |
| 478 | style_submenu_element("Plaintext", "%R/tktview/%s?plaintext", zUuid); |
| 479 | } |
| 480 | style_header("View Ticket"); |
| 481 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br />\n", -1); |
| 482 | ticket_init(); |
| 483 | initializeVariablesFromCGI(); |
| @@ -856,20 +849,17 @@ | |
| 849 | return; |
| 850 | } |
| 851 | zUuid = PD("name",""); |
| 852 | zType = PD("y","a"); |
| 853 | if( zType[0]!='c' ){ |
| 854 | style_submenu_element("Check-ins", "%s/tkttimeline?name=%T&y=ci", |
| 855 | g.zTop, zUuid); |
| 856 | }else{ |
| 857 | style_submenu_element("Timeline", "%s/tkttimeline?name=%T", g.zTop, zUuid); |
| 858 | } |
| 859 | style_submenu_element("History", "%s/tkthistory/%s", g.zTop, zUuid); |
| 860 | style_submenu_element("Status", "%s/info/%s", g.zTop, zUuid); |
| 861 | if( zType[0]=='c' ){ |
| 862 | zTitle = mprintf("Check-ins Associated With Ticket %h", zUuid); |
| 863 | }else{ |
| 864 | zTitle = mprintf("Timeline Of Ticket %h", zUuid); |
| 865 | } |
| @@ -931,22 +921,18 @@ | |
| 921 | login_needed(g.anon.Hyperlink && g.anon.RdTkt); |
| 922 | return; |
| 923 | } |
| 924 | zUuid = PD("name",""); |
| 925 | zTitle = mprintf("History Of Ticket %h", zUuid); |
| 926 | style_submenu_element("Status", "%s/info/%s", g.zTop, zUuid); |
| 927 | style_submenu_element("Check-ins", "%s/tkttimeline?name=%s&y=ci", |
| 928 | g.zTop, zUuid); |
| 929 | style_submenu_element("Timeline", "%s/tkttimeline?name=%s", g.zTop, zUuid); |
| 930 | if( P("plaintext")!=0 ){ |
| 931 | style_submenu_element("Formatted", "%R/tkthistory/%s", zUuid); |
| 932 | }else{ |
| 933 | style_submenu_element("Plaintext", "%R/tkthistory/%s?plaintext", zUuid); |
| 934 | } |
| 935 | style_header("%z", zTitle); |
| 936 | |
| 937 | tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname GLOB 'tkt-%q*'",zUuid); |
| 938 | if( tagid==0 ){ |
| @@ -1416,17 +1402,17 @@ | |
| 1402 | /* |
| 1403 | ** Add some standard submenu elements for ticket screens. |
| 1404 | */ |
| 1405 | void ticket_standard_submenu(unsigned int ok){ |
| 1406 | if( (ok & T_SRCH)!=0 && search_restrict(SRCH_TKT)!=0 ){ |
| 1407 | style_submenu_element("Search", "%R/tktsrch"); |
| 1408 | } |
| 1409 | if( (ok & T_REPLIST)!=0 ){ |
| 1410 | style_submenu_element("Reports", "%R/reportlist"); |
| 1411 | } |
| 1412 | if( (ok & T_NEW)!=0 && g.anon.NewTkt ){ |
| 1413 | style_submenu_element("New", "%R/tktnew"); |
| 1414 | } |
| 1415 | } |
| 1416 | |
| 1417 | /* |
| 1418 | ** WEBPAGE: ticket |
| 1419 |
+5
-7
| --- src/user.c | ||
| +++ src/user.c | ||
| @@ -648,13 +648,12 @@ | ||
| 648 | 648 | }else if( y==2 ){ |
| 649 | 649 | blob_append(&sql, " WHERE NOT success", -1); |
| 650 | 650 | } |
| 651 | 651 | blob_append_sql(&sql," ORDER BY rowid DESC LIMIT %d OFFSET %d", n+1, skip); |
| 652 | 652 | if( skip ){ |
| 653 | - style_submenu_element("Newer", "Newer entries", | |
| 654 | - "%s/access_log?o=%d&n=%d&y=%d", g.zTop, skip>=n ? skip-n : 0, | |
| 655 | - n, y); | |
| 653 | + style_submenu_element("Newer", "%s/access_log?o=%d&n=%d&y=%d", | |
| 654 | + g.zTop, skip>=n ? skip-n : 0, n, y); | |
| 656 | 655 | } |
| 657 | 656 | rc = db_prepare_ignore_error(&q, "%s", blob_sql_text(&sql)); |
| 658 | 657 | fLogEnabled = db_get_boolean("access-log", 0); |
| 659 | 658 | @ <div align="center">Access logging is %s(fLogEnabled?"on":"off"). |
| 660 | 659 | @ (Change this on the <a href="setup_settings">settings</a> page.)</div> |
| @@ -666,12 +665,12 @@ | ||
| 666 | 665 | const char *zIP = db_column_text(&q, 1); |
| 667 | 666 | const char *zDate = db_column_text(&q, 2); |
| 668 | 667 | int bSuccess = db_column_int(&q, 3); |
| 669 | 668 | cnt++; |
| 670 | 669 | if( cnt>n ){ |
| 671 | - style_submenu_element("Older", "Older entries", | |
| 672 | - "%s/access_log?o=%d&n=%d&y=%d", g.zTop, skip+n, n, y); | |
| 670 | + style_submenu_element("Older", "%s/access_log?o=%d&n=%d&y=%d", | |
| 671 | + g.zTop, skip+n, n, y); | |
| 673 | 672 | break; |
| 674 | 673 | } |
| 675 | 674 | if( bSuccess ){ |
| 676 | 675 | @ <tr> |
| 677 | 676 | }else{ |
| @@ -678,12 +677,11 @@ | ||
| 678 | 677 | @ <tr bgcolor="#ffacc0"> |
| 679 | 678 | } |
| 680 | 679 | @ <td>%s(zDate)</td><td>%h(zName)</td><td>%h(zIP)</td></tr> |
| 681 | 680 | } |
| 682 | 681 | if( skip>0 || cnt>n ){ |
| 683 | - style_submenu_element("All", "All entries", | |
| 684 | - "%s/access_log?n=10000000", g.zTop); | |
| 682 | + style_submenu_element("All", "%s/access_log?n=10000000", g.zTop); | |
| 685 | 683 | } |
| 686 | 684 | @ </tbody></table> |
| 687 | 685 | db_finalize(&q); |
| 688 | 686 | @ <hr /> |
| 689 | 687 | @ <form method="post" action="%s(g.zTop)/access_log"> |
| 690 | 688 |
| --- src/user.c | |
| +++ src/user.c | |
| @@ -648,13 +648,12 @@ | |
| 648 | }else if( y==2 ){ |
| 649 | blob_append(&sql, " WHERE NOT success", -1); |
| 650 | } |
| 651 | blob_append_sql(&sql," ORDER BY rowid DESC LIMIT %d OFFSET %d", n+1, skip); |
| 652 | if( skip ){ |
| 653 | style_submenu_element("Newer", "Newer entries", |
| 654 | "%s/access_log?o=%d&n=%d&y=%d", g.zTop, skip>=n ? skip-n : 0, |
| 655 | n, y); |
| 656 | } |
| 657 | rc = db_prepare_ignore_error(&q, "%s", blob_sql_text(&sql)); |
| 658 | fLogEnabled = db_get_boolean("access-log", 0); |
| 659 | @ <div align="center">Access logging is %s(fLogEnabled?"on":"off"). |
| 660 | @ (Change this on the <a href="setup_settings">settings</a> page.)</div> |
| @@ -666,12 +665,12 @@ | |
| 666 | const char *zIP = db_column_text(&q, 1); |
| 667 | const char *zDate = db_column_text(&q, 2); |
| 668 | int bSuccess = db_column_int(&q, 3); |
| 669 | cnt++; |
| 670 | if( cnt>n ){ |
| 671 | style_submenu_element("Older", "Older entries", |
| 672 | "%s/access_log?o=%d&n=%d&y=%d", g.zTop, skip+n, n, y); |
| 673 | break; |
| 674 | } |
| 675 | if( bSuccess ){ |
| 676 | @ <tr> |
| 677 | }else{ |
| @@ -678,12 +677,11 @@ | |
| 678 | @ <tr bgcolor="#ffacc0"> |
| 679 | } |
| 680 | @ <td>%s(zDate)</td><td>%h(zName)</td><td>%h(zIP)</td></tr> |
| 681 | } |
| 682 | if( skip>0 || cnt>n ){ |
| 683 | style_submenu_element("All", "All entries", |
| 684 | "%s/access_log?n=10000000", g.zTop); |
| 685 | } |
| 686 | @ </tbody></table> |
| 687 | db_finalize(&q); |
| 688 | @ <hr /> |
| 689 | @ <form method="post" action="%s(g.zTop)/access_log"> |
| 690 |
| --- src/user.c | |
| +++ src/user.c | |
| @@ -648,13 +648,12 @@ | |
| 648 | }else if( y==2 ){ |
| 649 | blob_append(&sql, " WHERE NOT success", -1); |
| 650 | } |
| 651 | blob_append_sql(&sql," ORDER BY rowid DESC LIMIT %d OFFSET %d", n+1, skip); |
| 652 | if( skip ){ |
| 653 | style_submenu_element("Newer", "%s/access_log?o=%d&n=%d&y=%d", |
| 654 | g.zTop, skip>=n ? skip-n : 0, n, y); |
| 655 | } |
| 656 | rc = db_prepare_ignore_error(&q, "%s", blob_sql_text(&sql)); |
| 657 | fLogEnabled = db_get_boolean("access-log", 0); |
| 658 | @ <div align="center">Access logging is %s(fLogEnabled?"on":"off"). |
| 659 | @ (Change this on the <a href="setup_settings">settings</a> page.)</div> |
| @@ -666,12 +665,12 @@ | |
| 665 | const char *zIP = db_column_text(&q, 1); |
| 666 | const char *zDate = db_column_text(&q, 2); |
| 667 | int bSuccess = db_column_int(&q, 3); |
| 668 | cnt++; |
| 669 | if( cnt>n ){ |
| 670 | style_submenu_element("Older", "%s/access_log?o=%d&n=%d&y=%d", |
| 671 | g.zTop, skip+n, n, y); |
| 672 | break; |
| 673 | } |
| 674 | if( bSuccess ){ |
| 675 | @ <tr> |
| 676 | }else{ |
| @@ -678,12 +677,11 @@ | |
| 677 | @ <tr bgcolor="#ffacc0"> |
| 678 | } |
| 679 | @ <td>%s(zDate)</td><td>%h(zName)</td><td>%h(zIP)</td></tr> |
| 680 | } |
| 681 | if( skip>0 || cnt>n ){ |
| 682 | style_submenu_element("All", "%s/access_log?n=10000000", g.zTop); |
| 683 | } |
| 684 | @ </tbody></table> |
| 685 | db_finalize(&q); |
| 686 | @ <hr /> |
| 687 | @ <form method="post" action="%s(g.zTop)/access_log"> |
| 688 |
+16
-22
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -183,13 +183,13 @@ | ||
| 183 | 183 | void markdown_rules_page(void){ |
| 184 | 184 | Blob x; |
| 185 | 185 | int fTxt = P("txt")!=0; |
| 186 | 186 | style_header("Markdown Formatting Rules"); |
| 187 | 187 | if( fTxt ){ |
| 188 | - style_submenu_element("Formatted", "Formatted", "%R/md_rules"); | |
| 188 | + style_submenu_element("Formatted", "%R/md_rules"); | |
| 189 | 189 | }else{ |
| 190 | - style_submenu_element("Plain-Text", "Plain-Text", "%R/md_rules?txt=1"); | |
| 190 | + style_submenu_element("Plain-Text", "%R/md_rules?txt=1"); | |
| 191 | 191 | } |
| 192 | 192 | blob_init(&x, builtin_text("markdown.md"), -1); |
| 193 | 193 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown"); |
| 194 | 194 | blob_reset(&x); |
| 195 | 195 | style_footer(); |
| @@ -231,26 +231,26 @@ | ||
| 231 | 231 | /* |
| 232 | 232 | ** Add some standard submenu elements for wiki screens. |
| 233 | 233 | */ |
| 234 | 234 | static void wiki_standard_submenu(unsigned int ok){ |
| 235 | 235 | if( (ok & W_SRCH)!=0 && search_restrict(SRCH_WIKI)!=0 ){ |
| 236 | - style_submenu_element("Search","Search","%R/wikisrch"); | |
| 236 | + style_submenu_element("Search", "%R/wikisrch"); | |
| 237 | 237 | } |
| 238 | 238 | if( (ok & W_LIST)!=0 ){ |
| 239 | - style_submenu_element("List","List","%R/wcontent"); | |
| 239 | + style_submenu_element("List", "%R/wcontent"); | |
| 240 | 240 | } |
| 241 | 241 | if( (ok & W_HELP)!=0 ){ |
| 242 | - style_submenu_element("Help","Help","%R/wikihelp"); | |
| 242 | + style_submenu_element("Help", "%R/wikihelp"); | |
| 243 | 243 | } |
| 244 | 244 | if( (ok & W_NEW)!=0 && g.anon.NewWiki ){ |
| 245 | - style_submenu_element("New","New","%R/wikinew"); | |
| 245 | + style_submenu_element("New", "%R/wikinew"); | |
| 246 | 246 | } |
| 247 | 247 | #if 0 |
| 248 | 248 | if( (ok & W_BLOG)!=0 |
| 249 | 249 | #endif |
| 250 | 250 | if( (ok & W_SANDBOX)!=0 ){ |
| 251 | - style_submenu_element("Sandbox", "Sandbox", "%R/wiki?name=Sandbox"); | |
| 251 | + style_submenu_element("Sandbox", "%R/wiki?name=Sandbox"); | |
| 252 | 252 | } |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | /* |
| 256 | 256 | ** WEBPAGE: wikihelp |
| @@ -366,39 +366,33 @@ | ||
| 366 | 366 | } |
| 367 | 367 | } |
| 368 | 368 | zMimetype = wiki_filter_mimetypes(zMimetype); |
| 369 | 369 | if( !g.isHome ){ |
| 370 | 370 | if( rid ){ |
| 371 | - style_submenu_element("Diff", "Last change", | |
| 372 | - "%R/wdiff?name=%T&a=%d", zPageName, rid); | |
| 371 | + style_submenu_element("Diff", "%R/wdiff?name=%T&a=%d", zPageName, rid); | |
| 373 | 372 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 374 | - style_submenu_element("Details", "Details", | |
| 375 | - "%R/info/%s", zUuid); | |
| 373 | + style_submenu_element("Details", "%R/info/%s", zUuid); | |
| 376 | 374 | } |
| 377 | 375 | if( (rid && g.anon.WrWiki) || (!rid && g.anon.NewWiki) ){ |
| 378 | 376 | if( db_get_boolean("wysiwyg-wiki", 0) ){ |
| 379 | - style_submenu_element("Edit", "Edit Wiki Page", | |
| 380 | - "%s/wikiedit?name=%T&wysiwyg=1", | |
| 377 | + style_submenu_element("Edit", "%s/wikiedit?name=%T&wysiwyg=1", | |
| 381 | 378 | g.zTop, zPageName); |
| 382 | 379 | }else{ |
| 383 | - style_submenu_element("Edit", "Edit Wiki Page", | |
| 384 | - "%s/wikiedit?name=%T", | |
| 385 | - g.zTop, zPageName); | |
| 380 | + style_submenu_element("Edit", "%s/wikiedit?name=%T", g.zTop, zPageName); | |
| 386 | 381 | } |
| 387 | 382 | } |
| 388 | 383 | if( rid && g.anon.ApndWiki && g.anon.Attach ){ |
| 389 | - style_submenu_element("Attach", "Add An Attachment", | |
| 384 | + style_submenu_element("Attach", | |
| 390 | 385 | "%s/attachadd?page=%T&from=%s/wiki%%3fname=%T", |
| 391 | 386 | g.zTop, zPageName, g.zTop, zPageName); |
| 392 | 387 | } |
| 393 | 388 | if( rid && g.anon.ApndWiki ){ |
| 394 | - style_submenu_element("Append", "Add A Comment", | |
| 395 | - "%s/wikiappend?name=%T&mimetype=%s", | |
| 389 | + style_submenu_element("Append", "%s/wikiappend?name=%T&mimetype=%s", | |
| 396 | 390 | g.zTop, zPageName, zMimetype); |
| 397 | 391 | } |
| 398 | 392 | if( g.perm.Hyperlink ){ |
| 399 | - style_submenu_element("History", "History", "%s/whistory?name=%T", | |
| 393 | + style_submenu_element("History", "%s/whistory?name=%T", | |
| 400 | 394 | g.zTop, zPageName); |
| 401 | 395 | } |
| 402 | 396 | } |
| 403 | 397 | style_set_current_page("%T?name=%T", g.zPath, zPageName); |
| 404 | 398 | style_header("%s", zPageName); |
| @@ -951,13 +945,13 @@ | ||
| 951 | 945 | |
| 952 | 946 | login_check_credentials(); |
| 953 | 947 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 954 | 948 | style_header("Available Wiki Pages"); |
| 955 | 949 | if( showAll ){ |
| 956 | - style_submenu_element("Active", "Only Active Pages", "%s/wcontent", g.zTop); | |
| 950 | + style_submenu_element("Active", "%s/wcontent", g.zTop); | |
| 957 | 951 | }else{ |
| 958 | - style_submenu_element("All", "All", "%s/wcontent?all=1", g.zTop); | |
| 952 | + style_submenu_element("All", "%s/wcontent?all=1", g.zTop); | |
| 959 | 953 | } |
| 960 | 954 | wiki_standard_submenu(W_ALL_BUT(W_LIST)); |
| 961 | 955 | @ <ul> |
| 962 | 956 | wiki_prepare_page_list(&q); |
| 963 | 957 | while( db_step(&q)==SQLITE_ROW ){ |
| 964 | 958 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -183,13 +183,13 @@ | |
| 183 | void markdown_rules_page(void){ |
| 184 | Blob x; |
| 185 | int fTxt = P("txt")!=0; |
| 186 | style_header("Markdown Formatting Rules"); |
| 187 | if( fTxt ){ |
| 188 | style_submenu_element("Formatted", "Formatted", "%R/md_rules"); |
| 189 | }else{ |
| 190 | style_submenu_element("Plain-Text", "Plain-Text", "%R/md_rules?txt=1"); |
| 191 | } |
| 192 | blob_init(&x, builtin_text("markdown.md"), -1); |
| 193 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown"); |
| 194 | blob_reset(&x); |
| 195 | style_footer(); |
| @@ -231,26 +231,26 @@ | |
| 231 | /* |
| 232 | ** Add some standard submenu elements for wiki screens. |
| 233 | */ |
| 234 | static void wiki_standard_submenu(unsigned int ok){ |
| 235 | if( (ok & W_SRCH)!=0 && search_restrict(SRCH_WIKI)!=0 ){ |
| 236 | style_submenu_element("Search","Search","%R/wikisrch"); |
| 237 | } |
| 238 | if( (ok & W_LIST)!=0 ){ |
| 239 | style_submenu_element("List","List","%R/wcontent"); |
| 240 | } |
| 241 | if( (ok & W_HELP)!=0 ){ |
| 242 | style_submenu_element("Help","Help","%R/wikihelp"); |
| 243 | } |
| 244 | if( (ok & W_NEW)!=0 && g.anon.NewWiki ){ |
| 245 | style_submenu_element("New","New","%R/wikinew"); |
| 246 | } |
| 247 | #if 0 |
| 248 | if( (ok & W_BLOG)!=0 |
| 249 | #endif |
| 250 | if( (ok & W_SANDBOX)!=0 ){ |
| 251 | style_submenu_element("Sandbox", "Sandbox", "%R/wiki?name=Sandbox"); |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | /* |
| 256 | ** WEBPAGE: wikihelp |
| @@ -366,39 +366,33 @@ | |
| 366 | } |
| 367 | } |
| 368 | zMimetype = wiki_filter_mimetypes(zMimetype); |
| 369 | if( !g.isHome ){ |
| 370 | if( rid ){ |
| 371 | style_submenu_element("Diff", "Last change", |
| 372 | "%R/wdiff?name=%T&a=%d", zPageName, rid); |
| 373 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 374 | style_submenu_element("Details", "Details", |
| 375 | "%R/info/%s", zUuid); |
| 376 | } |
| 377 | if( (rid && g.anon.WrWiki) || (!rid && g.anon.NewWiki) ){ |
| 378 | if( db_get_boolean("wysiwyg-wiki", 0) ){ |
| 379 | style_submenu_element("Edit", "Edit Wiki Page", |
| 380 | "%s/wikiedit?name=%T&wysiwyg=1", |
| 381 | g.zTop, zPageName); |
| 382 | }else{ |
| 383 | style_submenu_element("Edit", "Edit Wiki Page", |
| 384 | "%s/wikiedit?name=%T", |
| 385 | g.zTop, zPageName); |
| 386 | } |
| 387 | } |
| 388 | if( rid && g.anon.ApndWiki && g.anon.Attach ){ |
| 389 | style_submenu_element("Attach", "Add An Attachment", |
| 390 | "%s/attachadd?page=%T&from=%s/wiki%%3fname=%T", |
| 391 | g.zTop, zPageName, g.zTop, zPageName); |
| 392 | } |
| 393 | if( rid && g.anon.ApndWiki ){ |
| 394 | style_submenu_element("Append", "Add A Comment", |
| 395 | "%s/wikiappend?name=%T&mimetype=%s", |
| 396 | g.zTop, zPageName, zMimetype); |
| 397 | } |
| 398 | if( g.perm.Hyperlink ){ |
| 399 | style_submenu_element("History", "History", "%s/whistory?name=%T", |
| 400 | g.zTop, zPageName); |
| 401 | } |
| 402 | } |
| 403 | style_set_current_page("%T?name=%T", g.zPath, zPageName); |
| 404 | style_header("%s", zPageName); |
| @@ -951,13 +945,13 @@ | |
| 951 | |
| 952 | login_check_credentials(); |
| 953 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 954 | style_header("Available Wiki Pages"); |
| 955 | if( showAll ){ |
| 956 | style_submenu_element("Active", "Only Active Pages", "%s/wcontent", g.zTop); |
| 957 | }else{ |
| 958 | style_submenu_element("All", "All", "%s/wcontent?all=1", g.zTop); |
| 959 | } |
| 960 | wiki_standard_submenu(W_ALL_BUT(W_LIST)); |
| 961 | @ <ul> |
| 962 | wiki_prepare_page_list(&q); |
| 963 | while( db_step(&q)==SQLITE_ROW ){ |
| 964 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -183,13 +183,13 @@ | |
| 183 | void markdown_rules_page(void){ |
| 184 | Blob x; |
| 185 | int fTxt = P("txt")!=0; |
| 186 | style_header("Markdown Formatting Rules"); |
| 187 | if( fTxt ){ |
| 188 | style_submenu_element("Formatted", "%R/md_rules"); |
| 189 | }else{ |
| 190 | style_submenu_element("Plain-Text", "%R/md_rules?txt=1"); |
| 191 | } |
| 192 | blob_init(&x, builtin_text("markdown.md"), -1); |
| 193 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown"); |
| 194 | blob_reset(&x); |
| 195 | style_footer(); |
| @@ -231,26 +231,26 @@ | |
| 231 | /* |
| 232 | ** Add some standard submenu elements for wiki screens. |
| 233 | */ |
| 234 | static void wiki_standard_submenu(unsigned int ok){ |
| 235 | if( (ok & W_SRCH)!=0 && search_restrict(SRCH_WIKI)!=0 ){ |
| 236 | style_submenu_element("Search", "%R/wikisrch"); |
| 237 | } |
| 238 | if( (ok & W_LIST)!=0 ){ |
| 239 | style_submenu_element("List", "%R/wcontent"); |
| 240 | } |
| 241 | if( (ok & W_HELP)!=0 ){ |
| 242 | style_submenu_element("Help", "%R/wikihelp"); |
| 243 | } |
| 244 | if( (ok & W_NEW)!=0 && g.anon.NewWiki ){ |
| 245 | style_submenu_element("New", "%R/wikinew"); |
| 246 | } |
| 247 | #if 0 |
| 248 | if( (ok & W_BLOG)!=0 |
| 249 | #endif |
| 250 | if( (ok & W_SANDBOX)!=0 ){ |
| 251 | style_submenu_element("Sandbox", "%R/wiki?name=Sandbox"); |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | /* |
| 256 | ** WEBPAGE: wikihelp |
| @@ -366,39 +366,33 @@ | |
| 366 | } |
| 367 | } |
| 368 | zMimetype = wiki_filter_mimetypes(zMimetype); |
| 369 | if( !g.isHome ){ |
| 370 | if( rid ){ |
| 371 | style_submenu_element("Diff", "%R/wdiff?name=%T&a=%d", zPageName, rid); |
| 372 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 373 | style_submenu_element("Details", "%R/info/%s", zUuid); |
| 374 | } |
| 375 | if( (rid && g.anon.WrWiki) || (!rid && g.anon.NewWiki) ){ |
| 376 | if( db_get_boolean("wysiwyg-wiki", 0) ){ |
| 377 | style_submenu_element("Edit", "%s/wikiedit?name=%T&wysiwyg=1", |
| 378 | g.zTop, zPageName); |
| 379 | }else{ |
| 380 | style_submenu_element("Edit", "%s/wikiedit?name=%T", g.zTop, zPageName); |
| 381 | } |
| 382 | } |
| 383 | if( rid && g.anon.ApndWiki && g.anon.Attach ){ |
| 384 | style_submenu_element("Attach", |
| 385 | "%s/attachadd?page=%T&from=%s/wiki%%3fname=%T", |
| 386 | g.zTop, zPageName, g.zTop, zPageName); |
| 387 | } |
| 388 | if( rid && g.anon.ApndWiki ){ |
| 389 | style_submenu_element("Append", "%s/wikiappend?name=%T&mimetype=%s", |
| 390 | g.zTop, zPageName, zMimetype); |
| 391 | } |
| 392 | if( g.perm.Hyperlink ){ |
| 393 | style_submenu_element("History", "%s/whistory?name=%T", |
| 394 | g.zTop, zPageName); |
| 395 | } |
| 396 | } |
| 397 | style_set_current_page("%T?name=%T", g.zPath, zPageName); |
| 398 | style_header("%s", zPageName); |
| @@ -951,13 +945,13 @@ | |
| 945 | |
| 946 | login_check_credentials(); |
| 947 | if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } |
| 948 | style_header("Available Wiki Pages"); |
| 949 | if( showAll ){ |
| 950 | style_submenu_element("Active", "%s/wcontent", g.zTop); |
| 951 | }else{ |
| 952 | style_submenu_element("All", "%s/wcontent?all=1", g.zTop); |
| 953 | } |
| 954 | wiki_standard_submenu(W_ALL_BUT(W_LIST)); |
| 955 | @ <ul> |
| 956 | wiki_prepare_page_list(&q); |
| 957 | while( db_step(&q)==SQLITE_ROW ){ |
| 958 |
+1
-1
| --- src/wikiformat.c | ||
| +++ src/wikiformat.c | ||
| @@ -947,11 +947,11 @@ | ||
| 947 | 947 | for(j=*pN; fossil_isspace(z[j]); j++){} |
| 948 | 948 | zTag = mprintf("%.*s", i-j, &z[j]); |
| 949 | 949 | j = (int)strlen(zTag); |
| 950 | 950 | while( j>0 && fossil_isspace(zTag[j-1]) ){ j--; } |
| 951 | 951 | if( j==0 ) return 0; |
| 952 | - style_submenu_element(zTag, zTag, "%s", zHref); | |
| 952 | + style_submenu_element(zTag, "%s", zHref); | |
| 953 | 953 | *pN = i+4; |
| 954 | 954 | return 1; |
| 955 | 955 | } |
| 956 | 956 | |
| 957 | 957 | /* |
| 958 | 958 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -947,11 +947,11 @@ | |
| 947 | for(j=*pN; fossil_isspace(z[j]); j++){} |
| 948 | zTag = mprintf("%.*s", i-j, &z[j]); |
| 949 | j = (int)strlen(zTag); |
| 950 | while( j>0 && fossil_isspace(zTag[j-1]) ){ j--; } |
| 951 | if( j==0 ) return 0; |
| 952 | style_submenu_element(zTag, zTag, "%s", zHref); |
| 953 | *pN = i+4; |
| 954 | return 1; |
| 955 | } |
| 956 | |
| 957 | /* |
| 958 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -947,11 +947,11 @@ | |
| 947 | for(j=*pN; fossil_isspace(z[j]); j++){} |
| 948 | zTag = mprintf("%.*s", i-j, &z[j]); |
| 949 | j = (int)strlen(zTag); |
| 950 | while( j>0 && fossil_isspace(zTag[j-1]) ){ j--; } |
| 951 | if( j==0 ) return 0; |
| 952 | style_submenu_element(zTag, "%s", zHref); |
| 953 | *pN = i+4; |
| 954 | return 1; |
| 955 | } |
| 956 | |
| 957 | /* |
| 958 |