]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-commit.c
Replace sidebar/logo
[ps-cgit] / ui-commit.c
index 3b0919ba831a05d6fc0c920e3ebd446e3d186b58..8019e3608f0fd35911024d2b8294e61e864831a2 100644 (file)
@@ -7,6 +7,8 @@
  */
 
 #include "cgit.h"
+#include "html.h"
+#include "ui-shared.h"
 
 static int files, slots;
 static int total_adds, total_rems, max_changes;
@@ -62,16 +64,16 @@ void print_fileinfo(struct fileinfo *info)
        html("<tr>");
        htmlf("<td class='mode'>");
        if (is_null_sha1(info->new_sha1)) {
-               html_filemode(info->old_mode);
+               cgit_print_filemode(info->old_mode);
        } else {
-               html_filemode(info->new_mode);
+               cgit_print_filemode(info->new_mode);
        }
 
        if (info->old_mode != info->new_mode &&
            !is_null_sha1(info->old_sha1) &&
            !is_null_sha1(info->new_sha1)) {
                html("<span class='modechange'>[");
-               html_filemode(info->old_mode);
+               cgit_print_filemode(info->old_mode);
                html("]</span>");
        }
        htmlf("</td><td class='%s'>", class);
@@ -194,10 +196,10 @@ void cgit_print_commit(char *hex)
                               sha1_to_hex(p->item->object.sha1), NULL);
                html(")</td></tr>");
        }
-       if (cgit_repo->snapshots) {
+       if (ctx.repo->snapshots) {
                html("<tr><th>download</th><td colspan='2' class='sha1'>");
                cgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head,
-                                         hex, cgit_repo->snapshots);
+                                         hex, ctx.repo->snapshots);
                html("</td></tr>");
        }
        html("</table>\n");