mirror of
https://git.zx2c4.com/cgit
synced 2025-07-02 22:34:32 +02:00
Introduce struct cgit_context
This struct will hold all the cgit runtime information currently found in a multitude of global variables. The first cleanup removes all querystring-related variables. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
e5ed227ef0
commit
d14d77fe95
13 changed files with 156 additions and 164 deletions
4
cache.c
4
cache.c
|
@ -57,10 +57,10 @@ int cache_create_dirs()
|
|||
if (mkdir(path, S_IRWXU) && errno!=EEXIST)
|
||||
return 0;
|
||||
|
||||
if (cgit_query_page) {
|
||||
if (ctx.qry.page) {
|
||||
path = fmt("%s/%s/%s", cgit_cache_root,
|
||||
cache_safe_filename(cgit_repo->url),
|
||||
cgit_query_page);
|
||||
ctx.qry.page);
|
||||
if (mkdir(path, S_IRWXU) && errno!=EEXIST)
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue