diff options
| author | Daniel Reichelt | 2015-08-10 09:45:48 +0200 |
|---|---|---|
| committer | Jason A. Donenfeld | 2015-08-12 14:08:15 +0200 |
| commit | dc41a0018058c81ee9a0a2dc6e89f737d7c1c966 (patch) | |
| tree | da7487e33a13b73e168fdcbbf9ff628977353d9b | |
| parent | 121e65391446069a538ae8d3f7938452178de7c6 (diff) | |
| download | cgit-dc41a0018058c81ee9a0a2dc6e89f737d7c1c966.tar.gz cgit-dc41a0018058c81ee9a0a2dc6e89f737d7c1c966.tar.bz2 cgit-dc41a0018058c81ee9a0a2dc6e89f737d7c1c966.zip | |
Fix processing of repo.hide and repo.ignore
If the global option enable-filter-overrides is set to 1 the repo-specific
options repo.hide and repo.ignore never got processed.
Signed-off-by: Daniel Reichelt <hacking@nachtgeist.net>
Reviewed-by: John Keeping <john@keeping.me.uk>
| -rw-r--r-- | cgit.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -82,6 +82,10 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va | |||
| 82 | repo->logo = xstrdup(value); | 82 | repo->logo = xstrdup(value); |
| 83 | else if (!strcmp(name, "logo-link") && value != NULL) | 83 | else if (!strcmp(name, "logo-link") && value != NULL) |
| 84 | repo->logo_link = xstrdup(value); | 84 | repo->logo_link = xstrdup(value); |
| 85 | else if (!strcmp(name, "hide")) | ||
| 86 | repo->hide = atoi(value); | ||
| 87 | else if (!strcmp(name, "ignore")) | ||
| 88 | repo->ignore = atoi(value); | ||
| 85 | else if (ctx.cfg.enable_filter_overrides) { | 89 | else if (ctx.cfg.enable_filter_overrides) { |
| 86 | if (!strcmp(name, "about-filter")) | 90 | if (!strcmp(name, "about-filter")) |
| 87 | repo->about_filter = cgit_new_filter(value, ABOUT); | 91 | repo->about_filter = cgit_new_filter(value, ABOUT); |
| @@ -93,10 +97,6 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va | |||
| 93 | repo->email_filter = cgit_new_filter(value, EMAIL); | 97 | repo->email_filter = cgit_new_filter(value, EMAIL); |
| 94 | else if (!strcmp(name, "owner-filter")) | 98 | else if (!strcmp(name, "owner-filter")) |
| 95 | repo->owner_filter = cgit_new_filter(value, OWNER); | 99 | repo->owner_filter = cgit_new_filter(value, OWNER); |
| 96 | } else if (!strcmp(name, "hide")) { | ||
| 97 | repo->hide = atoi(value); | ||
| 98 | } else if (!strcmp(name, "ignore")) { | ||
| 99 | repo->ignore = atoi(value); | ||
| 100 | } | 100 | } |
| 101 | } | 101 | } |
| 102 | 102 | ||
