git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
edit/page: add edit button in javascript
[minimedit.git]
/
edit
/
head.inc.php
diff --git
a/edit/head.inc.php
b/edit/head.inc.php
index 5c056a7c620077b15c541d9a55d5f60645bbd701..9759ec818a4e8cbac0bd34b21b1004c94bf61b2e 100644
(file)
--- a/
edit/head.inc.php
+++ b/
edit/head.inc.php
@@
-11,6
+11,19
@@
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) {