X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/772961fd4e9be46ad340cad1e55ee5f28cc5b968..7983570288ed2798470a552ec04f64aa646b664a:/page.php diff --git a/page.php b/page.php index a469a9d..d5c78cd 100644 --- a/page.php +++ b/page.php @@ -8,38 +8,6 @@ function abort($body, $status = NULL) { exit; } -function placeholder_include($name, $params = []) -{ - $path = stream_resolve_include_path("widget/$name.php"); - if (!file_exists($path)) { - return ''.$name.' ontbreekt'; - } - - ob_start(); - $Page = clone $GLOBALS['Page']; - $Page->handler = $Page->handler . $Page->path; // .= with explicit getter - $Page->path = ''; - $Place = $GLOBALS['Place']; - foreach ($params as $param) { - if ($set = strpos($param, '=')) { - $Place[ substr($param, 0, $set) ] = substr($param, $set + 1); - } - elseif (!empty($param)) { - $Page->path .= '/'.$param; - } - } - $Page->link .= $Page->path; - try { - include "widget/$name.php"; - return ob_get_clean(); - } - catch (Exception $e) { - return sprintf('%s', - "fout in $name: {$e->getMessage()}" - ); - } -} - function getoutput($blocks = []) { $doc = ob_get_clean();