if ($id and ctype_digit($id)) {
$Page->title = "Issue #$id";
- $Page->path = "/$id"; # minimal reference
+ $Page->link = $Page->handler . ($Page->path = "/$id"); # minimal reference
$Issue = $Db->query(
'SELECT * FROM issues WHERE page = ? AND id = ?', [$Page->handler, $id]
)->fetch();
$Page->title .= ': '.htmlspecialchars($Issue->subject);
$Page->teaser = $Issue->body;
+ if ($Page->api) return;
$Page->body = $replies; # find image
print "<h2>{$Page->title}</h2>\n";
}
$_POST = [];
}
+if ($Page->api) return;
$subsql = "SELECT count(*) FROM comments WHERE page=i.page||'/'||i.id";
$cols = "*, ($subsql AND message IS NOT NULL) AS replycount";