X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/772961fd4e9be46ad340cad1e55ee5f28cc5b968..da2d6e5537e9fdcd6f424ea1cc8ab6ef8f45727e:/nieuws/index.php diff --git a/nieuws/index.php b/nieuws/index.php index 0840015..1cbaf94 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -2,8 +2,13 @@ $replyform = $Page->handler == 'melding' && $User->login; @list ($year, $page) = explode('/', trim($Page->path, '/')); +if ($Page->api) { + if ($Page->path) return; + return (new PageSearch($Page->link))->files(); +} + if ($User->admin("edit {$Page->handler}")) { - print ''."\n"; + $Page->raw = ''."\n" . $Page->raw; } if ($page and !is_numeric($page)) { @@ -13,10 +18,10 @@ if ($page and !is_numeric($page)) { $Page->title = $edit; } if ($Page->dateparts) { - $Place[1] = ' '.$Page->date.''; + $Page->place[1] = ' '.showdate($Page->dateparts).''; } else { - $Place[1] = ''; + $Page->place[1] = ''; } print preg_replace('{(?<=

)(.*?)(?=

)}', ($edit ?: '\1').' [[1]]', $Page->raw); if ($User->admin("edit {$Page->link}")) { @@ -41,7 +46,7 @@ if ($page and !is_numeric($page)) { } } if ($replyform) { - print placeholder_include('reply'); + print $Page->widget('reply'); } return; } @@ -67,6 +72,6 @@ if ($year) { } print "

$title

\n\n"; - print placeholder_include('nieuws', [$match]); + print $Page->widget('nieuws', [$match]); return; }