aboutsummaryrefslogtreecommitdiff
path: root/ui-shared.c
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/ui-shared.c b/ui-shared.c
index df52a9b..838170a 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -832,7 +832,7 @@ void cgit_print_docstart(void)
else
emit_js_link(NULL, "/cgit.js");
- if (ctx.cfg.favicon && *ctx.cfg.favicon) {
+ if (ctx.cfg.favicon) {
html("<link rel='shortcut icon' href='");
html_attr(ctx.cfg.favicon);
html("'/>\n");
@@ -889,18 +889,13 @@ void cgit_print_docend(void)
void cgit_print_error_page(int code, const char *msg, const char *fmt, ...)
{
va_list ap;
- va_start(ap, fmt);
- cgit_vprint_error_page(code, msg, fmt, ap);
- va_end(ap);
-}
-
-void cgit_vprint_error_page(int code, const char *msg, const char *fmt, va_list ap)
-{
ctx.page.expires = ctx.cfg.cache_dynamic_ttl;
ctx.page.status = code;
ctx.page.statusmsg = msg;
cgit_print_layout_start();
+ va_start(ap, fmt);
cgit_vprint_error(fmt, ap);
+ va_end(ap);
cgit_print_layout_end();
}
@@ -1158,7 +1153,7 @@ void cgit_print_pageheader(void)
html("<div class='path'>");
html("path: ");
cgit_print_path_crumbs(ctx.qry.vpath);
- if (ctx.repo->enable_follow_links && !strcmp(ctx.qry.page, "log")) {
+ if (ctx.cfg.enable_follow_links && !strcmp(ctx.qry.page, "log")) {
html(" (");
ctx.qry.follow = !ctx.qry.follow;
cgit_self_link(ctx.qry.follow ? "follow" : "unfollow",