X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/6edfc1672cdc5eb0dfb0ff5db0ec1de1ec53415e..a4014d0dbfcab1de7293179966c9b7fcfcc7b925:/ui-shared.c diff --git a/ui-shared.c b/ui-shared.c index c04f380..5b48734 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -525,7 +525,7 @@ void cgit_object_link(struct object *obj) { char *page, *shortrev, *fullrev, *name; - fullrev = sha1_to_hex(obj->sha1); + fullrev = oid_to_hex(&obj->oid); shortrev = xstrdup(fullrev); shortrev[10] = '\0'; if (obj->type == OBJ_COMMIT) { @@ -889,6 +889,9 @@ void cgit_add_hidden_formfields(int incl_head, int incl_search, static const char *hc(const char *page) { + if (!ctx.qry.page) + return NULL; + return strcmp(ctx.qry.page, page) ? NULL : "active"; }