author | Lars Hjemli <hjemli@gmail.com> | 2008-12-07 14:52:35 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-12-07 14:52:35 (UTC) |
commit | c3c925f4eca3e863bedaae4cfe237c3ad52092b6 (patch) (side-by-side diff) | |
tree | 5d3afa3a3ed0fbdbe00ad8e3519cf3cf60413e09 | |
parent | 837d464af77d76a2661d92e05167657cbf430d80 (diff) | |
download | cgit-c3c925f4eca3e863bedaae4cfe237c3ad52092b6.zip cgit-c3c925f4eca3e863bedaae4cfe237c3ad52092b6.tar.gz cgit-c3c925f4eca3e863bedaae4cfe237c3ad52092b6.tar.bz2 |
ui-shared: externalize add_hidden_formfields()
This function will be reused by ui-stats.c in the next commit.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-shared.c | 6 | ||||
-rw-r--r-- | ui-shared.h | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/ui-shared.c b/ui-shared.c index a5eb25f..1bb30c2 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -556,5 +556,5 @@ int print_archive_ref(const char *refname, const unsigned char *sha1, } -void add_hidden_formfields(int incl_head, int incl_search, char *page) +void cgit_add_hidden_formfields(int incl_head, int incl_search, char *page) { char *url; @@ -611,5 +611,5 @@ void cgit_print_pageheader(struct cgit_context *ctx) html("</td><td class='form'>"); html("<form method='get' action=''>\n"); - add_hidden_formfields(0, 1, ctx->qry.page); + cgit_add_hidden_formfields(0, 1, ctx->qry.page); html("<select name='h' onchange='this.form.submit();'>\n"); for_each_branch_ref(print_branch_option, ctx->qry.head); @@ -661,5 +661,5 @@ void cgit_print_pageheader(struct cgit_context *ctx) ctx->qry.path, NULL)); html("'>\n"); - add_hidden_formfields(1, 0, "log"); + cgit_add_hidden_formfields(1, 0, "log"); html("<select name='qt'>\n"); html_option("grep", "log msg", ctx->qry.grep); diff --git a/ui-shared.h b/ui-shared.h index e3fae64..1524dc3 100644 --- a/ui-shared.h +++ b/ui-shared.h @@ -45,4 +45,5 @@ extern void cgit_print_filemode(unsigned short mode); extern void cgit_print_snapshot_links(const char *repo, const char *head, const char *hex, int snapshots); - +extern void cgit_add_hidden_formfields(int incl_head, int incl_search, + char *page); #endif /* UI_SHARED_H */ |