X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/bb34842b36ded0bbe7e6f51294ad3d20c8d470da..772961fd4e9be46ad340cad1e55ee5f28cc5b968:/nieuws/index.php diff --git a/nieuws/index.php b/nieuws/index.php index ff433d5..0840015 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -1,27 +1,27 @@ login; -@list ($year, $page) = explode('/', trim($Args, '/')); +$replyform = $Page->handler == 'melding' && $User->login; +@list ($year, $page) = explode('/', trim($Page->path, '/')); -if ($User->admin("edit $Page")) { +if ($User->admin("edit {$Page->handler}")) { print ''."\n"; } if ($page and !is_numeric($page)) { - $Article->meta['og:type'] = 'article'; - $edit = $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 ($Article->dateparts) { - $Place[1] = ' '.$Article->date.''; + if ($Page->dateparts) { + $Place[1] = ' '.$Page->date.''; } else { $Place[1] = ''; } - print preg_replace('{(?<=

)(.*?)(?=

)}', ($edit ?: '\1').' [[1]]', $Article->raw); - if ($User->admin("edit $Page$Args")) { + print preg_replace('{(?<=

)(.*?)(?=

)}', ($edit ?: '\1').' [[1]]', $Page->raw); + if ($User->admin("edit {$Page->link}")) { $taglist = []; - foreach (glob("$Page/.tags/*") as $tagpath) { + foreach (glob("{$Page->handler}/.tags/*") as $tagpath) { $tagname = pathinfo($tagpath, PATHINFO_BASENAME); $tagvalue = file_exists("$tagpath/$year-$page.html"); $tagtarget = is_writable($tagpath); @@ -47,7 +47,7 @@ if ($page and !is_numeric($page)) { } if ($year) { - $match = $Page; + $match = $Page->handler; $title = "Nieuws"; if (is_numeric($year) and $year > 999) { $match .= "/$year"; @@ -61,7 +61,7 @@ if ($year) { $match .= "/19??"; $title .= " vóór 2000"; } - elseif (file_exists("$Page/.tags/$year")) { + elseif (file_exists("{$Page->handler}/.tags/$year")) { $match .= "/.tags/$year"; $title .= " met $year"; }