Fossil SCM
Apply the same fix as [f56a138ee179e152] in /urllist.
Commit
3c20bf3c70daf513076ece8113f5b0b1647a281405191d29bb6b9399d9c02a56
Parent
201cf952db7637b…
1 file changed
+12
-4
+12
-4
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -621,16 +621,24 @@ | ||
| 621 | 621 | UrlData x; |
| 622 | 622 | if( cnt==0 ){ |
| 623 | 623 | @ <div class="section">Recently synced with these URLs</div> |
| 624 | 624 | @ <table border='0' width='100%%'> |
| 625 | 625 | } |
| 626 | - memset(&x, 0, sizeof(x)); | |
| 627 | - url_parse_local(zURL, URL_OMIT_USER, &x); | |
| 628 | - @ <tr><td width='100%%'><a href='%h(x.canonical)'>%h(x.canonical)</a> | |
| 626 | + if( fossil_strnicmp(zURL, "http://", 7)==0 | |
| 627 | + || fossil_strnicmp(zURL, "https://", 8)==0 | |
| 628 | + ){ | |
| 629 | + memset(&x, 0, sizeof(x)); | |
| 630 | + url_parse_local(zURL, URL_OMIT_USER, &x); | |
| 631 | + @ <tr><td width='100%%'><a href='%h(x.canonical)'>%h(x.canonical)</a> | |
| 632 | + url_unparse(&x); | |
| 633 | + }else{ | |
| 634 | + /* A gitpush address such as git@host:path is not a URL that | |
| 635 | + ** url_parse_local() understands. Show it as it is. */ | |
| 636 | + @ <tr><td width='100%%'>%h(zURL) | |
| 637 | + } | |
| 629 | 638 | @ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr> |
| 630 | 639 | cnt++; |
| 631 | - url_unparse(&x); | |
| 632 | 640 | } |
| 633 | 641 | db_finalize(&q); |
| 634 | 642 | if( cnt ){ |
| 635 | 643 | @ </table> |
| 636 | 644 | total += cnt; |
| 637 | 645 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -621,16 +621,24 @@ | |
| 621 | UrlData x; |
| 622 | if( cnt==0 ){ |
| 623 | @ <div class="section">Recently synced with these URLs</div> |
| 624 | @ <table border='0' width='100%%'> |
| 625 | } |
| 626 | memset(&x, 0, sizeof(x)); |
| 627 | url_parse_local(zURL, URL_OMIT_USER, &x); |
| 628 | @ <tr><td width='100%%'><a href='%h(x.canonical)'>%h(x.canonical)</a> |
| 629 | @ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr> |
| 630 | cnt++; |
| 631 | url_unparse(&x); |
| 632 | } |
| 633 | db_finalize(&q); |
| 634 | if( cnt ){ |
| 635 | @ </table> |
| 636 | total += cnt; |
| 637 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -621,16 +621,24 @@ | |
| 621 | UrlData x; |
| 622 | if( cnt==0 ){ |
| 623 | @ <div class="section">Recently synced with these URLs</div> |
| 624 | @ <table border='0' width='100%%'> |
| 625 | } |
| 626 | if( fossil_strnicmp(zURL, "http://", 7)==0 |
| 627 | || fossil_strnicmp(zURL, "https://", 8)==0 |
| 628 | ){ |
| 629 | memset(&x, 0, sizeof(x)); |
| 630 | url_parse_local(zURL, URL_OMIT_USER, &x); |
| 631 | @ <tr><td width='100%%'><a href='%h(x.canonical)'>%h(x.canonical)</a> |
| 632 | url_unparse(&x); |
| 633 | }else{ |
| 634 | /* A gitpush address such as git@host:path is not a URL that |
| 635 | ** url_parse_local() understands. Show it as it is. */ |
| 636 | @ <tr><td width='100%%'>%h(zURL) |
| 637 | } |
| 638 | @ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr> |
| 639 | cnt++; |
| 640 | } |
| 641 | db_finalize(&q); |
| 642 | if( cnt ){ |
| 643 | @ </table> |
| 644 | total += cnt; |
| 645 |