X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/2b63cbb67dfa8b65019433108edb62003a39d447..ee9702f9ff640f0108e52490d256c789acb09433:/nieuws/index.php?ds=sidebyside diff --git a/nieuws/index.php b/nieuws/index.php index c6234cf..6ea68dc 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -1,23 +1,32 @@ handler == 'melding' && $User->login; +@list ($year, $page) = explode('/', trim($Page->path, '/')); -if ($User and $User->admin("edit $Page")) { - print ''."\n"; +if (!$User) { + if ($Page->path) return; + return (new PageSearch($Page->link))->files(); +} + +if ($User->admin("edit {$Page->handler}")) { + $Page->raw = ''."\n" . $Page->raw; } if ($page and !is_numeric($page)) { - $edit = $User && $User->admin("edit $Page$Args") ? htmlspecialchars(@$_GET['edit']) : NULL; + $Page->meta['og:type'] = 'article'; + $edit = $User->admin("edit {$Page->link}") ? htmlspecialchars(@$_GET['edit']) : NULL; if ($edit) { - $Article->title = $edit; + $Page->title = $edit; + } + if ($Page->dateparts) { + $Page->place[1] = ' '.showdate($Page->dateparts).''; } - if ($Article->dateparts) { - $Place[1] = ' '.$Article->date.''; + else { + $Page->place[1] = ''; } - print preg_replace('{(?<=