summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
authorLars Hjemli <hjemli@gmail.com>2007-07-22 22:11:15 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2007-07-22 22:27:32 (UTC)
commiteb45342e735818b3c68cbab9b61b23e79ae74418 (patch) (side-by-side diff)
tree43fed08927a2118a22cf686ee58b8d464233cd5d /ui-shared.c
parent1d4aaff696ee1b9085dda0f0f3d84d9d20d96db0 (diff)
downloadcgit-eb45342e735818b3c68cbab9b61b23e79ae74418.zip
cgit-eb45342e735818b3c68cbab9b61b23e79ae74418.tar.gz
cgit-eb45342e735818b3c68cbab9b61b23e79ae74418.tar.bz2
cgit_print_snapshot_links: use url to specify snapshot name
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-shared.c') (more/less context) (show whitespace changes)
-rw-r--r--ui-shared.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c
index ca2ee82..5c5bcf3 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -214,32 +214,38 @@ void cgit_log_link(char *name, char *title, char *class, char *head,
html_txt(name);
html("</a>");
}
void cgit_commit_link(char *name, char *title, char *class, char *head,
char *rev)
{
if (strlen(name) > cgit_max_msg_len && cgit_max_msg_len >= 15) {
name[cgit_max_msg_len] = '\0';
name[cgit_max_msg_len - 1] = '.';
name[cgit_max_msg_len - 2] = '.';
name[cgit_max_msg_len - 3] = '.';
}
reporevlink("commit", name, title, class, head, rev, NULL);
}
+void cgit_snapshot_link(char *name, char *title, char *class, char *head,
+ char *rev, char *archivename)
+{
+ reporevlink("snapshot", name, title, class, head, rev, archivename);
+}
+
void cgit_diff_link(char *name, char *title, char *class, char *head,
char *new_rev, char *old_rev, char *path)
{
char *delim;
delim = repolink(title, class, "diff", head, path);
if (new_rev && strcmp(new_rev, cgit_query_head)) {
html(delim);
html("id=");
html_attr(new_rev);
delim = "&amp;";
}
if (old_rev) {
html(delim);
html("id2=");
html_attr(old_rev);