]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-snapshot.c
Remove obsolete cacheitem parameter to ui-functions
[ps-cgit] / ui-snapshot.c
index 67dbbdda833c048ffba4801c84b043f0442ad034..c7414691290eef3dc335c237810d07e3524f5907 100644 (file)
@@ -69,8 +69,7 @@ static const struct snapshot_archive_t {
 
 #define snapshot_archives_len (sizeof(snapshot_archives) / sizeof(*snapshot_archives))
 
 
 #define snapshot_archives_len (sizeof(snapshot_archives) / sizeof(*snapshot_archives))
 
-void cgit_print_snapshot(struct cacheitem *item, const char *head,
-                        const char *hex, const char *prefix,
+void cgit_print_snapshot(const char *head, const char *hex, const char *prefix,
                         const char *filename, int snapshots)
 {
        const struct snapshot_archive_t* sat;
                         const char *filename, int snapshots)
 {
        const struct snapshot_archive_t* sat;
@@ -101,7 +100,9 @@ void cgit_print_snapshot(struct cacheitem *item, const char *head,
                args.base = fmt("%s/", prefix);
                args.tree = commit->tree;
                args.time = commit->date;
                args.base = fmt("%s/", prefix);
                args.tree = commit->tree;
                args.time = commit->date;
-               cgit_print_snapshot_start(sat->mimetype, filename, item);
+               ctx.page.mimetype = xstrdup(sat->mimetype);
+               ctx.page.filename = xstrdup(filename);
+               cgit_print_http_headers(&ctx);
                (*sat->write_func)(&args);
                return;
        }
                (*sat->write_func)(&args);
                return;
        }