Add search parameters to cgit_log_link This makes the [prev] and [next] links work correctly on search results. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli hjemli@gmail.com
Sat, 03 Nov 2007 10:42:37 +0100
6 files changed,
21 insertions(+),
8 deletions(-)
M
cgit.h
→
cgit.h
@@ -238,7 +238,8 @@
extern void cgit_tree_link(char *name, char *title, char *class, char *head, char *rev, char *path); extern void cgit_log_link(char *name, char *title, char *class, char *head, - char *rev, char *path, int ofs); + char *rev, char *path, int ofs, char *grep, + char *pattern); extern void cgit_commit_link(char *name, char *title, char *class, char *head, char *rev); extern void cgit_refs_link(char *name, char *title, char *class, char *head,
M
ui-log.c
→
ui-log.c
@@ -118,13 +118,15 @@ html("<div class='pager'>");
if (ofs > 0) { cgit_log_link("[prev]", NULL, NULL, cgit_query_head, cgit_query_sha1, cgit_query_path, - ofs - cnt); + ofs - cnt, cgit_query_grep, + cgit_query_search); html(" "); } if ((commit = get_revision(&rev)) != NULL) { cgit_log_link("[next]", NULL, NULL, cgit_query_head, cgit_query_sha1, cgit_query_path, - ofs + cnt); + ofs + cnt, cgit_query_grep, + cgit_query_search); } html("</div>"); }
M
ui-repolist.c
→
ui-repolist.c
@@ -98,7 +98,8 @@ html("<td>");
html_link_open(cgit_repourl(cgit_repo->url), NULL, "button"); html("summary</a>"); - cgit_log_link("log", NULL, "button", NULL, NULL, NULL, 0); + cgit_log_link("log", NULL, "button", NULL, NULL, NULL, + 0, NULL, NULL); cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL); html("</td>"); }
M
ui-summary.c
→
ui-summary.c
@@ -56,7 +56,7 @@
if (!info) return 1; html("<tr><td>"); - cgit_log_link(name, NULL, NULL, name, NULL, NULL, 0); + cgit_log_link(name, NULL, NULL, name, NULL, NULL, 0, NULL, NULL); html("</td><td>"); if (ref->object->type == OBJ_COMMIT) {