|
diff --git a/cgit.c b/cgit.c index 2aef44d..38f0fdd 100644 --- a/ cgit.c+++ b/ cgit.c |
|
@@ -28,48 +28,50 @@ void config_cb(const char *name, const char *value) |
28 | else if (!strcmp(name, "css")) |
28 | else if (!strcmp(name, "css")) |
29 | ctx.cfg.css = xstrdup(value); |
29 | ctx.cfg.css = xstrdup(value); |
30 | else if (!strcmp(name, "favicon")) |
30 | else if (!strcmp(name, "favicon")) |
31 | ctx.cfg.favicon = xstrdup(value); |
31 | ctx.cfg.favicon = xstrdup(value); |
32 | else if (!strcmp(name, "footer")) |
32 | else if (!strcmp(name, "footer")) |
33 | ctx.cfg.footer = xstrdup(value); |
33 | ctx.cfg.footer = xstrdup(value); |
34 | else if (!strcmp(name, "header")) |
34 | else if (!strcmp(name, "header")) |
35 | ctx.cfg.header = xstrdup(value); |
35 | ctx.cfg.header = xstrdup(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); |
68 | else if (!strcmp(name, "cache-repo-ttl")) |
70 | else if (!strcmp(name, "cache-repo-ttl")) |
69 | ctx.cfg.cache_repo_ttl = atoi(value); |
71 | ctx.cfg.cache_repo_ttl = atoi(value); |
70 | else if (!strcmp(name, "cache-static-ttl")) |
72 | else if (!strcmp(name, "cache-static-ttl")) |
71 | ctx.cfg.cache_static_ttl = atoi(value); |
73 | ctx.cfg.cache_static_ttl = atoi(value); |
72 | else if (!strcmp(name, "cache-dynamic-ttl")) |
74 | else if (!strcmp(name, "cache-dynamic-ttl")) |
73 | ctx.cfg.cache_dynamic_ttl = atoi(value); |
75 | ctx.cfg.cache_dynamic_ttl = atoi(value); |
74 | else if (!strcmp(name, "embedded")) |
76 | else if (!strcmp(name, "embedded")) |
75 | ctx.cfg.embedded = atoi(value); |
77 | ctx.cfg.embedded = atoi(value); |
|