diff options
author | KatolaZ <katolaz@freaknet.org> | 2018-07-30 07:20:20 +0100 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2018-07-30 07:20:20 +0100 |
commit | 6856761423c002230f49c69e491f42512b11a357 (patch) | |
tree | 55175084bad939497c5f09936c61defb3d985a22 /ui_70-repolist.c | |
parent | ee667540e07eaffaed612e8ca8572611ea1f42d9 (diff) |
fixed repo and summary header
Diffstat (limited to 'ui_70-repolist.c')
-rw-r--r-- | ui_70-repolist.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ui_70-repolist.c b/ui_70-repolist.c index fd1c0e1..40d9619 100644 --- a/ui_70-repolist.c +++ b/ui_70-repolist.c @@ -97,18 +97,21 @@ static int is_match(struct cgit_repo *repo) return 1; if (repo->owner && strcasestr(repo->owner, ctx.qry.search)) return 1; - fprintf(stdout, "i -- is_match has failed\n"); return 0; } static int is_in_url(struct cgit_repo *repo) { if (!ctx.qry.url){ +#ifdef DEBUG_GOPHER fprintf(stdout, "i -- ctx.qry.url is NULL\n"); +#endif return 1; } if (repo->url && starts_with(repo->url, ctx.qry.url)){ +#ifdef DEBUG_GOPHER fprintf(stdout, "i -- repo URL not in qry.url\n"); +#endif return 1; } return 0; @@ -117,11 +120,15 @@ static int is_in_url(struct cgit_repo *repo) static int is_visible(struct cgit_repo *repo) { if (repo->hide || repo->ignore){ +#ifdef DEBUG_GOPHER fprintf(stdout, "i -- repo: '%s' is invisible or ignored", repo->name); +#endif return 0; } if (!(is_match(repo) && is_in_url(repo))){ +#ifdef DEBUG_GOPHER fprintf(stdout, "i -- !(is_match(repo) && is_in_url(repo))\n"); +#endif return 0; } return 1; @@ -131,8 +138,9 @@ static int any_repos_visible(void) { int i; +#ifdef DEBUG_GOPHER fprintf(stdout, "i -- ctx.qry.search: %s\n", ctx.qry.search); - +#endif for (i = 0; i < cgit_repolist.count; i++) { if (is_visible(&cgit_repolist.repos[i])) return 1; |