]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-refs.c
ui-refs.c: Remove global header variable
[ps-cgit] / ui-refs.c
index e89f8368dcb1f4f667eb797e48f317e1d11376d4..0399e6b9ebc05f87e6f1bffc1281965d26015ad3 100644 (file)
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -7,11 +7,10 @@
  */
 
 #include "cgit.h"
  */
 
 #include "cgit.h"
+#include "ui-refs.h"
 #include "html.h"
 #include "ui-shared.h"
 
 #include "html.h"
 #include "ui-shared.h"
 
-static int header;
-
 static int cmp_age(int age1, int age2)
 {
        if (age1 != 0 && age2 != 0)
 static int cmp_age(int age1, int age2)
 {
        if (age1 != 0 && age2 != 0)
@@ -95,7 +94,6 @@ static void print_tag_header()
             "<th class='left'>Download</th>"
             "<th class='left'>Author</th>"
             "<th class='left' colspan='2'>Age</th></tr>\n");
             "<th class='left'>Download</th>"
             "<th class='left'>Author</th>"
             "<th class='left' colspan='2'>Age</th></tr>\n");
-       header = 1;
 }
 
 static void print_tag_downloads(const struct cgit_repo *repo, const char *ref)
 }
 
 static void print_tag_downloads(const struct cgit_repo *repo, const char *ref)
@@ -155,8 +153,6 @@ static int print_tag(struct refinfo *ref)
                        cgit_print_age(info->tagger_date, -1, NULL);
                html("</td></tr>\n");
        } else {
                        cgit_print_age(info->tagger_date, -1, NULL);
                html("</td></tr>\n");
        } else {
-               if (!header)
-                       print_tag_header();
                html("<tr><td>");
                cgit_tag_link(name, NULL, NULL, ctx.qry.head, name);
                html("</td><td>");
                html("<tr><td>");
                cgit_tag_link(name, NULL, NULL, ctx.qry.head, name);
                html("</td><td>");
@@ -177,7 +173,7 @@ static int print_tag(struct refinfo *ref)
 
 static void print_refs_link(char *path)
 {
 
 static void print_refs_link(char *path)
 {
-       html("<tr class='nohover'><td colspan='4'>");
+       html("<tr class='nohover'><td colspan='5'>");
        cgit_refs_link("[...]", NULL, NULL, ctx.qry.head, NULL, path);
        html("</td></tr>");
 }
        cgit_refs_link("[...]", NULL, NULL, ctx.qry.head, NULL, path);
        html("</td></tr>");
 }
@@ -220,7 +216,6 @@ void cgit_print_tags(int maxcount)
        struct reflist list;
        int i;
 
        struct reflist list;
        int i;
 
-       header = 0;
        list.refs = NULL;
        list.alloc = list.count = 0;
        for_each_tag_ref(cgit_refs_cb, &list);
        list.refs = NULL;
        list.alloc = list.count = 0;
        for_each_tag_ref(cgit_refs_cb, &list);
@@ -252,7 +247,7 @@ void cgit_print_refs()
                cgit_print_tags(0);
        else {
                cgit_print_branches(0);
                cgit_print_tags(0);
        else {
                cgit_print_branches(0);
-               html("<tr class='nohover'><td colspan='4'>&nbsp;</td></tr>");
+               html("<tr class='nohover'><td colspan='5'>&nbsp;</td></tr>");
                cgit_print_tags(0);
        }
        html("</table>");
                cgit_print_tags(0);
        }
        html("</table>");