added snapshot filename to the link - changed cgit_pageurl into cgit_fileurl with the filename parameter - rewritten cgit_pageurl as a wrapper around cgit_fileurl Signed-off-by: Michael Krelin <hacker@klever.net>
Michael Krelin hacker@klever.net
Sat, 21 Jul 2007 13:13:40 +0200
3 files changed,
16 insertions(+),
5 deletions(-)
M
cgit.h
→
cgit.h
@@ -201,6 +201,8 @@ extern int cache_exist(struct cacheitem *item);
extern int cache_expired(struct cacheitem *item); extern char *cgit_repourl(const char *reponame); +extern char *cgit_fileurl(const char *reponame, const char *pagename, + const char *filename, const char *query); extern char *cgit_pageurl(const char *reponame, const char *pagename, const char *query);
M
ui-snapshot.c
→
ui-snapshot.c
@@ -109,7 +109,7 @@ for(f=0;f<(sizeof(snapshot_archives)/sizeof(*snapshot_archives));++f) {
const struct snapshot_archive_t* sat = &snapshot_archives[f]; filename = fmt("%s-%s%s",repo,hex,sat->suffix); htmlf("<a href='%s'>%s</a><br/>", - cgit_pageurl(repo,"snapshot", + cgit_fileurl(repo,"snapshot",filename, fmt("id=%s&name=%s",hex,filename)), filename); } }