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
This commit is contained in:
10
cgit.c
10
cgit.c
@ -26,13 +26,15 @@ static int cgit_prepare_cache(struct cacheitem *item)
|
||||
}
|
||||
|
||||
if (!cgit_cmd) {
|
||||
item->name = xstrdup(fmt("%s/%s/index.html", cgit_cache_root,
|
||||
cache_safe_filename(cgit_repo->url)));
|
||||
item->name = xstrdup(fmt("%s/%s/index.%s.html", cgit_cache_root,
|
||||
cache_safe_filename(cgit_repo->url),
|
||||
cache_safe_filename(cgit_querystring)));
|
||||
item->ttl = cgit_cache_repo_ttl;
|
||||
} else {
|
||||
item->name = xstrdup(fmt("%s/%s/%s/%s.html", cgit_cache_root,
|
||||
cache_safe_filename(cgit_repo->url), cgit_query_page,
|
||||
cache_safe_filename(cgit_querystring)));
|
||||
cache_safe_filename(cgit_repo->url),
|
||||
cgit_query_page,
|
||||
cache_safe_filename(cgit_querystring)));
|
||||
if (cgit_query_has_symref)
|
||||
item->ttl = cgit_cache_dynamic_ttl;
|
||||
else if (cgit_query_has_sha1)
|
||||
|
Reference in New Issue
Block a user