From: Michael Wallner Date: Tue, 5 Nov 2013 14:22:29 +0000 (+0100) Subject: use the response X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=a744cf3d75ff09e51ede00055afd504472ef845c;p=mdref%2Fmdref use the response --- diff --git a/index.php b/index.php index 1e09d32..8bc11f7 100644 --- a/index.php +++ b/index.php @@ -189,7 +189,7 @@ function ml($file) { } } -function md($file) { +function md($file, $res) { $file = rtrim($file, "/"); if (is_file($file) || is_file($file .= ".md")) { $pi = pathinfo($file); @@ -209,7 +209,7 @@ function md($file) { break; } } else { - http\Env::setResponseCode(404); + $res->setResponseCode(404); printf("

Not Found

\n"); printf("

Sorry, I could not find %s/%s.

", dirname($file), basename($file, ".md")); } @@ -267,7 +267,7 @@ ob_start($s); ob_end_flush(); ?> - +