From 103940fe6b0914dc42b8b033d1d328f38135ca5f Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Fri, 29 Jun 2007 20:27:41 +0200 Subject: Add ofs argument to cgit_log_link and use it in ui-log.c This fixes a bug in the prev/next links on the log page: when on the default branch the links to prev/next page would contain h=(null). Signed-off-by: Lars Hjemli --- ui-log.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'ui-log.c') diff --git a/ui-log.c b/ui-log.c index 95cb453..d38e40a 100644 --- a/ui-log.c +++ b/ui-log.c @@ -113,17 +113,15 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *path, i if (pager) { html("
"); if (ofs > 0) { - html(" [prev] "); + cgit_log_link("[prev]", NULL, NULL, cgit_query_head, + cgit_query_sha1, cgit_query_path, + ofs - cnt); + html(" "); } - if ((commit = get_revision(&rev)) != NULL) { - html(" [next] "); + cgit_log_link("[next]", NULL, NULL, cgit_query_head, + cgit_query_sha1, cgit_query_path, + ofs + cnt); } html("
"); } -- cgit v1.2.3