From 2fc72187ec46064ee9d96570851993ff13f2fe49 Mon Sep 17 00:00:00 2001 From: the little girl Date: Fri, 13 Dec 2013 17:46:59 +0100 Subject: vise hele path for ting i mapper, finere dir listan --- wiki.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wiki.c b/wiki.c index 04d1fd9..1c5b59d 100644 --- a/wiki.c +++ b/wiki.c @@ -37,9 +37,9 @@ void head(char *page, char *link, char *what) { printf("%s ยท %s\n", title, page); printf("\n", base); if(link && what && !strcmp(what, "rediger")) - printf("

%s

\n", what, link, page); + printf("

%s

\n", what, link, page); else if(link && what) - printf("

%s

\n", what, base, link, page); + printf("

%s

\n", what, base, link, page); else printf("

%s

\n", page); } @@ -104,7 +104,7 @@ int edit(char *path) { if(!writable(path)) return unauthorized(403); FILE *fp = fopen(path, "r"); char *page = clean(path); - fp ? head(page, path, "vis") : head(page, NULL, NULL); + fp ? head(path, path, "vis") : head(path, NULL, NULL); char buffer[sysconf(_SC_PAGESIZE)]; printf("
\n"); printf("