summaryrefslogtreecommitdiffabout
path: root/shared.c
authorLars Hjemli <hjemli@gmail.com>2007-05-16 08:45:45 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2007-05-16 08:46:59 (UTC)
commitc1ad6cb77889880ad0189a689840fbfa6e5cbc80 (patch) (unidiff)
tree352c32898316a388b582385a5fb3c6c534eaa30a /shared.c
parentf4f1339fe62fb1a28c147567195a86dd99485e25 (diff)
downloadcgit-c1ad6cb77889880ad0189a689840fbfa6e5cbc80.zip
cgit-c1ad6cb77889880ad0189a689840fbfa6e5cbc80.tar.gz
cgit-c1ad6cb77889880ad0189a689840fbfa6e5cbc80.tar.bz2
Restrict length of repo description on repolist page
If any repo has a very long description, all repos suffer since the repo-links in the right-most column gets pushed out of sight. Fix it by introducing max-repodesc-length parameter in cgitrc, and default to 60 chars. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--shared.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/shared.c b/shared.c
index a1e1acd..752ceac 100644
--- a/shared.c
+++ b/shared.c
@@ -30,6 +30,7 @@ int cgit_cache_static_ttl = -1;
30int cgit_cache_max_create_time = 5; 30int cgit_cache_max_create_time = 5;
31 31
32int cgit_max_msg_len = 60; 32int cgit_max_msg_len = 60;
33int cgit_max_repodesc_len = 60;
33int cgit_max_commit_count = 50; 34int cgit_max_commit_count = 50;
34 35
35int cgit_query_has_symref = 0; 36int cgit_query_has_symref = 0;
@@ -118,6 +119,8 @@ void cgit_global_config_cb(const char *name, const char *value)
118 cgit_cache_dynamic_ttl = atoi(value); 119 cgit_cache_dynamic_ttl = atoi(value);
119 else if (!strcmp(name, "max-message-length")) 120 else if (!strcmp(name, "max-message-length"))
120 cgit_max_msg_len = atoi(value); 121 cgit_max_msg_len = atoi(value);
122 else if (!strcmp(name, "max-repodesc-length"))
123 cgit_max_repodesc_len = atoi(value);
121 else if (!strcmp(name, "max-commit-count")) 124 else if (!strcmp(name, "max-commit-count"))
122 cgit_max_commit_count = atoi(value); 125 cgit_max_commit_count = atoi(value);
123 else if (!strcmp(name, "repo.url")) 126 else if (!strcmp(name, "repo.url"))