X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/68acff62101e1c302e55befa6d526c46f15da464..f547127c637332119b42329ca78d0e1a659d9739:/article.inc.php diff --git a/article.inc.php b/article.inc.php index 2104ef9..30de51e 100644 --- a/article.inc.php +++ b/article.inc.php @@ -164,17 +164,20 @@ class ArchiveArticle ob_start(); $Page = clone $this; - $Page->handler = $Page->handler . $Page->path; // .= with explicit getter - $Page->path = ''; - foreach ($params as $param) { - if ($set = strpos($param, '=')) { - $Page->place[ substr($param, 0, $set) ] = substr($param, $set + 1); - } - elseif (!empty($param)) { - $Page->path .= '/'.$param; + if (is_array($params)) { + $Page->place += $params; + } + else { + foreach (explode(' ', $params) as $param) { + if ($set = strpos($param, '=')) { + $Page->place[ substr($param, 0, $set) ] = substr($param, $set + 1); + } + elseif (!empty($param)) { + $Page->place[] = $param; + } } } - $Page->link .= $Page->path; + try { include "widget/$name.php"; return ob_get_clean(); @@ -210,7 +213,7 @@ class ArchiveArticle function ($sub) { list ($placeholder, $name, $params) = $sub; $html = $this->place[$name] ?? - $this->widget($name, explode(' ', $params)); + $this->widget($name, $params); if (empty($html) or $html[0] != '<') { $html = "$html"; }