page: set placeholder after page script
[minimedit.git] / page.php
index 7c4f8b1363101fa091eb40e8ac0ccaaaff21e76a..554735c69b53f9f0db275d5c6ea2fe6df80a4198 100644 (file)
--- a/page.php
+++ b/page.php
@@ -145,15 +145,17 @@ print "</div>\n\n";
 
 # execute dynamic code
 
-$Place = [
-       'user'  => $User['name'],
-       'url'   => htmlspecialchars($_SERVER['REQUEST_URI']),
-];
+$Place = [];
 
 if ($Page) {
        $found |= require "./$Page/index.php";
 }
 
+$Place += [
+       'user'  => $User ? $User['name'] : '',
+       'url'   => htmlspecialchars($_SERVER['REQUEST_URI']),
+];
+
 # global html
 
 if (!$found) {