about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ui-repolist.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 8d982c4..4912fa5 100644 --- a/ui-repolist.c +++ b/ui-repolist.c
@@ -106,6 +106,15 @@ static int is_in_url(struct cgit_repo *repo)
106 return 0; 106 return 0;
107} 107}
108 108
109static int is_visible(struct cgit_repo *repo)
110{
111 if (repo->hide || repo->ignore)
112 return 0;
113 if (!(is_match(repo) && is_in_url(repo)))
114 return 0;
115 return 1;
116}
117
109static void print_sort_header(const char *title, const char *sort) 118static void print_sort_header(const char *title, const char *sort)
110{ 119{
111 char *currenturl = cgit_currenturl(); 120 char *currenturl = cgit_currenturl();
@@ -278,9 +287,7 @@ void cgit_print_repolist(void)
278 html("<table summary='repository list' class='list nowrap'>"); 287 html("<table summary='repository list' class='list nowrap'>");
279 for (i = 0; i < cgit_repolist.count; i++) { 288 for (i = 0; i < cgit_repolist.count; i++) {
280 ctx.repo = &cgit_repolist.repos[i]; 289 ctx.repo = &cgit_repolist.repos[i];
281 if (ctx.repo->hide || ctx.repo->ignore) 290 if (!is_visible(ctx.repo))
282 continue;
283 if (!(is_match(ctx.repo) && is_in_url(ctx.repo)))
284 continue; 291 continue;
285 hits++; 292 hits++;
286 if (hits <= ctx.qry.ofs) 293 if (hits <= ctx.qry.ofs)