page: reenclose template contents in static container
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 18 Mar 2020 16:28:59 +0000 (17:28 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 18 Mar 2020 16:31:33 +0000 (17:31 +0100)
Fix editing of new pages since v4.2-24-ged38c6a767 (2020-02-04)
[page: article method to find handler code].

page.php

index f4d6057aceac1f7e5570636d30f094476222c188..12e06900b22d1993f3aa2f0aaa8dd0ffff523a18 100644 (file)
--- a/page.php
+++ b/page.php
@@ -175,11 +175,13 @@ if (isset($Article->raw)) {
                        ) . $Article->raw;
                }
        }
-       $Article->raw = '<div class="static">'."\n\n".$Article->raw."</div>\n\n";
 }
-elseif (!$Article->raw and $User and $User->admin("edit {$Article->link}")) {
+elseif ($User and $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";
+}
 
 # output dynamic and/or static html