X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/c2b82132e3ee9e658299f15d0c07e4af70dae498..063591ce4b064ed149aad58f0c619895c9ae4014:/nieuws/index.php diff --git a/nieuws/index.php b/nieuws/index.php index 392a10f..ff433d5 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -1,22 +1,25 @@ login; @list ($year, $page) = explode('/', trim($Args, '/')); -if ($User and $User->admin("edit $Page")) { +if ($User->admin("edit $Page")) { print ''."\n"; } if ($page and !is_numeric($page)) { $Article->meta['og:type'] = 'article'; - $edit = $User && $User->admin("edit $Page$Args") ? htmlspecialchars(@$_GET['edit']) : NULL; + $edit = $User->admin("edit $Page$Args") ? htmlspecialchars(@$_GET['edit']) : NULL; if ($edit) { $Article->title = $edit; } if ($Article->dateparts) { $Place[1] = ' '.$Article->date.''; } + else { + $Place[1] = ''; + } print preg_replace('{(?<=

)(.*?)(?=

)}', ($edit ?: '\1').' [[1]]', $Article->raw); - if ($User and $User->admin("edit $Page$Args")) { + if ($User->admin("edit $Page$Args")) { $taglist = []; foreach (glob("$Page/.tags/*") as $tagpath) { $tagname = pathinfo($tagpath, PATHINFO_BASENAME);