14
ui-shared.c
14
ui-shared.c
@ -34,6 +34,17 @@ void cgit_print_error(char *msg)
|
||||
html("</div>\n");
|
||||
}
|
||||
|
||||
char *cgit_httpscheme()
|
||||
{
|
||||
char *https;
|
||||
|
||||
https = getenv("HTTPS");
|
||||
if (https != NULL && strcmp(https, "on") == 0)
|
||||
return "https://";
|
||||
else
|
||||
return "http://";
|
||||
}
|
||||
|
||||
char *cgit_hosturl()
|
||||
{
|
||||
char *host, *port;
|
||||
@ -494,7 +505,8 @@ void cgit_print_docstart(struct cgit_context *ctx)
|
||||
html("'/>\n");
|
||||
}
|
||||
if (host && ctx->repo) {
|
||||
html("<link rel='alternate' title='Atom feed' href='http://");
|
||||
html("<link rel='alternate' title='Atom feed' href='");
|
||||
html(cgit_httpscheme());
|
||||
html_attr(cgit_hosturl());
|
||||
html_attr(cgit_fileurl(ctx->repo->url, "atom", ctx->qry.path,
|
||||
fmt("h=%s", ctx->qry.head)));
|
||||
|
Referência em uma nova issue
Block a user