Fossil SCM
Avoid unnecessary query parameters in hyperlinks generated by /timeline.
Commit
53d3a755c1c6de22bdc908fa051e0c125e9ec2175ec9ae0649fcab6a5d0b813b
Parent
96cd802a7659caf…
1 file changed
+7
-4
+7
-4
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1745,10 +1745,13 @@ | ||
| 1745 | 1745 | int advancedMenu = 0; /* Use the advanced menu design */ |
| 1746 | 1746 | char *zPlural; /* Ending for plural forms */ |
| 1747 | 1747 | int showCherrypicks = 1; /* True to show cherrypick merges */ |
| 1748 | 1748 | int haveParameterN; /* True if n= query parameter present */ |
| 1749 | 1749 | |
| 1750 | + url_initialize(&url, "timeline"); | |
| 1751 | + cgi_query_parameters_to_url(&url); | |
| 1752 | + | |
| 1750 | 1753 | /* Set number of rows to display */ |
| 1751 | 1754 | haveParameterN = P("n")!=0; |
| 1752 | 1755 | cookie_read_parameter("n","n"); |
| 1753 | 1756 | z = P("n"); |
| 1754 | 1757 | if( z==0 ) z = db_get("timeline-default-length",0); |
| @@ -1808,12 +1811,10 @@ | ||
| 1808 | 1811 | } |
| 1809 | 1812 | if( zType[0]=='a' || zType[0]=='c' ){ |
| 1810 | 1813 | cookie_write_parameter("y","y",zType); |
| 1811 | 1814 | } |
| 1812 | 1815 | cookie_render(); |
| 1813 | - url_initialize(&url, "timeline"); | |
| 1814 | - cgi_query_parameters_to_url(&url); | |
| 1815 | 1816 | |
| 1816 | 1817 | /* Convert the cf=FILEHASH query parameter into a c=CHECKINHASH value */ |
| 1817 | 1818 | if( P("cf")!=0 ){ |
| 1818 | 1819 | zCirca = db_text(0, |
| 1819 | 1820 | "SELECT (SELECT uuid FROM blob WHERE rid=mlink.mid)" |
| @@ -2713,17 +2714,19 @@ | ||
| 2713 | 2714 | if( zError ){ |
| 2714 | 2715 | @ <p class="generalError">%h(zError)</p> |
| 2715 | 2716 | } |
| 2716 | 2717 | |
| 2717 | 2718 | if( zNewerButton ){ |
| 2718 | - @ %z(chref("button","%z",zNewerButton))%h(zNewerButtonLabel) ↑</a> | |
| 2719 | + @ %z(chref("button","%s",zNewerButton))%h(zNewerButtonLabel)\ | |
| 2720 | + @ ↑</a> | |
| 2719 | 2721 | } |
| 2720 | 2722 | www_print_timeline(&q, tmFlags, zThisUser, zThisTag, zBrName, |
| 2721 | 2723 | selectedRid, secondaryRid, 0); |
| 2722 | 2724 | db_finalize(&q); |
| 2723 | 2725 | if( zOlderButton ){ |
| 2724 | - @ %z(chref("button","%z",zOlderButton))%h(zOlderButtonLabel) ↓</a> | |
| 2726 | + @ %z(chref("button","%s",zOlderButton))%h(zOlderButtonLabel)\ | |
| 2727 | + @ ↓</a> | |
| 2725 | 2728 | } |
| 2726 | 2729 | document_emit_js(/*handles pikchrs rendered above*/); |
| 2727 | 2730 | style_finish_page("timeline"); |
| 2728 | 2731 | } |
| 2729 | 2732 | |
| 2730 | 2733 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1745,10 +1745,13 @@ | |
| 1745 | int advancedMenu = 0; /* Use the advanced menu design */ |
| 1746 | char *zPlural; /* Ending for plural forms */ |
| 1747 | int showCherrypicks = 1; /* True to show cherrypick merges */ |
| 1748 | int haveParameterN; /* True if n= query parameter present */ |
| 1749 | |
| 1750 | /* Set number of rows to display */ |
| 1751 | haveParameterN = P("n")!=0; |
| 1752 | cookie_read_parameter("n","n"); |
| 1753 | z = P("n"); |
| 1754 | if( z==0 ) z = db_get("timeline-default-length",0); |
| @@ -1808,12 +1811,10 @@ | |
| 1808 | } |
| 1809 | if( zType[0]=='a' || zType[0]=='c' ){ |
| 1810 | cookie_write_parameter("y","y",zType); |
| 1811 | } |
| 1812 | cookie_render(); |
| 1813 | url_initialize(&url, "timeline"); |
| 1814 | cgi_query_parameters_to_url(&url); |
| 1815 | |
| 1816 | /* Convert the cf=FILEHASH query parameter into a c=CHECKINHASH value */ |
| 1817 | if( P("cf")!=0 ){ |
| 1818 | zCirca = db_text(0, |
| 1819 | "SELECT (SELECT uuid FROM blob WHERE rid=mlink.mid)" |
| @@ -2713,17 +2714,19 @@ | |
| 2713 | if( zError ){ |
| 2714 | @ <p class="generalError">%h(zError)</p> |
| 2715 | } |
| 2716 | |
| 2717 | if( zNewerButton ){ |
| 2718 | @ %z(chref("button","%z",zNewerButton))%h(zNewerButtonLabel) ↑</a> |
| 2719 | } |
| 2720 | www_print_timeline(&q, tmFlags, zThisUser, zThisTag, zBrName, |
| 2721 | selectedRid, secondaryRid, 0); |
| 2722 | db_finalize(&q); |
| 2723 | if( zOlderButton ){ |
| 2724 | @ %z(chref("button","%z",zOlderButton))%h(zOlderButtonLabel) ↓</a> |
| 2725 | } |
| 2726 | document_emit_js(/*handles pikchrs rendered above*/); |
| 2727 | style_finish_page("timeline"); |
| 2728 | } |
| 2729 | |
| 2730 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1745,10 +1745,13 @@ | |
| 1745 | int advancedMenu = 0; /* Use the advanced menu design */ |
| 1746 | char *zPlural; /* Ending for plural forms */ |
| 1747 | int showCherrypicks = 1; /* True to show cherrypick merges */ |
| 1748 | int haveParameterN; /* True if n= query parameter present */ |
| 1749 | |
| 1750 | url_initialize(&url, "timeline"); |
| 1751 | cgi_query_parameters_to_url(&url); |
| 1752 | |
| 1753 | /* Set number of rows to display */ |
| 1754 | haveParameterN = P("n")!=0; |
| 1755 | cookie_read_parameter("n","n"); |
| 1756 | z = P("n"); |
| 1757 | if( z==0 ) z = db_get("timeline-default-length",0); |
| @@ -1808,12 +1811,10 @@ | |
| 1811 | } |
| 1812 | if( zType[0]=='a' || zType[0]=='c' ){ |
| 1813 | cookie_write_parameter("y","y",zType); |
| 1814 | } |
| 1815 | cookie_render(); |
| 1816 | |
| 1817 | /* Convert the cf=FILEHASH query parameter into a c=CHECKINHASH value */ |
| 1818 | if( P("cf")!=0 ){ |
| 1819 | zCirca = db_text(0, |
| 1820 | "SELECT (SELECT uuid FROM blob WHERE rid=mlink.mid)" |
| @@ -2713,17 +2714,19 @@ | |
| 2714 | if( zError ){ |
| 2715 | @ <p class="generalError">%h(zError)</p> |
| 2716 | } |
| 2717 | |
| 2718 | if( zNewerButton ){ |
| 2719 | @ %z(chref("button","%s",zNewerButton))%h(zNewerButtonLabel)\ |
| 2720 | @ ↑</a> |
| 2721 | } |
| 2722 | www_print_timeline(&q, tmFlags, zThisUser, zThisTag, zBrName, |
| 2723 | selectedRid, secondaryRid, 0); |
| 2724 | db_finalize(&q); |
| 2725 | if( zOlderButton ){ |
| 2726 | @ %z(chref("button","%s",zOlderButton))%h(zOlderButtonLabel)\ |
| 2727 | @ ↓</a> |
| 2728 | } |
| 2729 | document_emit_js(/*handles pikchrs rendered above*/); |
| 2730 | style_finish_page("timeline"); |
| 2731 | } |
| 2732 | |
| 2733 |