diff options
author | Lars Hjemli <hjemli@gmail.com> | 2007-06-30 03:32:08 (JST) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-06-30 03:32:08 (JST) |
commit | 16a3d2779ccd56bf7954d98da547247d8796544b (patch) | |
tree | 86d2ed41adc3de842c7518d614ea49ca0200e4d2 /cgit.c | |
parent | f69250358a74efa5d7d9c562b2cdd80fad1430f1 (diff) | |
parent | 103940fe6b0914dc42b8b033d1d328f38135ca5f (diff) | |
download | cgit-16a3d2779ccd56bf7954d98da547247d8796544b.zip cgit-16a3d2779ccd56bf7954d98da547247d8796544b.tar.gz |
Merge branch 'lh/menu'
* lh/menu:
Add ofs argument to cgit_log_link and use it in ui-log.c
Add trim_end() and use it to remove trailing slashes from repo paths
Do not include current path in the "tree" menu link
Add setting to enable/disable extra links on index page
Change S/L/T to summary/log/tree
Change "files" to "tree"
Include querystring as part of cached filename for repo summary page
Add more menuitems on repo pages
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -26,13 +26,15 @@ static int cgit_prepare_cache(struct cacheitem *item) | |||
26 | } | 26 | } |
27 | 27 | ||
28 | if (!cgit_cmd) { | 28 | if (!cgit_cmd) { |
29 | item->name = xstrdup(fmt("%s/%s/index.html", cgit_cache_root, | 29 | item->name = xstrdup(fmt("%s/%s/index.%s.html", cgit_cache_root, |
30 | cache_safe_filename(cgit_repo->url))); | 30 | cache_safe_filename(cgit_repo->url), |
31 | cache_safe_filename(cgit_querystring))); | ||
31 | item->ttl = cgit_cache_repo_ttl; | 32 | item->ttl = cgit_cache_repo_ttl; |
32 | } else { | 33 | } else { |
33 | item->name = xstrdup(fmt("%s/%s/%s/%s.html", cgit_cache_root, | 34 | item->name = xstrdup(fmt("%s/%s/%s/%s.html", cgit_cache_root, |
34 | cache_safe_filename(cgit_repo->url), cgit_query_page, | 35 | cache_safe_filename(cgit_repo->url), |
35 | cache_safe_filename(cgit_querystring))); | 36 | cgit_query_page, |
37 | cache_safe_filename(cgit_querystring))); | ||
36 | if (cgit_query_has_symref) | 38 | if (cgit_query_has_symref) |
37 | item->ttl = cgit_cache_dynamic_ttl; | 39 | item->ttl = cgit_cache_dynamic_ttl; |
38 | else if (cgit_query_has_sha1) | 40 | else if (cgit_query_has_sha1) |