X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/af5d5f4037aabc493afa60a5394ab3f8f6134917..HEAD:/article.inc.php diff --git a/article.inc.php b/article.inc.php index f14de99..093852f 100644 --- a/article.inc.php +++ b/article.inc.php @@ -48,7 +48,7 @@ class ArchiveArticle $this->path = ''; $this->restricted = FALSE; while (TRUE) { - if (file_exists("$path/.private")) { + if (file_exists("$path/.private") and !$this->restricted) { $this->restricted = $path; } @@ -187,7 +187,7 @@ class ArchiveArticle else { foreach (explode(' ', $params) as $param) { if ($set = strpos($param, '=')) { - $Page->place[ substr($param, 0, $set) ] = substr($param, $set + 1); + $Page->place[ substr($param, 0, $set) ] = urldecode(substr($param, $set + 1)); } elseif (!empty($param)) { $Page->place[] = $param; @@ -223,7 +223,7 @@ class ArchiveArticle # keep either login or logout parts depending on user level global $User; $userexists = $User && property_exists($User, 'login') && $User->login; - if (! ($userexists and $User->admin("edit {$this->link}")) ) { + if (! ($userexists and !empty($this->editable)) ) { # remove matching elements until first corresponding closing tag $hideclass = $userexists ? 'logout' : 'login'; $tagmatch = '<([a-z]+) class="'.$hideclass.'"[^>]*>';