From 62c99bb3ff5dee600a20fe6749f28c45b6cce7fd Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 21 Oct 2017 02:05:26 +0200 Subject: [PATCH] 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. --- page.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'; } } -- 2.30.0