login/list: wrap each item to allow containment
[minimedit.git] / page.php
index 7c4f8b1363101fa091eb40e8ac0ccaaaff21e76a..b160e45290295d56bfb30a0fd1b1116eba4465e0 100644 (file)
--- a/page.php
+++ b/page.php
@@ -31,11 +31,12 @@ function getoutput($blocks = [])
                        }
                        elseif (file_exists("$name.php")) {
                                ob_start();
-                               $Page = $GLOBALS['Page'];
-                               $Args = $GLOBALS['Args'];
+                               $Page = $GLOBALS['Page'] . $GLOBALS['Args'];
+                               $Args = '';
+                               $Place = $GLOBALS['Place'];
                                foreach (explode(' ', $params) as $param) {
                                        if ($set = strpos($param, '=')) {
-                                               $_GET[ substr($param, 0, $set) ] = substr($param, $set + 1);
+                                               $Place[ substr($param, 0, $set) ] = substr($param, $set + 1);
                                        }
                                        elseif (!empty($param)) {
                                                $Args .= '/'.$param;
@@ -145,15 +146,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'  => empty($User) ? '' : $User['name'],
+       'url'   => htmlspecialchars($_SERVER['REQUEST_URI']),
+];
+
 # global html
 
 if (!$found) {