[PATCH 1/1] ui-shared: Simplify cgit_print_error_page() logic

Juuso Lapinlampi wub at partyvan.eu
Wed May 11 19:50:09 CEST 2016


---
This may be a little controversial, but right now is there a reason not
to do this?

 ui-shared.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/ui-shared.c b/ui-shared.c
index 9a38aa9..d9541f0 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -792,13 +792,11 @@ void cgit_print_error_page(int code, const char *msg, const char *fmt, ...)
 	ctx.page.expires = ctx.cfg.cache_dynamic_ttl;
 	ctx.page.status = code;
 	ctx.page.statusmsg = msg;
-	cgit_print_http_headers();
-	cgit_print_docstart();
-	cgit_print_pageheader();
+	cgit_print_layout_start()
 	va_start(ap, fmt);
 	cgit_vprint_error(fmt, ap);
 	va_end(ap);
-	cgit_print_docend();
+	cgit_print_layout_end();
 }
 
 void cgit_print_layout_start(void)
-- 
2.8.1



More information about the CGit mailing list