From: Mischa POSLAWSKY Date: Sat, 21 Oct 2017 00:05:26 +0000 (+0200) Subject: page: show edit link for new pages X-Git-Tag: v2.4^0 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/62c99bb3ff5dee600a20fe6749f28c45b6cce7fd page: show edit link for new pages Only existing files can be writable. Otherwise parent directory should be checked (recursively), but just assume unrestricted permissions for now. --- diff --git a/page.inc.php b/page.inc.php index 54a3944..333a705 100644 --- a/page.inc.php +++ b/page.inc.php @@ -20,7 +20,7 @@ if (!empty($User)) { else { $editpage .= '.html'; } - if (is_writable($editpage)) { + if (!file_exists($editpage) or is_writable($editpage)) { print ' Wijzig'; } }