<?php
global $User, $Db;
require_once 'database.inc.php';
-@list ($id, $title) = explode('/', ltrim($Args, '/'));
+@list ($id, $title) = explode('/', ltrim($Page->path, '/'));
if ($id and ctype_digit($id)) {
- $Article->title = "Issue #$id";
- $Args = "/$id"; # minimal reference
+ $Page->title = "Issue #$id";
+ $Page->path = "/$id"; # minimal reference
$Issue = $Db->query(
- 'SELECT * FROM issues WHERE page = ? AND id = ?', [$Page, $id]
+ 'SELECT * FROM issues WHERE page = ? AND id = ?', [$Page->handler, $id]
)->fetch();
if (!$Issue) throw new Exception('Issuenummer niet gevonden');
- $replies = placeholder_include('reply'); # handle updates
+ $replies = $Page->widget('reply'); # handle updates
- $Article->title .= ': '.htmlspecialchars($Issue->subject);
- $Article->teaser = $Issue->body;
- $Article->body = $replies; # find image
+ $Page->title .= ': '.htmlspecialchars($Issue->subject);
+ $Page->teaser = $Issue->body;
+ $Page->body = $replies; # find image
- print "<h2>{$Article->title}</h2>\n";
- print "<dl class=\"aside right sidebar\">\n";
+ print "<h2>{$Page->title}</h2>\n";
+ print '<aside class="metadata"><dl>'."\n";
print '<dt>Geplaatst</dt>';
printf('<dd>%s</dd>'."\n", showdate(preg_split('/\D/', $Issue->created)));
if ($Issue->author and $author = new User('profile/'.$Issue->author, FALSE)) {
print '<dt>Opgelost</dt>';
printf('<dd>%s</dd>'."\n", showdate(preg_split('/\D/', $Issue->closed)));
}
- print "</dl>\n\n";
+ print "</dl></aside>\n\n";
print '<div>';
print $Issue->body;
if ($_POST) {
require_once 'upload.inc.php';
$query = $Db->set('issues', [
- 'page' => $Page,
+ 'page' => $Page->handler,
'subject' => $_POST['subject'],
'body' => messagehtml($_POST['body']),
'author' => $User->login,
$sql .= ' AND closed IS NULL';
}
$sql .= ' ORDER BY closed IS NOT NULL, updated DESC';
-$query = $Db->query($sql, [$Page]);
+$query = $Db->query($sql, [$Page->handler]);
if ($id == 'feed') {
require 'issue/feed.inc.php';
while ($row = $query->fetch()) {
printf('<li%s><div><a href="%s">',
$row->closed ? ' class="disabled"' : '',
- "/$Page/{$row->id}/{$row->link}"
+ "/{$Page->handler}/{$row->id}/{$row->link}"
);
printf($row->closed ? '<s>%s</s>' : '%s', htmlspecialchars($row->subject));
{
print "</a></div></li>\n";
}
print "</ul>\n";
-$Place['issuelist'] = ob_get_clean();
+$Page->place['issuelist'] = ob_get_clean();