X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/4653a970f0c574750b1ea2e19b112b13d66e80eb..90783a3ff6a8171f11f15adc7d57925548b1756f:/edit.php diff --git a/edit.php b/edit.php index afa6c6d..94206bb 100755 --- a/edit.php +++ b/edit.php @@ -10,7 +10,7 @@ if (!$_POST) if (!isset($_SERVER['PATH_INFO']) or strlen($_SERVER['PATH_INFO']) <= 1) abort('409 input error', "geen bestand aangeleverd"); -$filename = preg_replace('/(?:\.html)?$/', '.html', ltrim($_SERVER['PATH_INFO'], '/'), 1); +$filename = preg_replace('/(?:\.php)?$/', '.php', ltrim($_SERVER['PATH_INFO'], '/'), 1); if (file_exists($filename) and !is_writable($filename)) abort('403 input error', "ongeldige bestandsnaam: $filename"); if (is_executable($filename))