Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Drop the hidden form fields' unused page argument
-rw-r--r--source/ui-diff.c2
-rw-r--r--source/ui-shared.c6
-rw-r--r--source/ui-shared.h2
-rw-r--r--source/ui-stats.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/source/ui-diff.c b/source/ui-diff.c
index 51df73d..315a8f0 100644
--- a/source/ui-diff.c
+++ b/source/ui-diff.c
@@ -531,7 +531,7 @@ void cgit_print_diff_ctrls(void)
html("<div class='cgit-panel'>\n");
html("<strong>Diff options</strong>");
html("<form method='get' aria-label='Diff options'>");
- cgit_add_hidden_formfields(1, 0, ctx.qry.page);
+ cgit_add_hidden_formfields(1, 0);
html("<div class='fields'>");
html("<label for='diff-context'>context</label>");
html("<select id='diff-context' name='context'>");
diff --git a/source/ui-shared.c b/source/ui-shared.c
index b34861d..3116b7f 100644
--- a/source/ui-shared.c
+++ b/source/ui-shared.c
@@ -422,7 +422,7 @@ static void print_header(void)
// Switching branch means leaving the pinned commit behind, so
// the id fields stay out of the form.
ctx.qry.oid = ctx.qry.oid2 = NULL;
- cgit_add_hidden_formfields(0, 1, ctx.qry.page);
+ cgit_add_hidden_formfields(0, 1);
ctx.qry.oid = oid;
ctx.qry.oid2 = oid2;
html("<select name='h' aria-label='Branch'>\n");
@@ -528,7 +528,7 @@ static void print_repo_search(void)
html("<form class='search' role='search' method='get' action='");
write_page_url("log", ctx.qry.vpath);
html("'>\n");
- cgit_add_hidden_formfields(1, 0, "log");
+ cgit_add_hidden_formfields(1, 0);
html("<select name='qt' aria-label='Search type'>\n");
html_option("grep", "log msg", ctx.qry.grep);
html_option("author", "author", ctx.qry.grep);
@@ -1597,7 +1597,7 @@ void cgit_print_clone_row(const char *url, int colspan)
free(fallback);
}
-void cgit_add_hidden_formfields(int incl_head, int incl_search, const char *page UNUSED)
+void cgit_add_hidden_formfields(int incl_head, int incl_search)
{
if (incl_head && head_is_named(ctx.qry.head))
html_hidden("h", ctx.qry.head);
diff --git a/source/ui-shared.h b/source/ui-shared.h
index 871dba0..67f39ef 100644
--- a/source/ui-shared.h
+++ b/source/ui-shared.h
@@ -152,7 +152,7 @@ extern const char *cgit_snapshot_prefix(const struct cgit_repo *repo);
* terms are carried only when the caller asks for them, since a form with a
* field of its own for either would otherwise submit that name twice.
*/
-extern void cgit_add_hidden_formfields(int incl_head, int incl_search, const char *page);
+extern void cgit_add_hidden_formfields(int incl_head, int incl_search);
/*
* Put path in front of the page title, its last component first.
diff --git a/source/ui-stats.c b/source/ui-stats.c
index 1c4d654..7d7b810 100644
--- a/source/ui-stats.c
+++ b/source/ui-stats.c
@@ -340,7 +340,7 @@ static void print_options_form(const struct cgit_period *period, int top)
html("<div class='cgit-panel'>\n");
html("<strong>Stat options</strong>");
html("<form method='get' aria-label='Stat options'>");
- cgit_add_hidden_formfields(1, 0, "stats");
+ cgit_add_hidden_formfields(1, 0);
html("<div class='fields'>");
if (ctx.repo->max_stats > 1) {
choices = ctx.repo->max_stats;