| -rw-r--r-- | cgit.c | 2 | ||||
| -rw-r--r-- | cgit.h | 1 | ||||
| -rw-r--r-- | ui-shared.c | 20 |
3 files changed, 7 insertions, 16 deletions
@@ -49,8 +49,6 @@ void config_cb(const char *name, const char *value) ctx.cfg.virtual_root = ""; } else if (!strcmp(name, "nocache")) ctx.cfg.nocache = atoi(value); - else if (!strcmp(name, "noheader")) - ctx.cfg.noheader = atoi(value); else if (!strcmp(name, "snapshots")) ctx.cfg.snapshots = cgit_parse_snapshots_mask(value); else if (!strcmp(name, "enable-index-links")) @@ -172,7 +172,6 @@ struct cgit_config { int summary_log; int summary_tags; int embedded; - int noheader; }; struct cgit_page { diff --git a/ui-shared.c b/ui-shared.c index 5e03a7a..f18b2c7 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -611,8 +611,14 @@ char *hc(struct cgit_cmd *cmd, const char *page) return (strcmp(cmd ? cmd->name : fallback_cmd, page) ? NULL : "active"); } -static void print_header(struct cgit_context *ctx) +void cgit_print_pageheader(struct cgit_context *ctx) { + struct cgit_cmd *cmd = cgit_get_cmd(ctx); + + if (!cmd && ctx->repo) + fallback_cmd = "summary"; + + html("<div id='cgit'>"); html("<table id='header'>\n"); html("<tr>\n"); html("<td class='logo' rowspan='2'><a href='"); @@ -653,18 +659,6 @@ static void print_header(struct cgit_context *ctx) html_include(ctx->cfg.index_info); } html("</td></tr></table>\n"); -} - -void cgit_print_pageheader(struct cgit_context *ctx) -{ - struct cgit_cmd *cmd = cgit_get_cmd(ctx); - - if (!cmd && ctx->repo) - fallback_cmd = "summary"; - - html("<div id='cgit'>"); - if (!ctx->cfg.noheader) - print_header(ctx); html("<table class='tabs'><tr><td>\n"); if (ctx->repo) { |