summaryrefslogtreecommitdiffabout
authorLars Hjemli <hjemli@gmail.com>2008-12-07 12:34:16 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2008-12-07 12:34:16 (UTC)
commiteaf2d25c162534efe7566119cf4b1cbeab217b51 (patch) (side-by-side diff)
treefd1c43be26c2e6fdcc85fc851b85b52492ddb271
parentfb2f3f6c29bad733723152893c5246a756e4cada (diff)
downloadcgit-eaf2d25c162534efe7566119cf4b1cbeab217b51.zip
cgit-eaf2d25c162534efe7566119cf4b1cbeab217b51.tar.gz
cgit-eaf2d25c162534efe7566119cf4b1cbeab217b51.tar.bz2
ui-shared: add and use cgit_stats_link()
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.c10
-rw-r--r--ui-shared.h2
2 files changed, 10 insertions, 2 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 97b9d46..a5eb25f 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -365,2 +365,8 @@ void cgit_patch_link(char *name, char *title, char *class, char *head,
+void cgit_stats_link(char *name, char *title, char *class, char *head,
+ char *path)
+{
+ reporevlink("stats", name, title, class, head, NULL, path);
+}
+
void cgit_object_link(struct object *obj)
@@ -644,4 +650,4 @@ void cgit_print_pageheader(struct cgit_context *ctx)
if (ctx->repo->max_stats)
- reporevlink("stats", "stats", NULL, hc(cmd, "stats"),
- ctx->qry.head, NULL, NULL);
+ cgit_stats_link("stats", NULL, hc(cmd, "stats"),
+ ctx->qry.head, NULL);
if (ctx->repo->readme)
diff --git a/ui-shared.h b/ui-shared.h
index 3c8a6d0..e3fae64 100644
--- a/ui-shared.h
+++ b/ui-shared.h
@@ -32,2 +32,4 @@ extern void cgit_diff_link(char *name, char *title, char *class, char *head,
char *new_rev, char *old_rev, char *path);
+extern void cgit_stats_link(char *name, char *title, char *class, char *head,
+ char *path);
extern void cgit_object_link(struct object *obj);