]> git.cameronkatri.com Git - cgit.git/commitdiff
Merge branch 'stable'
authorLars Hjemli <hjemli@gmail.com>
Tue, 18 Aug 2009 11:14:11 +0000 (13:14 +0200)
committerLars Hjemli <hjemli@gmail.com>
Tue, 18 Aug 2009 11:14:11 +0000 (13:14 +0200)
1  2 
ui-shared.c

diff --cc ui-shared.c
index cf065116cfdd19da8c63f0ae2324c55f9f546cac,40060ba2d4a08649f44e69f9f5ea8b99b36fb91a..07d5dd44a12a580920991a0a20d0296471657f95
@@@ -626,18 -602,26 +626,21 @@@ char *hc(struct cgit_cmd *cmd, const ch
        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("<table id='header'>\n");
        html("<tr>\n");
-       html("<td class='logo' rowspan='2'><a href='");
-       if (ctx->cfg.logo_link)
-               html_attr(ctx->cfg.logo_link);
-       else
-               html_attr(cgit_rooturl());
-       html("'><img src='");
-       html_attr(ctx->cfg.logo);
-       html("' alt='cgit logo'/></a></td>\n");
+       if (ctx->cfg.logo && ctx->cfg.logo[0] != 0) {
+               html("<td class='logo' rowspan='2'><a href='");
+               if (ctx->cfg.logo_link)
+                       html_attr(ctx->cfg.logo_link);
+               else
+                       html_attr(cgit_rooturl());
+               html("'><img src='");
+               html_attr(ctx->cfg.logo);
+               html("' alt='cgit logo'/></a></td>\n");
+       }
  
        html("<td class='main'>");
        if (ctx->repo) {