about summary refs log tree commit diff
path: root/ui-shared.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ui-shared.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/ui-shared.c b/ui-shared.c
index f18b2c7..5e03a7a 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -611,14 +611,8 @@ char *hc(struct cgit_cmd *cmd, const char *page)
 	return (strcmp(cmd ? cmd->name : fallback_cmd, page) ? NULL : "active");
 }
 
-void cgit_print_pageheader(struct cgit_context *ctx)
+static void print_header(struct cgit_context *ctx)
 {
-	struct cgit_cmd *cmd = cgit_get_cmd(ctx);
-
-	if (!cmd && ctx->repo)
-		fallback_cmd = "summary";
-
-	html("<div id='cgit'>");
 	html("<table id='header'>\n");
 	html("<tr>\n");
 	html("<td class='logo' rowspan='2'><a href='");
@@ -659,6 +653,18 @@ void cgit_print_pageheader(struct cgit_context *ctx)
 			html_include(ctx->cfg.index_info);
 	}
 	html("</td></tr></table>\n");
+}
+
+void cgit_print_pageheader(struct cgit_context *ctx)
+{
+	struct cgit_cmd *cmd = cgit_get_cmd(ctx);
+
+	if (!cmd && ctx->repo)
+		fallback_cmd = "summary";
+
+	html("<div id='cgit'>");
+	if (!ctx->cfg.noheader)
+		print_header(ctx);
 
 	html("<table class='tabs'><tr><td>\n");
 	if (ctx->repo) {
7:54 +0100'>2009-03-15Fix doc-related glitches in Makefile and .gitignoreLars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-03-15ui-snapshot: avoid segfault when no filename is specifiedLars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-03-15fix segfault when displaying empty blobsEric Wong When size is zero, subtracting one from it turns it into ULONG_MAX which causes an out-of-bounds access on buf. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-02-19Add support for HEAD requestsLars Hjemli This is a quick 'n dirty hack which makes cgit honor HEAD requests. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-02-19Add support for ETag in 'plain' viewLars Hjemli When downloading a blob identified by its path, the client might want to know if the blob has been modified since a previous download of the same path. To this end, an ETag containing the blob SHA1 seems to be ideal. Todo: add support for HEAD requests... Suggested-by: Owen Taylor <otaylor@redhat.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-02-12ui-tree: escape ascii-text properly in hexdump viewLars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2009-02-12Makefile: add doc-related targetsLars Hjemli