git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8f4f651
)
edit/head: check original file request for writability
author
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 20 Dec 2020 00:58:13 +0000
(
01:58
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 21 Dec 2020 16:46:33 +0000
(17:46 +0100)
edit/head.inc.php
patch
|
blob
|
history
diff --git
a/edit/head.inc.php
b/edit/head.inc.php
index 9759ec818a4e8cbac0bd34b21b1004c94bf61b2e..a12c54be218713d6140adc52d1ecdb3f1254d8f8 100644
(file)
--- a/
edit/head.inc.php
+++ b/
edit/head.inc.php
@@
-1,4
+1,8
@@
<?php
<?php
+if (file_exists($Page->file) and !is_writable($Page->file)) {
+ return;
+}
+
if (!isset($Page->raw)) {
# open bottom template as initial contents
$template = 'template.inc.html';
if (!isset($Page->raw)) {
# open bottom template as initial contents
$template = 'template.inc.html';
@@
-11,19
+15,6
@@
if (!isset($Page->raw)) {
$Page->body = NULL;
}
$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) {
if (isset($Page->raw)) {
# restore meta tags in static contents for editing
foreach (array_reverse($Page->meta) as $metaprop => $val) {