| -rw-r--r-- | ui-repolist.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 4912fa5..8d982c4 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -106,15 +106,6 @@ static int is_in_url(struct cgit_repo *repo) return 0; } -static int is_visible(struct cgit_repo *repo) -{ - if (repo->hide || repo->ignore) - return 0; - if (!(is_match(repo) && is_in_url(repo))) - return 0; - return 1; -} - static void print_sort_header(const char *title, const char *sort) { char *currenturl = cgit_currenturl(); @@ -287,7 +278,9 @@ void cgit_print_repolist(void) html("<table summary='repository list' class='list nowrap'>"); for (i = 0; i < cgit_repolist.count; i++) { ctx.repo = &cgit_repolist.repos[i]; - if (!is_visible(ctx.repo)) + if (ctx.repo->hide || ctx.repo->ignore) + continue; + if (!(is_match(ctx.repo) && is_in_url(ctx.repo))) continue; hits++; if (hits <= ctx.qry.ofs) |