diff options
author | Lars Hjemli | 2008-02-16 11:53:40 +0100 |
---|---|---|
committer | Lars Hjemli | 2008-02-16 12:07:28 +0100 |
commit | d14d77fe95c3b6224b40df9b101dded0deea913c (patch) | |
tree | 7e0d9c8f2c0f86b8946aea0bb823085c33b164b3 /ui-log.c | |
parent | e5ed227ef0da561e2bde8646ec816842392377ee (diff) | |
download | cgit-d14d77fe95c3b6224b40df9b101dded0deea913c.tar.gz cgit-d14d77fe95c3b6224b40df9b101dded0deea913c.tar.bz2 cgit-d14d77fe95c3b6224b40df9b101dded0deea913c.zip |
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>
Diffstat (limited to 'ui-log.c')
-rw-r--r-- | ui-log.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -37,7 +37,7 @@ void print_commit(struct commit *commit) | |||
37 | html("<tr><td>"); | 37 | html("<tr><td>"); |
38 | cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); | 38 | cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); |
39 | html("</td><td>"); | 39 | html("</td><td>"); |
40 | cgit_commit_link(info->subject, NULL, NULL, cgit_query_head, | 40 | cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head, |
41 | sha1_to_hex(commit->object.sha1)); | 41 | sha1_to_hex(commit->object.sha1)); |
42 | if (cgit_repo->enable_log_filecount) { | 42 | if (cgit_repo->enable_log_filecount) { |
43 | files = 0; | 43 | files = 0; |
@@ -67,7 +67,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern | |||
67 | int i; | 67 | int i; |
68 | 68 | ||
69 | if (!tip) | 69 | if (!tip) |
70 | argv[1] = cgit_query_head; | 70 | argv[1] = ctx.qry.head; |
71 | 71 | ||
72 | if (grep && pattern && (!strcmp(grep, "grep") || | 72 | if (grep && pattern && (!strcmp(grep, "grep") || |
73 | !strcmp(grep, "author") || | 73 | !strcmp(grep, "author") || |
@@ -123,17 +123,17 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern | |||
123 | if (pager) { | 123 | if (pager) { |
124 | html("<div class='pager'>"); | 124 | html("<div class='pager'>"); |
125 | if (ofs > 0) { | 125 | if (ofs > 0) { |
126 | cgit_log_link("[prev]", NULL, NULL, cgit_query_head, | 126 | cgit_log_link("[prev]", NULL, NULL, ctx.qry.head, |
127 | cgit_query_sha1, cgit_query_path, | 127 | ctx.qry.sha1, ctx.qry.path, |
128 | ofs - cnt, cgit_query_grep, | 128 | ofs - cnt, ctx.qry.grep, |
129 | cgit_query_search); | 129 | ctx.qry.search); |
130 | html(" "); | 130 | html(" "); |
131 | } | 131 | } |
132 | if ((commit = get_revision(&rev)) != NULL) { | 132 | if ((commit = get_revision(&rev)) != NULL) { |
133 | cgit_log_link("[next]", NULL, NULL, cgit_query_head, | 133 | cgit_log_link("[next]", NULL, NULL, ctx.qry.head, |
134 | cgit_query_sha1, cgit_query_path, | 134 | ctx.qry.sha1, ctx.qry.path, |
135 | ofs + cnt, cgit_query_grep, | 135 | ofs + cnt, ctx.qry.grep, |
136 | cgit_query_search); | 136 | ctx.qry.search); |
137 | } | 137 | } |
138 | html("</div>"); | 138 | html("</div>"); |
139 | } | 139 | } |