X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/dd80ef59e7cad0146b7e4812afa3f84ea3d1c7b8..314d9ea5a3bc60ec518e314bb0bf8072123dc08f:/ui-repolist.c?ds=sidebyside
diff --git a/ui-repolist.c b/ui-repolist.c
index 725338b..c23232c 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -19,7 +19,8 @@ time_t read_agefile(char *path)
if (!(f = fopen(path, "r")))
return -1;
- fgets(buf, sizeof(buf), f);
+ if (fgets(buf, sizeof(buf), f) == NULL)
+ return -1;
fclose(f);
if (parse_date(buf, buf2, sizeof(buf2)))
return strtoul(buf2, NULL, 10);
@@ -131,9 +132,7 @@ void cgit_print_repolist()
}
htmlf("
| ",
ctx.repo->group ? "sublevel-repo" : "toplevel-repo");
- html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL);
- html_txt(ctx.repo->name);
- html_link_close();
+ cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
html(" | ");
html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL);
html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc);
@@ -145,9 +144,7 @@ void cgit_print_repolist()
html(" | ");
if (ctx.cfg.enable_index_links) {
html("");
- html_link_open(cgit_repourl(ctx.repo->url),
- NULL, "button");
- html("summary");
+ cgit_summary_link("summary", NULL, "button", NULL);
cgit_log_link("log", NULL, "button", NULL, NULL, NULL,
0, NULL, NULL);
cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL);
|