X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/0826661558e00b7f64011320fe7b039e343521da..72d8db8c87cf95efb73e4caeb5e637e3ed142783:/page.php diff --git a/page.php b/page.php index 7c4f8b1..b160e45 100644 --- 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 "\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) {