mirror of
https://git.zx2c4.com/cgit
synced 2025-08-02 17:15:13 +02:00
Merge branch 'stable'
This commit is contained in:
commit
31665579c2
2 changed files with 6 additions and 2 deletions
|
@ -587,15 +587,20 @@ void add_hidden_formfields(int incl_head, int incl_search, char *page)
|
|||
}
|
||||
}
|
||||
|
||||
const char *fallback_cmd = "repolist";
|
||||
|
||||
char *hc(struct cgit_cmd *cmd, const char *page)
|
||||
{
|
||||
return (strcmp(cmd->name, page) ? NULL : "active");
|
||||
return (strcmp(cmd ? cmd->name : fallback_cmd, page) ? NULL : "active");
|
||||
}
|
||||
|
||||
void cgit_print_pageheader(struct cgit_context *ctx)
|
||||
{
|
||||
struct cgit_cmd *cmd = cgit_get_cmd(ctx);
|
||||
|
||||
if (!cmd && ctx->repo)
|
||||
fallback_cmd = "summary";
|
||||
|
||||
html("<table id='header'>\n");
|
||||
html("<tr>\n");
|
||||
html("<td class='logo' rowspan='2'><a href='");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue