author | Lars Hjemli <hjemli@gmail.com> | 2008-02-16 10:53:40 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-02-16 11:07:28 (UTC) |
commit | d14d77fe95c3b6224b40df9b101dded0deea913c (patch) (unidiff) | |
tree | 7e0d9c8f2c0f86b8946aea0bb823085c33b164b3 /cache.c | |
parent | e5ed227ef0da561e2bde8646ec816842392377ee (diff) | |
download | cgit-d14d77fe95c3b6224b40df9b101dded0deea913c.zip cgit-d14d77fe95c3b6224b40df9b101dded0deea913c.tar.gz cgit-d14d77fe95c3b6224b40df9b101dded0deea913c.tar.bz2 |
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>
-rw-r--r-- | cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -56,12 +56,12 @@ int cache_create_dirs() | |||
56 | 56 | ||
57 | if (mkdir(path, S_IRWXU) && errno!=EEXIST) | 57 | if (mkdir(path, S_IRWXU) && errno!=EEXIST) |
58 | return 0; | 58 | return 0; |
59 | 59 | ||
60 | if (cgit_query_page) { | 60 | if (ctx.qry.page) { |
61 | path = fmt("%s/%s/%s", cgit_cache_root, | 61 | path = fmt("%s/%s/%s", cgit_cache_root, |
62 | cache_safe_filename(cgit_repo->url), | 62 | cache_safe_filename(cgit_repo->url), |
63 | cgit_query_page); | 63 | ctx.qry.page); |
64 | if (mkdir(path, S_IRWXU) && errno!=EEXIST) | 64 | if (mkdir(path, S_IRWXU) && errno!=EEXIST) |
65 | return 0; | 65 | return 0; |
66 | } | 66 | } |
67 | return 1; | 67 | return 1; |