git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
page: extract metadata after reading template
[minimedit.git]
/
page.php
diff --git
a/page.php
b/page.php
index c5ade115caf5b67a12564423f5a825810d7d5af4..5aac31fd7e503b2ede328eaf79a29290aff77e09 100644
(file)
--- a/
page.php
+++ b/
page.php
@@
-170,6
+170,11
@@
$Place = [
'url' => htmlspecialchars($_SERVER['REQUEST_URI']),
];
'url' => htmlspecialchars($_SERVER['REQUEST_URI']),
];
+if (!isset($Article->raw) and $User->admin("edit {$Article->link}")) {
+ # open template as initial contents
+ $Article->raw(file_exists("$Page/template.inc.html") ? "$Page/template.inc.html" : 'template.inc.html');
+}
+
if (isset($Article->raw)) {
if ($User->admin("edit $Page$Args")) {
# restore meta tags in static contents for editing
if (isset($Article->raw)) {
if ($User->admin("edit $Page$Args")) {
# restore meta tags in static contents for editing
@@
-180,11
+185,6
@@
if (isset($Article->raw)) {
) . $Article->raw;
}
}
) . $Article->raw;
}
}
-}
-elseif ($User->admin("edit {$Article->link}")) {
- $Article->raw(file_exists("$Page/template.inc.html") ? "$Page/template.inc.html" : 'template.inc.html');
-}
-if (isset($Article->raw)) {
$Article->raw = '<div class="static">'."\n\n".$Article->raw."</div>\n\n";
}
$Article->raw = '<div class="static">'."\n\n".$Article->raw."</div>\n\n";
}