From 537c05f138d59c1eb3ac8e2d8b0dca3a38aa5dd4 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sun, 9 Aug 2009 13:27:21 +0200 Subject: Add 'about-filter' and 'repo.about-filter' options These options can be used to execute a filter command on each about-page, both top-level and for each repository (repo.about-filter can be used to override the current about-filter). Signed-off-by: Lars Hjemli --- cgit.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cgit.c') diff --git a/cgit.c b/cgit.c index b3a98c1..cb1149d 100644 --- a/cgit.c +++ b/cgit.c @@ -90,6 +90,8 @@ void config_cb(const char *name, const char *value) ctx.cfg.cache_static_ttl = atoi(value); else if (!strcmp(name, "cache-dynamic-ttl")) ctx.cfg.cache_dynamic_ttl = atoi(value); + else if (!strcmp(name, "about-filter")) + ctx.cfg.about_filter = new_filter(value, 0); else if (!strcmp(name, "commit-filter")) ctx.cfg.commit_filter = new_filter(value, 0); else if (!strcmp(name, "embedded")) @@ -146,6 +148,8 @@ void config_cb(const char *name, const char *value) ctx.repo->max_stats = cgit_find_stats_period(value, NULL); else if (ctx.repo && !strcmp(name, "repo.module-link")) ctx.repo->module_link= xstrdup(value); + else if (ctx.repo && !strcmp(name, "repo.about-filter")) + ctx.repo->about_filter = new_filter(value, 0); else if (ctx.repo && !strcmp(name, "repo.commit-filter")) ctx.repo->commit_filter = new_filter(value, 0); else if (ctx.repo && !strcmp(name, "repo.source-filter")) -- cgit v1.2.3-59-g8ed1b