diff options
Diffstat (limited to 'wiki.c')
-rw-r--r-- | wiki.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 = ""; |