X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/e7af002d5c405c82652f739d08ced3908d1f57e7..eac1b675414722ae90df75abc727b2795bc096f0:/ui-repolist.c diff --git a/ui-repolist.c b/ui-repolist.c index 4dea3b3..0a0b6ca 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -94,7 +94,7 @@ int is_in_url(struct cgit_repo *repo) void print_sort_header(const char *title, const char *sort) { - htmlf(""); for (i=0; isection; + if (section && !strcmp(section, "")) + section = NULL; if (!sorted && - ((last_section == NULL && ctx.repo->section != NULL) || - (last_section != NULL && ctx.repo->section == NULL) || - (last_section != NULL && ctx.repo->section != NULL && - strcmp(ctx.repo->section, last_section)))) { + ((last_section == NULL && section != NULL) || + (last_section != NULL && section == NULL) || + (last_section != NULL && section != NULL && + strcmp(section, last_section)))) { htmlf("", columns); - html_txt(ctx.repo->section); + html_txt(section); html(""); - last_section = ctx.repo->section; + last_section = section; } htmlf("", - !sorted && ctx.repo->section ? "sublevel-repo" : "toplevel-repo"); + !sorted && section ? "sublevel-repo" : "toplevel-repo"); cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL); html(""); html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL);