aboutsummaryrefslogtreecommitdiff
path: root/wiki.c
diff options
context:
space:
mode:
authorthe little girl <yui@blekksprut.net>2013-09-27 18:52:38 +0200
committerthe little girl <yui@blekksprut.net>2013-09-27 18:52:38 +0200
commit274a30f7aea0383203aad08c01b06a346def8214 (patch)
treef52f715e29a065f9d9c6d8661dc14377adc55db7 /wiki.c
parent1ec38509b329c49476b5f9dfae4e1889899d1d52 (diff)
downloadukulele-274a30f7aea0383203aad08c01b06a346def8214.tar.xz
cli cli
Diffstat (limited to 'wiki.c')
-rw-r--r--wiki.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/wiki.c b/wiki.c
index 36b86cb..e0f4660 100644
--- a/wiki.c
+++ b/wiki.c
@@ -183,7 +183,7 @@ int view(char *path) {
if(!fp) return redirect("?e");
char *page = clean(path);
writable(path) ? head(page, "?e", "rediger") : head(page, NULL, NULL);
- marxup(fp, stdout);
+ marxup(fp, stdout, NULL);
foot(1);
return 0;
}
@@ -193,6 +193,11 @@ int main(int argc, char **argv) {
char *page = getenv("PATH_INFO");
char *query = getenv("QUERY_STRING");
+ if(!page && argc > 1)
+ page = argv[1];
+ if(!query && argc > 2)
+ query = argv[2];
+
if(!method) method = "GET";
if(!script) script = getenv("SCRIPT_NAME");
if(!script) script = "";