|
diff --git a/cgit.c b/cgit.c index 2aef44d..38f0fdd 100644 --- a/ cgit.c+++ b/ cgit.c |
|
@@ -36,32 +36,34 @@ void config_cb(const char *name, const char *value) |
36 | else if (!strcmp(name, "logo")) |
36 | else if (!strcmp(name, "logo")) |
37 | ctx.cfg.logo = xstrdup(value); |
37 | ctx.cfg.logo = xstrdup(value); |
38 | else if (!strcmp(name, "index-header")) |
38 | else if (!strcmp(name, "index-header")) |
39 | ctx.cfg.index_header = xstrdup(value); |
39 | ctx.cfg.index_header = xstrdup(value); |
40 | else if (!strcmp(name, "index-info")) |
40 | else if (!strcmp(name, "index-info")) |
41 | ctx.cfg.index_info = xstrdup(value); |
41 | ctx.cfg.index_info = xstrdup(value); |
42 | else if (!strcmp(name, "logo-link")) |
42 | else if (!strcmp(name, "logo-link")) |
43 | ctx.cfg.logo_link = xstrdup(value); |
43 | ctx.cfg.logo_link = xstrdup(value); |
44 | else if (!strcmp(name, "module-link")) |
44 | else if (!strcmp(name, "module-link")) |
45 | ctx.cfg.module_link = xstrdup(value); |
45 | ctx.cfg.module_link = xstrdup(value); |
46 | else if (!strcmp(name, "virtual-root")) { |
46 | else if (!strcmp(name, "virtual-root")) { |
47 | ctx.cfg.virtual_root = trim_end(value, '/'); |
47 | ctx.cfg.virtual_root = trim_end(value, '/'); |
48 | if (!ctx.cfg.virtual_root && (!strcmp(value, "/"))) |
48 | if (!ctx.cfg.virtual_root && (!strcmp(value, "/"))) |
49 | ctx.cfg.virtual_root = ""; |
49 | ctx.cfg.virtual_root = ""; |
50 | } else if (!strcmp(name, "nocache")) |
50 | } else if (!strcmp(name, "nocache")) |
51 | ctx.cfg.nocache = atoi(value); |
51 | ctx.cfg.nocache = atoi(value); |
| |
52 | else if (!strcmp(name, "noheader")) |
| |
53 | ctx.cfg.noheader = atoi(value); |
52 | else if (!strcmp(name, "snapshots")) |
54 | else if (!strcmp(name, "snapshots")) |
53 | ctx.cfg.snapshots = cgit_parse_snapshots_mask(value); |
55 | ctx.cfg.snapshots = cgit_parse_snapshots_mask(value); |
54 | else if (!strcmp(name, "enable-index-links")) |
56 | else if (!strcmp(name, "enable-index-links")) |
55 | ctx.cfg.enable_index_links = atoi(value); |
57 | ctx.cfg.enable_index_links = atoi(value); |
56 | else if (!strcmp(name, "enable-log-filecount")) |
58 | else if (!strcmp(name, "enable-log-filecount")) |
57 | ctx.cfg.enable_log_filecount = atoi(value); |
59 | ctx.cfg.enable_log_filecount = atoi(value); |
58 | else if (!strcmp(name, "enable-log-linecount")) |
60 | else if (!strcmp(name, "enable-log-linecount")) |
59 | ctx.cfg.enable_log_linecount = atoi(value); |
61 | ctx.cfg.enable_log_linecount = atoi(value); |
60 | else if (!strcmp(name, "max-stats")) |
62 | else if (!strcmp(name, "max-stats")) |
61 | ctx.cfg.max_stats = cgit_find_stats_period(value, NULL); |
63 | ctx.cfg.max_stats = cgit_find_stats_period(value, NULL); |
62 | else if (!strcmp(name, "cache-size")) |
64 | else if (!strcmp(name, "cache-size")) |
63 | ctx.cfg.cache_size = atoi(value); |
65 | ctx.cfg.cache_size = atoi(value); |
64 | else if (!strcmp(name, "cache-root")) |
66 | else if (!strcmp(name, "cache-root")) |
65 | ctx.cfg.cache_root = xstrdup(value); |
67 | ctx.cfg.cache_root = xstrdup(value); |
66 | else if (!strcmp(name, "cache-root-ttl")) |
68 | else if (!strcmp(name, "cache-root-ttl")) |
67 | ctx.cfg.cache_root_ttl = atoi(value); |
69 | ctx.cfg.cache_root_ttl = atoi(value); |
|