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:
ec5417c
)
page: restore meta tags for editors
author
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 20 Nov 2019 23:31:27 +0000
(
00:31
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 25 Nov 2019 20:14:17 +0000
(21:14 +0100)
page.php
patch
|
blob
|
history
diff --git
a/page.php
b/page.php
index 1488f1c5904f7a637208305037bfd73bb02e7861..932e72943b4f8b1ee1d35c7f512407141d481b32 100644
(file)
--- a/
page.php
+++ b/
page.php
@@
-179,6
+179,15
@@
$Place = [
];
if (isset($Article->raw)) {
+ if ($User and $User->admin("edit $Page$Args")) {
+ # restore meta tags in static contents for editing
+ foreach (array_reverse($Article->meta) as $metaprop => $val) {
+ $Article->raw = sprintf(
+ '<meta property="%s" content="%s" />'."\n",
+ $metaprop, $val
+ ) . $Article->raw;
+ }
+ }
$Article->raw = '<div class="static">'."\n\n".$Article->raw."</div>\n\n";
}