aboutsummaryrefslogtreecommitdiff
path: root/wiki.c
diff options
context:
space:
mode:
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 = "";