X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/76b939d83e563cb783d666c48b0fa9ffdac827e6..872f3df9586c901552dc51fc835a5afe12db6c66:/edit/head.inc.php diff --git a/edit/head.inc.php b/edit/head.inc.php index 5c056a7..9759ec8 100644 --- a/edit/head.inc.php +++ b/edit/head.inc.php @@ -11,6 +11,19 @@ if (!isset($Page->raw)) { $Page->body = NULL; } +$editpage = $Page->link; +if (is_dir($editpage)) { + if (file_exists("$editpage/index.html")) { + $editpage .= '/index.html'; + } +} +else { + $editpage .= '.html'; +} +if (file_exists($editpage) and !is_writable($editpage)) { + return; +} + if (isset($Page->raw)) { # restore meta tags in static contents for editing foreach (array_reverse($Page->meta) as $metaprop => $val) {