Fossil SCM
Treat the new query parameters as boolean flags.
Commit
8e5ea60baa6550ae8d4cfaeef1affe98b93684262cac643064a5c6b59e178a36
Parent
eb882e277fd4eb3…
3 files changed
+4
-4
+7
-7
+4
-4
+4
-4
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -639,22 +639,22 @@ | ||
| 639 | 639 | @ <h2>The initial check-in for each branch:</h2> |
| 640 | 640 | blob_append(&sql, timeline_query_for_www(), -1); |
| 641 | 641 | blob_append_sql(&sql, |
| 642 | 642 | "AND blob.rid IN (SELECT rid FROM tagxref" |
| 643 | 643 | " WHERE tagtype>0 AND tagid=%d AND srcid!=0)", TAG_BRANCH); |
| 644 | - if( P("hide") ){ | |
| 644 | + if( PB("hide") ){ | |
| 645 | 645 | blob_append_sql(&sql, |
| 646 | 646 | " AND NOT EXISTS(SELECT 1 FROM tagxref" |
| 647 | 647 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", TAG_HIDDEN); |
| 648 | 648 | } |
| 649 | 649 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 650 | 650 | blob_reset(&sql); |
| 651 | 651 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 652 | 652 | ** many descenders to (off-screen) parents. */ |
| 653 | 653 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 654 | - if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH; | |
| 655 | - if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; | |
| 656 | - if( P("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; | |
| 654 | + if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH; | |
| 655 | + if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; | |
| 656 | + if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; | |
| 657 | 657 | www_print_timeline(&q, tmFlags, 0, 0, 0, brtimeline_extra); |
| 658 | 658 | db_finalize(&q); |
| 659 | 659 | style_footer(); |
| 660 | 660 | } |
| 661 | 661 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -639,22 +639,22 @@ | |
| 639 | @ <h2>The initial check-in for each branch:</h2> |
| 640 | blob_append(&sql, timeline_query_for_www(), -1); |
| 641 | blob_append_sql(&sql, |
| 642 | "AND blob.rid IN (SELECT rid FROM tagxref" |
| 643 | " WHERE tagtype>0 AND tagid=%d AND srcid!=0)", TAG_BRANCH); |
| 644 | if( P("hide") ){ |
| 645 | blob_append_sql(&sql, |
| 646 | " AND NOT EXISTS(SELECT 1 FROM tagxref" |
| 647 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", TAG_HIDDEN); |
| 648 | } |
| 649 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 650 | blob_reset(&sql); |
| 651 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 652 | ** many descenders to (off-screen) parents. */ |
| 653 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 654 | if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 655 | if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 656 | if( P("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; |
| 657 | www_print_timeline(&q, tmFlags, 0, 0, 0, brtimeline_extra); |
| 658 | db_finalize(&q); |
| 659 | style_footer(); |
| 660 | } |
| 661 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -639,22 +639,22 @@ | |
| 639 | @ <h2>The initial check-in for each branch:</h2> |
| 640 | blob_append(&sql, timeline_query_for_www(), -1); |
| 641 | blob_append_sql(&sql, |
| 642 | "AND blob.rid IN (SELECT rid FROM tagxref" |
| 643 | " WHERE tagtype>0 AND tagid=%d AND srcid!=0)", TAG_BRANCH); |
| 644 | if( PB("hide") ){ |
| 645 | blob_append_sql(&sql, |
| 646 | " AND NOT EXISTS(SELECT 1 FROM tagxref" |
| 647 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", TAG_HIDDEN); |
| 648 | } |
| 649 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 650 | blob_reset(&sql); |
| 651 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 652 | ** many descenders to (off-screen) parents. */ |
| 653 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 654 | if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 655 | if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 656 | if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; |
| 657 | www_print_timeline(&q, tmFlags, 0, 0, 0, brtimeline_extra); |
| 658 | db_finalize(&q); |
| 659 | style_footer(); |
| 660 | } |
| 661 |
+7
-7
| --- src/descendants.c | ||
| +++ src/descendants.c | ||
| @@ -464,17 +464,17 @@ | ||
| 464 | 464 | void leaves_page(void){ |
| 465 | 465 | Blob sql; |
| 466 | 466 | Stmt q; |
| 467 | 467 | int showAll = P("all")!=0; |
| 468 | 468 | int showClosed = P("closed")!=0; |
| 469 | - int fNg = P("ng")!=0; /* Flag for the "ng" query parameter */ | |
| 470 | - int fHide = P("hide")!=0; /* Flag for the "hide" query parameter */ | |
| 471 | - int fBrBg = P("brbg")!=0; /* Flag for the "brbg" query parameter */ | |
| 472 | - int fUBg = P("ubg")!=0; /* Flag for the "ubg" query parameter */ | |
| 473 | - Blob QueryParams = empty_blob; /* Concatenated query parameters */ | |
| 474 | - char *zParamSep = 0; /* Query parameter separator */ | |
| 475 | - int tmFlags; /* Timeline display flags */ | |
| 469 | + int fNg = PB("ng")!=0; /* Flag for the "ng" query parameter */ | |
| 470 | + int fHide = PB("hide")!=0; /* Flag for the "hide" query parameter */ | |
| 471 | + int fBrBg = PB("brbg")!=0; /* Flag for the "brbg" query parameter */ | |
| 472 | + int fUBg = PB("ubg")!=0; /* Flag for the "ubg" query parameter */ | |
| 473 | + Blob QueryParams = empty_blob; /* Concatenated query parameters */ | |
| 474 | + char *zParamSep = 0; /* Query parameter separator */ | |
| 475 | + int tmFlags; /* Timeline display flags */ | |
| 476 | 476 | |
| 477 | 477 | login_check_credentials(); |
| 478 | 478 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 479 | 479 | if( fNg ){ |
| 480 | 480 | blob_appendf(&QueryParams, "%s%s", zParamSep, "ng"); |
| 481 | 481 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -464,17 +464,17 @@ | |
| 464 | void leaves_page(void){ |
| 465 | Blob sql; |
| 466 | Stmt q; |
| 467 | int showAll = P("all")!=0; |
| 468 | int showClosed = P("closed")!=0; |
| 469 | int fNg = P("ng")!=0; /* Flag for the "ng" query parameter */ |
| 470 | int fHide = P("hide")!=0; /* Flag for the "hide" query parameter */ |
| 471 | int fBrBg = P("brbg")!=0; /* Flag for the "brbg" query parameter */ |
| 472 | int fUBg = P("ubg")!=0; /* Flag for the "ubg" query parameter */ |
| 473 | Blob QueryParams = empty_blob; /* Concatenated query parameters */ |
| 474 | char *zParamSep = 0; /* Query parameter separator */ |
| 475 | int tmFlags; /* Timeline display flags */ |
| 476 | |
| 477 | login_check_credentials(); |
| 478 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 479 | if( fNg ){ |
| 480 | blob_appendf(&QueryParams, "%s%s", zParamSep, "ng"); |
| 481 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -464,17 +464,17 @@ | |
| 464 | void leaves_page(void){ |
| 465 | Blob sql; |
| 466 | Stmt q; |
| 467 | int showAll = P("all")!=0; |
| 468 | int showClosed = P("closed")!=0; |
| 469 | int fNg = PB("ng")!=0; /* Flag for the "ng" query parameter */ |
| 470 | int fHide = PB("hide")!=0; /* Flag for the "hide" query parameter */ |
| 471 | int fBrBg = PB("brbg")!=0; /* Flag for the "brbg" query parameter */ |
| 472 | int fUBg = PB("ubg")!=0; /* Flag for the "ubg" query parameter */ |
| 473 | Blob QueryParams = empty_blob; /* Concatenated query parameters */ |
| 474 | char *zParamSep = 0; /* Query parameter separator */ |
| 475 | int tmFlags; /* Timeline display flags */ |
| 476 | |
| 477 | login_check_credentials(); |
| 478 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 479 | if( fNg ){ |
| 480 | blob_appendf(&QueryParams, "%s%s", zParamSep, "ng"); |
| 481 |
+4
-4
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -713,23 +713,23 @@ | ||
| 713 | 713 | blob_append_sql(&sql, |
| 714 | 714 | "AND blob.rid IN (SELECT rid FROM tagxref" |
| 715 | 715 | " WHERE tagtype=1 AND srcid>0" |
| 716 | 716 | " AND tagid IN (SELECT tagid FROM tag " |
| 717 | 717 | " WHERE tagname GLOB 'sym-*'))"); |
| 718 | - if( P("hide") ){ | |
| 718 | + if( PB("hide") ){ | |
| 719 | 719 | blob_append_sql(&sql, |
| 720 | 720 | " AND NOT EXISTS(SELECT 1 FROM tagxref" |
| 721 | 721 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", TAG_HIDDEN); |
| 722 | 722 | } |
| 723 | 723 | db_prepare(&q, "%s ORDER BY event.mtime DESC /*sort*/", blob_sql_text(&sql)); |
| 724 | 724 | blob_reset(&sql); |
| 725 | 725 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 726 | 726 | ** many descenders to (off-screen) parents. */ |
| 727 | 727 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 728 | - if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH; | |
| 729 | - if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; | |
| 730 | - if( P("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; | |
| 728 | + if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH; | |
| 729 | + if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; | |
| 730 | + if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; | |
| 731 | 731 | www_print_timeline(&q, tmFlags, 0, 0, 0, 0); |
| 732 | 732 | db_finalize(&q); |
| 733 | 733 | @ <br /> |
| 734 | 734 | style_footer(); |
| 735 | 735 | } |
| 736 | 736 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -713,23 +713,23 @@ | |
| 713 | blob_append_sql(&sql, |
| 714 | "AND blob.rid IN (SELECT rid FROM tagxref" |
| 715 | " WHERE tagtype=1 AND srcid>0" |
| 716 | " AND tagid IN (SELECT tagid FROM tag " |
| 717 | " WHERE tagname GLOB 'sym-*'))"); |
| 718 | if( P("hide") ){ |
| 719 | blob_append_sql(&sql, |
| 720 | " AND NOT EXISTS(SELECT 1 FROM tagxref" |
| 721 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", TAG_HIDDEN); |
| 722 | } |
| 723 | db_prepare(&q, "%s ORDER BY event.mtime DESC /*sort*/", blob_sql_text(&sql)); |
| 724 | blob_reset(&sql); |
| 725 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 726 | ** many descenders to (off-screen) parents. */ |
| 727 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 728 | if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 729 | if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 730 | if( P("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; |
| 731 | www_print_timeline(&q, tmFlags, 0, 0, 0, 0); |
| 732 | db_finalize(&q); |
| 733 | @ <br /> |
| 734 | style_footer(); |
| 735 | } |
| 736 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -713,23 +713,23 @@ | |
| 713 | blob_append_sql(&sql, |
| 714 | "AND blob.rid IN (SELECT rid FROM tagxref" |
| 715 | " WHERE tagtype=1 AND srcid>0" |
| 716 | " AND tagid IN (SELECT tagid FROM tag " |
| 717 | " WHERE tagname GLOB 'sym-*'))"); |
| 718 | if( PB("hide") ){ |
| 719 | blob_append_sql(&sql, |
| 720 | " AND NOT EXISTS(SELECT 1 FROM tagxref" |
| 721 | " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", TAG_HIDDEN); |
| 722 | } |
| 723 | db_prepare(&q, "%s ORDER BY event.mtime DESC /*sort*/", blob_sql_text(&sql)); |
| 724 | blob_reset(&sql); |
| 725 | /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too |
| 726 | ** many descenders to (off-screen) parents. */ |
| 727 | tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL; |
| 728 | if( PB("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 729 | if( PB("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 730 | if( PB("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; |
| 731 | www_print_timeline(&q, tmFlags, 0, 0, 0, 0); |
| 732 | db_finalize(&q); |
| 733 | @ <br /> |
| 734 | style_footer(); |
| 735 | } |
| 736 |