Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Show a full index page for a negative offset
The query parser takes an offset as low as -1, which the stats page
reads as every author, so the index clamps it for itself, as the log
and refs pages already do.
Diffstat (limited to 'source')
| -rw-r--r-- | source/ui-repolist.c | 5 |
1 file changed, 5 insertions, 0 deletions
diff --git a/source/ui-repolist.c b/source/ui-repolist.c index 4f79f70..800373e 100644 --- a/source/ui-repolist.c +++ b/source/ui-repolist.c @@ -442,6 +442,11 @@ void cgit_print_repolist(void) else if (ctx.cfg.section_sort) sort_repolist("section"); + // An offset of -1 gets through for the stats page, where it means + // every author, and would start this page a row before the first. + if (ctx.qry.ofs < 0) + ctx.qry.ofs = 0; + currenturl = cgit_currenturl(); html("<table class='list repolist' aria-label='Repositories'>\n"); for (i = 0; i < cgit_repolist.count; i++) { |
