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 /ui-refs.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-- | ui-refs.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,30 +1,30 @@ | |||
1 | /* ui-refs.c: browse symbolic refs | 1 | /* ui-refs.c: browse symbolic refs |
2 | * | 2 | * |
3 | * Copyright (C) 2006 Lars Hjemli | 3 | * Copyright (C) 2006 Lars Hjemli |
4 | * | 4 | * |
5 | * Licensed under GNU General Public License v2 | 5 | * Licensed under GNU General Public License v2 |
6 | * (see COPYING for full license text) | 6 | * (see COPYING for full license text) |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include "cgit.h" | 9 | #include "cgit.h" |
10 | 10 | ||
11 | 11 | ||
12 | 12 | ||
13 | 13 | ||
14 | void cgit_print_refs() | 14 | void cgit_print_refs() |
15 | { | 15 | { |
16 | 16 | ||
17 | html("<table class='list nowrap'>"); | 17 | html("<table class='list nowrap'>"); |
18 | 18 | ||
19 | if (cgit_query_path && !strncmp(cgit_query_path, "heads", 5)) | 19 | if (ctx.qry.path && !strncmp(ctx.qry.path, "heads", 5)) |
20 | cgit_print_branches(0); | 20 | cgit_print_branches(0); |
21 | else if (cgit_query_path && !strncmp(cgit_query_path, "tags", 4)) | 21 | else if (ctx.qry.path && !strncmp(ctx.qry.path, "tags", 4)) |
22 | cgit_print_tags(0); | 22 | cgit_print_tags(0); |
23 | else { | 23 | else { |
24 | cgit_print_branches(0); | 24 | cgit_print_branches(0); |
25 | html("<tr class='nohover'><td colspan='4'> </td></tr>"); | 25 | html("<tr class='nohover'><td colspan='4'> </td></tr>"); |
26 | cgit_print_tags(0); | 26 | cgit_print_tags(0); |
27 | } | 27 | } |
28 | 28 | ||
29 | html("</table>"); | 29 | html("</table>"); |
30 | } | 30 | } |