Diffstat (limited to 'ui-shared.c')
| -rw-r--r-- | ui-shared.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/ui-shared.c b/ui-shared.c index 5aa9119..ae29615 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -574,7 +574,7 @@ void cgit_print_http_headers(struct cgit_context *ctx) else if (ctx->page.mimetype) htmlf("Content-Type: %s\n", ctx->page.mimetype); if (ctx->page.size) - htmlf("Content-Length: %zd\n", ctx->page.size); + htmlf("Content-Length: %ld\n", ctx->page.size); if (ctx->page.filename) htmlf("Content-Disposition: inline; filename=\"%s\"\n", ctx->page.filename); @@ -756,27 +756,17 @@ static void cgit_print_path_crumbs(struct cgit_context *ctx, char *path) static void print_header(struct cgit_context *ctx) { - char *logo = NULL, *logo_link = NULL; - html("<table id='header'>\n"); html("<tr>\n"); - if (ctx->repo && ctx->repo->logo && *ctx->repo->logo) - logo = ctx->repo->logo; - else - logo = ctx->cfg.logo; - if (ctx->repo && ctx->repo->logo_link && *ctx->repo->logo_link) - logo_link = ctx->repo->logo_link; - else - logo_link = ctx->cfg.logo_link; - if (logo && *logo) { + if (ctx->cfg.logo && ctx->cfg.logo[0] != 0) { html("<td class='logo' rowspan='2'><a href='"); - if (logo_link && *logo_link) - html_attr(logo_link); + if (ctx->cfg.logo_link) + html_attr(ctx->cfg.logo_link); else html_attr(cgit_rooturl()); html("'><img src='"); - html_attr(logo); + html_attr(ctx->cfg.logo); html("' alt='cgit logo'/></a></td>\n"); } |