Fossil SCM
Rework [98cc8782e1] to more thoroughly ignore empty match tags and patterns so that the "Related" submenu item does not appear due to an empty tag filter text entry adding "t=" to the query string
Commit
3bcdc0779382af51e9c8e3be74dcceda58924e34
Parent
74fe9587f86ea2c…
1 file changed
+10
-2
+10
-2
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1528,15 +1528,23 @@ | ||
| 1528 | 1528 | login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki); |
| 1529 | 1529 | return; |
| 1530 | 1530 | } |
| 1531 | 1531 | url_initialize(&url, "timeline"); |
| 1532 | 1532 | cgi_query_parameters_to_url(&url); |
| 1533 | + | |
| 1534 | + /* Ignore empty tag or branch name query strings. */ | |
| 1535 | + if( zTagName && !*zTagName ){ | |
| 1536 | + zTagName = 0; | |
| 1537 | + } | |
| 1538 | + if( zBrName && !*zBrName ){ | |
| 1539 | + zBrName = 0; | |
| 1540 | + } | |
| 1533 | 1541 | |
| 1534 | 1542 | /* Identify the tag or branch name or match pattern. */ |
| 1535 | - if( zTagName && *zTagName ){ | |
| 1543 | + if( zTagName ){ | |
| 1536 | 1544 | zThisTag = zTagName; |
| 1537 | - }else if( zBrName && *zBrName ){ | |
| 1545 | + }else if( zBrName ){ | |
| 1538 | 1546 | zThisTag = zBrName; |
| 1539 | 1547 | } |
| 1540 | 1548 | |
| 1541 | 1549 | /* Interpet the tag style string. */ |
| 1542 | 1550 | if( zThisTag ){ |
| 1543 | 1551 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1528,15 +1528,23 @@ | |
| 1528 | login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki); |
| 1529 | return; |
| 1530 | } |
| 1531 | url_initialize(&url, "timeline"); |
| 1532 | cgi_query_parameters_to_url(&url); |
| 1533 | |
| 1534 | /* Identify the tag or branch name or match pattern. */ |
| 1535 | if( zTagName && *zTagName ){ |
| 1536 | zThisTag = zTagName; |
| 1537 | }else if( zBrName && *zBrName ){ |
| 1538 | zThisTag = zBrName; |
| 1539 | } |
| 1540 | |
| 1541 | /* Interpet the tag style string. */ |
| 1542 | if( zThisTag ){ |
| 1543 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1528,15 +1528,23 @@ | |
| 1528 | login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki); |
| 1529 | return; |
| 1530 | } |
| 1531 | url_initialize(&url, "timeline"); |
| 1532 | cgi_query_parameters_to_url(&url); |
| 1533 | |
| 1534 | /* Ignore empty tag or branch name query strings. */ |
| 1535 | if( zTagName && !*zTagName ){ |
| 1536 | zTagName = 0; |
| 1537 | } |
| 1538 | if( zBrName && !*zBrName ){ |
| 1539 | zBrName = 0; |
| 1540 | } |
| 1541 | |
| 1542 | /* Identify the tag or branch name or match pattern. */ |
| 1543 | if( zTagName ){ |
| 1544 | zThisTag = zTagName; |
| 1545 | }else if( zBrName ){ |
| 1546 | zThisTag = zBrName; |
| 1547 | } |
| 1548 | |
| 1549 | /* Interpet the tag style string. */ |
| 1550 | if( zThisTag ){ |
| 1551 |