X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/b228d4ff82a65fdcd4a7364759fe36a0bdda5978..b1f9b9c1459cb9a30ebf80721aff6ef788d1f891:/ui-shared.c?ds=sidebyside
diff --git a/ui-shared.c b/ui-shared.c
index b96237d..2eff79d 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -7,6 +7,7 @@
*/
#include "cgit.h"
+#include "html.h"
const char cgit_doctype[] =
"url);
- if (cgit_repo->url[strlen(cgit_repo->url) - 1] != '/')
+ html_attr(ctx.repo->url);
+ if (ctx.repo->url[strlen(ctx.repo->url) - 1] != '/')
html("/");
if (page) {
html(page);
@@ -153,8 +154,8 @@ static char *repolink(char *title, char *class, char *page, char *head,
} else {
html(ctx.cfg.script_name);
html("?url=");
- html_attr(cgit_repo->url);
- if (cgit_repo->url[strlen(cgit_repo->url) - 1] != '/')
+ html_attr(ctx.repo->url);
+ if (ctx.repo->url[strlen(ctx.repo->url) - 1] != '/')
html("/");
if (page) {
html(page);
@@ -164,7 +165,7 @@ static char *repolink(char *title, char *class, char *page, char *head,
}
delim = "&";
}
- if (head && strcmp(head, cgit_repo->defbranch)) {
+ if (head && strcmp(head, ctx.repo->defbranch)) {
html(delim);
html("h=");
html_attr(head);
@@ -446,7 +447,7 @@ void add_hidden_formfields(int incl_head, int incl_search, char *page)
html_hidden("url", url);
}
- if (incl_head && strcmp(ctx.qry.head, cgit_repo->defbranch))
+ if (incl_head && strcmp(ctx.qry.head, ctx.repo->defbranch))
html_hidden("h", ctx.qry.head);
if (ctx.qry.sha1)
@@ -476,14 +477,14 @@ void cgit_print_pageheader(char *title, int show_search)
htmlf("'>\n",
ctx.cfg.logo);
html("\n